security_stack.c 22.2 KB
Newer Older
1
/*
2
 * Copyright (C) 2010-2014 Red Hat, Inc.
3 4 5 6 7 8 9 10 11 12 13 14
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
15
 * License along with this library.  If not, see
O
Osier Yang 已提交
16
 * <http://www.gnu.org/licenses/>.
17 18 19 20 21 22 23 24
 *
 * Stacked security driver
 */

#include <config.h>

#include "security_stack.h"

25
#include "virerror.h"
26
#include "viralloc.h"
27 28 29 30 31

#define VIR_FROM_THIS VIR_FROM_SECURITY

typedef struct _virSecurityStackData virSecurityStackData;
typedef virSecurityStackData *virSecurityStackDataPtr;
32
typedef struct _virSecurityStackItem virSecurityStackItem;
33
typedef virSecurityStackItem *virSecurityStackItemPtr;
34 35 36 37 38

struct _virSecurityStackItem {
    virSecurityManagerPtr securityManager;
    virSecurityStackItemPtr next;
};
39 40

struct _virSecurityStackData {
41
    virSecurityStackItemPtr itemsHead;
42 43
};

44 45 46 47 48 49
int
virSecurityStackAddNested(virSecurityManagerPtr mgr,
                          virSecurityManagerPtr nested)
{
    virSecurityStackItemPtr item = NULL;
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
50 51 52 53 54
    virSecurityStackItemPtr tmp;

    tmp = priv->itemsHead;
    while (tmp && tmp->next)
        tmp = tmp->next;
55

56
    if (VIR_ALLOC(item) < 0)
57 58
        return -1;
    item->securityManager = nested;
59 60 61 62 63
    if (tmp)
        tmp->next = item;
    else
        priv->itemsHead = item;

64 65 66 67 68 69 70
    return 0;
}

virSecurityManagerPtr
virSecurityStackGetPrimary(virSecurityManagerPtr mgr)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
71
    return priv->itemsHead->securityManager;
72 73 74
}

static virSecurityDriverStatus
75
virSecurityStackProbe(const char *virtDriver ATTRIBUTE_UNUSED)
76 77 78 79 80 81 82 83 84 85 86
{
    return SECURITY_DRIVER_ENABLE;
}

static int
virSecurityStackOpen(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
{
    return 0;
}

static int
E
Eric Blake 已提交
87
virSecurityStackClose(virSecurityManagerPtr mgr)
88
{
E
Eric Blake 已提交
89
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
90
    virSecurityStackItemPtr next, item = priv->itemsHead;
E
Eric Blake 已提交
91

92 93
    while (item) {
        next = item->next;
94
        virObjectUnref(item->securityManager);
95 96 97
        VIR_FREE(item);
        item = next;
    }
E
Eric Blake 已提交
98

99 100 101 102 103 104
    return 0;
}

static const char *
virSecurityStackGetModel(virSecurityManagerPtr mgr)
{
105
    return virSecurityManagerGetModel(virSecurityStackGetPrimary(mgr));
106 107 108 109 110
}

static const char *
virSecurityStackGetDOI(virSecurityManagerPtr mgr)
{
111
    return virSecurityManagerGetDOI(virSecurityStackGetPrimary(mgr));
112 113
}

114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
static int
virSecurityStackPreFork(virSecurityManagerPtr mgr)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    /* XXX For now, we rely on no driver having any state that requires
     * rollback if a later driver in the stack fails; if this changes,
     * we'd need to split this into transaction semantics by dividing
     * the work into prepare/commit/abort.  */
    for (; item; item = item->next) {
        if (virSecurityManagerPreFork(item->securityManager) < 0) {
            rc = -1;
            break;
        }
E
Eric Blake 已提交
130 131 132 133 134
        /* Undo the unbalanced locking left behind after recursion; if
         * PostFork ever delegates to driver callbacks, we'd instead
         * need to recurse to an internal method that does not regrab
         * a lock. */
        virSecurityManagerPostFork(item->securityManager);
135 136 137 138 139
    }

    return rc;
}

140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184

static int
virSecurityStackTransactionStart(virSecurityManagerPtr mgr)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerTransactionStart(item->securityManager) < 0)
            rc = -1;
    }

    return rc;
}


static int
virSecurityStackTransactionCommit(virSecurityManagerPtr mgr,
                                  pid_t pid)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerTransactionCommit(item->securityManager, pid) < 0)
            rc = -1;
    }

    return rc;
}


static void
virSecurityStackTransactionAbort(virSecurityManagerPtr mgr)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;

    for (; item; item = item->next)
        virSecurityManagerTransactionAbort(item->securityManager);
}


185 186 187 188 189
static int
virSecurityStackVerify(virSecurityManagerPtr mgr,
                       virDomainDefPtr def)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
190
    virSecurityStackItemPtr item = priv->itemsHead;
191 192
    int rc = 0;

193
    for (; item; item = item->next) {
194 195 196 197 198
        if (virSecurityManagerVerify(item->securityManager, def) < 0) {
            rc = -1;
            break;
        }
    }
199 200 201 202 203 204 205

    return rc;
}


static int
virSecurityStackGenLabel(virSecurityManagerPtr mgr,
206
                         virDomainDefPtr vm)
207 208 209
{
    int rc = 0;

210
    if (virSecurityManagerGenLabel(virSecurityStackGetPrimary(mgr), vm) < 0)
211 212
        rc = -1;

M
Michal Privoznik 已提交
213
/* TODO */
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
#if 0
    /* We don't allow secondary drivers to generate labels.
     * This may have to change in the future, but requires
     * changes elsewhere in domain_conf.c and capabilities.c
     * XML formats first, to allow recording of multiple
     * labels
     */
    if (virSecurityManagerGenLabel(priv->secondary, vm) < 0)
        rc = -1;
#endif

    return rc;
}


static int
virSecurityStackReleaseLabel(virSecurityManagerPtr mgr,
231
                             virDomainDefPtr vm)
232 233 234
{
    int rc = 0;

235
    if (virSecurityManagerReleaseLabel(virSecurityStackGetPrimary(mgr), vm) < 0)
236
        rc = -1;
237

M
Michal Privoznik 已提交
238
/* TODO */
239 240 241 242 243 244 245 246 247 248 249 250
#if 0
    /* XXX See note in GenLabel */
    if (virSecurityManagerReleaseLabel(priv->secondary, vm) < 0)
        rc = -1;
#endif

    return rc;
}


static int
virSecurityStackReserveLabel(virSecurityManagerPtr mgr,
251 252
                             virDomainDefPtr vm,
                             pid_t pid)
253 254 255
{
    int rc = 0;

256
    if (virSecurityManagerReserveLabel(virSecurityStackGetPrimary(mgr), vm, pid) < 0)
257
        rc = -1;
M
Michal Privoznik 已提交
258
/* TODO */
259 260
#if 0
    /* XXX See note in GenLabel */
261
    if (virSecurityManagerReserveLabel(priv->secondary, vm, pid) < 0)
262 263 264 265 266 267 268 269
        rc = -1;
#endif

    return rc;
}


static int
270 271 272
virSecurityStackSetDiskLabel(virSecurityManagerPtr mgr,
                             virDomainDefPtr vm,
                             virDomainDiskDefPtr disk)
273 274
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
275
    virSecurityStackItemPtr item = priv->itemsHead;
276 277
    int rc = 0;

278
    for (; item; item = item->next) {
279
        if (virSecurityManagerSetDiskLabel(item->securityManager, vm, disk) < 0)
280 281
            rc = -1;
    }
282 283 284 285 286 287

    return rc;
}


static int
288 289 290
virSecurityStackRestoreDiskLabel(virSecurityManagerPtr mgr,
                                 virDomainDefPtr vm,
                                 virDomainDiskDefPtr disk)
291 292
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
293
    virSecurityStackItemPtr item = priv->itemsHead;
294 295
    int rc = 0;

296
    for (; item; item = item->next) {
297
        if (virSecurityManagerRestoreDiskLabel(item->securityManager, vm, disk) < 0)
298 299
            rc = -1;
    }
300 301 302 303 304 305

    return rc;
}


static int
306 307 308 309
virSecurityStackSetHostdevLabel(virSecurityManagerPtr mgr,
                                virDomainDefPtr vm,
                                virDomainHostdevDefPtr dev,
                                const char *vroot)
310 311 312

{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
313
    virSecurityStackItemPtr item = priv->itemsHead;
314 315
    int rc = 0;

316
    for (; item; item = item->next) {
317 318 319 320
        if (virSecurityManagerSetHostdevLabel(item->securityManager,
                                              vm,
                                              dev,
                                              vroot) < 0)
321 322
            rc = -1;
    }
323 324 325 326 327 328

    return rc;
}


static int
329 330 331 332
virSecurityStackRestoreHostdevLabel(virSecurityManagerPtr mgr,
                                    virDomainDefPtr vm,
                                    virDomainHostdevDefPtr dev,
                                    const char *vroot)
333 334
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
335
    virSecurityStackItemPtr item = priv->itemsHead;
336 337
    int rc = 0;

338
    for (; item; item = item->next) {
339 340 341 342
        if (virSecurityManagerRestoreHostdevLabel(item->securityManager,
                                                  vm,
                                                  dev,
                                                  vroot) < 0)
343 344
            rc = -1;
    }
345 346 347 348 349 350

    return rc;
}


static int
351 352
virSecurityStackSetAllLabel(virSecurityManagerPtr mgr,
                            virDomainDefPtr vm,
353 354
                            const char *stdin_path,
                            bool chardevStdioLogd)
355 356
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
357
    virSecurityStackItemPtr item = priv->itemsHead;
358 359
    int rc = 0;

360
    for (; item; item = item->next) {
361 362
        if (virSecurityManagerSetAllLabel(item->securityManager, vm,
                                          stdin_path, chardevStdioLogd) < 0)
363 364
            rc = -1;
    }
365 366 367 368 369 370

    return rc;
}


static int
371 372
virSecurityStackRestoreAllLabel(virSecurityManagerPtr mgr,
                                virDomainDefPtr vm,
373 374
                                bool migrated,
                                bool chardevStdioLogd)
375 376
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
377
    virSecurityStackItemPtr item = priv->itemsHead;
378 379
    int rc = 0;

380
    for (; item; item = item->next) {
381 382
        if (virSecurityManagerRestoreAllLabel(item->securityManager, vm,
                                              migrated, chardevStdioLogd) < 0)
383 384
            rc = -1;
    }
385 386 387 388 389 390 391

    return rc;
}


static int
virSecurityStackSetSavedStateLabel(virSecurityManagerPtr mgr,
392
                                   virDomainDefPtr vm,
393 394 395
                                   const char *savefile)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
396
    virSecurityStackItemPtr item = priv->itemsHead;
397 398
    int rc = 0;

399 400 401 402
    for (; item; item = item->next) {
        if (virSecurityManagerSetSavedStateLabel(item->securityManager, vm, savefile) < 0)
            rc = -1;
    }
403 404 405 406 407 408 409

    return rc;
}


static int
virSecurityStackRestoreSavedStateLabel(virSecurityManagerPtr mgr,
410
                                       virDomainDefPtr vm,
411 412 413
                                       const char *savefile)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
414
    virSecurityStackItemPtr item = priv->itemsHead;
415 416
    int rc = 0;

417 418 419 420
    for (; item; item = item->next) {
        if (virSecurityManagerRestoreSavedStateLabel(item->securityManager, vm, savefile) < 0)
            rc = -1;
    }
421 422 423 424 425 426 427

    return rc;
}


static int
virSecurityStackSetProcessLabel(virSecurityManagerPtr mgr,
428
                                virDomainDefPtr vm)
429 430
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
431
    virSecurityStackItemPtr item = priv->itemsHead;
432 433
    int rc = 0;

434 435 436 437
    for (; item; item = item->next) {
        if (virSecurityManagerSetProcessLabel(item->securityManager, vm) < 0)
            rc = -1;
    }
438 439 440 441

    return rc;
}

442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458
static int
virSecurityStackSetChildProcessLabel(virSecurityManagerPtr mgr,
                                     virDomainDefPtr vm,
                                     virCommandPtr cmd)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerSetChildProcessLabel(item->securityManager, vm, cmd) < 0)
            rc = -1;
    }

    return rc;
}

459 460
static int
virSecurityStackGetProcessLabel(virSecurityManagerPtr mgr,
461 462
                                virDomainDefPtr vm,
                                pid_t pid,
463 464 465 466
                                virSecurityLabelPtr seclabel)
{
    int rc = 0;

M
Michal Privoznik 已提交
467
/* TODO */
468
#if 0
469
    if (virSecurityManagerGetProcessLabel(priv->secondary, vm, pid, seclabel) < 0)
470 471
        rc = -1;
#endif
472
    if (virSecurityManagerGetProcessLabel(virSecurityStackGetPrimary(mgr), vm, pid, seclabel) < 0)
473 474 475 476 477 478 479
        rc = -1;

    return rc;
}


static int
480
virSecurityStackSetDaemonSocketLabel(virSecurityManagerPtr mgr,
481
                                     virDomainDefPtr vm)
482 483
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
484
    virSecurityStackItemPtr item = priv->itemsHead;
485 486
    int rc = 0;

487 488 489 490
    for (; item; item = item->next) {
        if (virSecurityManagerSetDaemonSocketLabel(item->securityManager, vm) < 0)
            rc = -1;
    }
491 492 493 494 495

    return rc;
}


496 497
static int
virSecurityStackSetSocketLabel(virSecurityManagerPtr mgr,
498
                               virDomainDefPtr vm)
499 500
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
501
    virSecurityStackItemPtr item = priv->itemsHead;
502 503
    int rc = 0;

504 505 506 507
    for (; item; item = item->next) {
        if (virSecurityManagerSetSocketLabel(item->securityManager, vm) < 0)
            rc = -1;
    }
508 509 510 511 512

    return rc;
}


513 514
static int
virSecurityStackClearSocketLabel(virSecurityManagerPtr mgr,
515
                                 virDomainDefPtr vm)
516 517
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
518
    virSecurityStackItemPtr item = priv->itemsHead;
519 520
    int rc = 0;

521 522 523 524
    for (; item; item = item->next) {
        if (virSecurityManagerClearSocketLabel(item->securityManager, vm) < 0)
            rc = -1;
    }
525 526 527 528

    return rc;
}

529
static int
530
virSecurityStackSetImageFDLabel(virSecurityManagerPtr mgr,
531
                                virDomainDefPtr vm,
532
                                int fd)
533 534
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
535
    virSecurityStackItemPtr item = priv->itemsHead;
536 537
    int rc = 0;

538 539 540 541
    for (; item; item = item->next) {
        if (virSecurityManagerSetImageFDLabel(item->securityManager, vm, fd) < 0)
            rc = -1;
    }
542 543 544 545

    return rc;
}

546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562
static int
virSecurityStackSetTapFDLabel(virSecurityManagerPtr mgr,
                              virDomainDefPtr vm,
                              int fd)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerSetTapFDLabel(item->securityManager, vm, fd) < 0)
            rc = -1;
    }

    return rc;
}

563 564 565 566
static char *
virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
                                virDomainDefPtr vm ATTRIBUTE_UNUSED)
{
567 568
    return NULL;
}
569

570 571 572 573 574 575
virSecurityManagerPtr*
virSecurityStackGetNested(virSecurityManagerPtr mgr)
{
    virSecurityManagerPtr *list = NULL;
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item;
576 577
    int len = 0;
    size_t i;
578 579 580 581

    for (item = priv->itemsHead; item; item = item->next)
        len++;

582
    if (VIR_ALLOC_N(list, len + 1) < 0)
583 584
        return NULL;

585
    for (i = 0, item = priv->itemsHead; item; item = item->next, i++)
586 587 588 589 590 591
        list[i] = item->securityManager;
    list[len] = NULL;

    return list;
}

592 593 594 595 596 597 598
static const char *
virSecurityStackGetBaseLabel(virSecurityManagerPtr mgr, int virtType)
{
    return virSecurityManagerGetBaseLabel(virSecurityStackGetPrimary(mgr),
                                          virtType);
}

599
static int
600 601 602
virSecurityStackSetImageLabel(virSecurityManagerPtr mgr,
                              virDomainDefPtr vm,
                              virStorageSourcePtr src)
603 604 605 606 607 608 609 610 611 612 613 614 615 616
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerSetImageLabel(item->securityManager, vm, src) < 0)
            rc = -1;
    }

    return rc;
}

static int
617 618 619
virSecurityStackRestoreImageLabel(virSecurityManagerPtr mgr,
                                  virDomainDefPtr vm,
                                  virStorageSourcePtr src)
620 621 622 623 624 625 626 627 628 629 630 631 632 633
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerRestoreImageLabel(item->securityManager,
                                                vm, src) < 0)
            rc = -1;
    }

    return rc;
}

634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668
static int
virSecurityStackSetMemoryLabel(virSecurityManagerPtr mgr,
                               virDomainDefPtr vm,
                               virDomainMemoryDefPtr mem)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerSetMemoryLabel(item->securityManager, vm, mem) < 0)
            rc = -1;
    }

    return rc;
}

static int
virSecurityStackRestoreMemoryLabel(virSecurityManagerPtr mgr,
                                   virDomainDefPtr vm,
                                   virDomainMemoryDefPtr mem)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerRestoreMemoryLabel(item->securityManager,
                                                 vm, mem) < 0)
            rc = -1;
    }

    return rc;
}

669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703
static int
virSecurityStackSetInputLabel(virSecurityManagerPtr mgr,
                              virDomainDefPtr vm,
                              virDomainInputDefPtr input)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerSetInputLabel(item->securityManager, vm, input) < 0)
            rc = -1;
    }

    return rc;
}

static int
virSecurityStackRestoreInputLabel(virSecurityManagerPtr mgr,
                                  virDomainDefPtr vm,
                                  virDomainInputDefPtr input)
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
        if (virSecurityManagerRestoreInputLabel(item->securityManager,
                                                vm, input) < 0)
            rc = -1;
    }

    return rc;
}

704
static int
705 706 707
virSecurityStackDomainSetPathLabel(virSecurityManagerPtr mgr,
                                   virDomainDefPtr vm,
                                   const char *path)
708 709 710 711 712 713
{
    virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
    virSecurityStackItemPtr item = priv->itemsHead;
    int rc = 0;

    for (; item; item = item->next) {
714 715
        if (virSecurityManagerDomainSetPathLabel(item->securityManager,
                                                 vm, path) < 0)
716 717 718 719 720 721
            rc = -1;
    }

    return rc;
}

722
virSecurityDriver virSecurityDriverStack = {
723 724 725 726 727
    .privateDataLen                     = sizeof(virSecurityStackData),
    .name                               = "stack",
    .probe                              = virSecurityStackProbe,
    .open                               = virSecurityStackOpen,
    .close                              = virSecurityStackClose,
728

729 730
    .getModel                           = virSecurityStackGetModel,
    .getDOI                             = virSecurityStackGetDOI,
731

732 733
    .preFork                            = virSecurityStackPreFork,

734 735 736 737
    .transactionStart                   = virSecurityStackTransactionStart,
    .transactionCommit                  = virSecurityStackTransactionCommit,
    .transactionAbort                   = virSecurityStackTransactionAbort,

738
    .domainSecurityVerify               = virSecurityStackVerify,
739

740 741
    .domainSetSecurityDiskLabel         = virSecurityStackSetDiskLabel,
    .domainRestoreSecurityDiskLabel     = virSecurityStackRestoreDiskLabel,
742

743 744
    .domainSetSecurityImageLabel        = virSecurityStackSetImageLabel,
    .domainRestoreSecurityImageLabel    = virSecurityStackRestoreImageLabel,
745

746 747 748
    .domainSetSecurityMemoryLabel       = virSecurityStackSetMemoryLabel,
    .domainRestoreSecurityMemoryLabel   = virSecurityStackRestoreMemoryLabel,

749 750 751
    .domainSetSecurityInputLabel        = virSecurityStackSetInputLabel,
    .domainRestoreSecurityInputLabel    = virSecurityStackRestoreInputLabel,

752 753 754
    .domainSetSecurityDaemonSocketLabel = virSecurityStackSetDaemonSocketLabel,
    .domainSetSecuritySocketLabel       = virSecurityStackSetSocketLabel,
    .domainClearSecuritySocketLabel     = virSecurityStackClearSocketLabel,
755

756 757 758
    .domainGenSecurityLabel             = virSecurityStackGenLabel,
    .domainReserveSecurityLabel         = virSecurityStackReserveLabel,
    .domainReleaseSecurityLabel         = virSecurityStackReleaseLabel,
759

760 761
    .domainGetSecurityProcessLabel      = virSecurityStackGetProcessLabel,
    .domainSetSecurityProcessLabel      = virSecurityStackSetProcessLabel,
762
    .domainSetSecurityChildProcessLabel = virSecurityStackSetChildProcessLabel,
763

764 765
    .domainSetSecurityAllLabel          = virSecurityStackSetAllLabel,
    .domainRestoreSecurityAllLabel      = virSecurityStackRestoreAllLabel,
766

767 768
    .domainSetSecurityHostdevLabel      = virSecurityStackSetHostdevLabel,
    .domainRestoreSecurityHostdevLabel  = virSecurityStackRestoreHostdevLabel,
769

770 771
    .domainSetSavedStateLabel           = virSecurityStackSetSavedStateLabel,
    .domainRestoreSavedStateLabel       = virSecurityStackRestoreSavedStateLabel,
772

773
    .domainSetSecurityImageFDLabel      = virSecurityStackSetImageFDLabel,
774
    .domainSetSecurityTapFDLabel        = virSecurityStackSetTapFDLabel,
775

776
    .domainGetSecurityMountOptions      = virSecurityStackGetMountOptions,
777

778
    .getBaseLabel                       = virSecurityStackGetBaseLabel,
779

780
    .domainSetPathLabel                 = virSecurityStackDomainSetPathLabel,
781
};