/illumos-gate/usr/src/lib/libsldap/common/ |
H A D | ns_cache_door.c | 79 static int doorfd = -1; variable 104 if (doorfd == -1) { in __ns_ldap_trydoorcall_getfd() 108 if ((doorfd = open(LDAP_CACHE_DOOR, O_RDONLY, 0)) in __ns_ldap_trydoorcall_getfd() 120 while (doorfd < 3) { /* we have a reserved fd */ in __ns_ldap_trydoorcall_getfd() 121 tbc[i++] = doorfd; in __ns_ldap_trydoorcall_getfd() 122 if ((doorfd = dup(doorfd)) < 0) { in __ns_ldap_trydoorcall_getfd() 125 doorfd = -1; in __ns_ldap_trydoorcall_getfd() 137 (void) fcntl(doorfd, F_SETFD, FD_CLOEXEC); in __ns_ldap_trydoorcall_getfd() 138 if (door_info(doorfd, &real_door) == -1 || in __ns_ldap_trydoorcall_getfd() 144 (void) close(doorfd); in __ns_ldap_trydoorcall_getfd() [all …]
|
/illumos-gate/usr/src/lib/libtsol/common/ |
H A D | call_labeld.c | 91 static int doorfd = -1; in __call_labeld() local 118 if (doorfd == -1) { in __call_labeld() 124 if ((doorfd = open64(door_name, O_RDONLY, 0)) < 0) { in __call_labeld() 135 while (doorfd < 3) { /* we have a reserved fd */ in __call_labeld() 136 tbc[i++] = doorfd; in __call_labeld() 137 if ((doorfd = dup(doorfd)) < 0) { in __call_labeld() 141 doorfd = -1; in __call_labeld() 152 (void) fcntl(doorfd, F_SETFD, FD_CLOEXEC); in __call_labeld() 153 if (door_info(doorfd, &real_door) < 0) { in __call_labeld() 158 (void) close(doorfd); in __call_labeld() [all …]
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | getxby_door.c | 105 int doorfd; member 247 if (dp->doorfd == -1 && dp == &nsc_door[0]) { /* open front door */ in _nsc_initdoor_fp() 251 dp->doorfd = open64(NAME_SERVICE_DOOR, O_RDONLY, 0); in _nsc_initdoor_fp() 252 if (dp->doorfd == -1) { in _nsc_initdoor_fp() 263 while (dp->doorfd < 3) { /* we have a reserved fd */ in _nsc_initdoor_fp() 264 tbc[i++] = dp->doorfd; in _nsc_initdoor_fp() 265 if ((dp->doorfd = dup(dp->doorfd)) < 0) { in _nsc_initdoor_fp() 268 dp->doorfd = -1; in _nsc_initdoor_fp() 280 (void) fcntl(dp->doorfd, F_SETFD, FD_CLOEXEC); in _nsc_initdoor_fp() 281 if (__door_info(dp->doorfd, &dp->doori) < 0 || in _nsc_initdoor_fp() [all …]
|
/illumos-gate/usr/src/cmd/nscd/ |
H A D | nscd_door.c | 40 initdoor(void *buf, int *doorfd) in initdoor() argument 46 *doorfd = open64(NAME_SERVICE_DOOR, O_RDONLY, 0); in initdoor() 50 *doorfd); in initdoor() 52 if (*doorfd == -1) { in initdoor() 57 if (door_info(*doorfd, &doori) < 0 || in initdoor() 64 (void) close(*doorfd); in initdoor() 67 (me, "door %d not valid\n", *doorfd); in initdoor() 275 int doorfd; in send_doorfd() local 279 initdoor(*dptr, &doorfd); in send_doorfd() 289 ret = door_call(doorfd, ¶m); in send_doorfd() [all …]
|
H A D | nscd_selfcred.c | 898 int doorfd, in selfcred_fork() argument 909 if (doorfd == -1) { in selfcred_fork() 916 "(uid = %d, gid = %d)\n", doorfd, cslot, uid, gid); in selfcred_fork() 922 ret = _nscd_doorcall_fd(doorfd, NSCD_FORK|(_whoami&NSCD_WHOAMI), in selfcred_fork() 927 doorfd, cslot, ret); in selfcred_fork() 933 "status = %d, errno = %s, nscd status = %d\n", doorfd, in selfcred_fork()
|
/illumos-gate/usr/src/cmd/fs.d/nfs/nfsmapid/ |
H A D | nfsmapid_test.c | 301 static int doorfd = -1; in nfs_idmap_doorget() local 303 if (doorfd != -1) in nfs_idmap_doorget() 304 return (doorfd); in nfs_idmap_doorget() 306 if ((doorfd = open(NFSMAPID_DOOR, O_RDWR)) == -1) { in nfs_idmap_doorget() 310 return (doorfd); in nfs_idmap_doorget() 324 int doorfd; in nfs_idmap_str_uid() local 364 if ((doorfd = nfs_idmap_doorget()) == -1) { in nfs_idmap_str_uid() 375 if (door_call(doorfd, &door_args) == -1) { in nfs_idmap_str_uid() 427 int doorfd; in nfs_idmap_uid_str() local 450 if ((doorfd = nfs_idmap_doorget()) == -1) { in nfs_idmap_uid_str() [all …]
|
H A D | nfsmapid.c | 256 int doorfd = -1; in start_svcs() local 261 if ((doorfd = door_create(nfsmapid_func, NULL, in start_svcs() 274 (void) close(doorfd); in start_svcs() 286 if (fattach(doorfd, NFSMAPID_DOOR) == -1) { in start_svcs() 289 (void) close(doorfd); in start_svcs() 300 idmap_kcall(doorfd); in start_svcs()
|
/illumos-gate/usr/src/cmd/fs.d/reparsed/ |
H A D | reparsed.c | 319 int doorfd; in start_reparsed_svcs() local 322 if ((doorfd = door_create(reparsed_doorfunc, NULL, in start_reparsed_svcs() 334 (void) close(doorfd); in start_reparsed_svcs() 346 if (fattach(doorfd, REPARSED_DOOR) == -1) { in start_reparsed_svcs() 348 (void) close(doorfd); in start_reparsed_svcs()
|
/illumos-gate/usr/src/cmd/cmd-inet/lib/nwamd/ |
H A D | door_if.c | 124 int doorfd = -1; variable 626 if ((doorfd = door_create(nwamd_door_switch, NULL, in nwamd_door_init() 635 (void) door_revoke(doorfd); in nwamd_door_init() 636 doorfd = -1; in nwamd_door_init() 652 if (fattach(doorfd, NWAM_DOOR) < 0) { in nwamd_door_init() 654 (void) door_revoke(doorfd); in nwamd_door_init() 655 doorfd = -1; in nwamd_door_init() 663 if (doorfd != -1) { in nwamd_door_fini() 665 (void) door_revoke(doorfd); in nwamd_door_fini() 666 doorfd = -1; in nwamd_door_fini()
|
/illumos-gate/usr/src/cmd/pfexecd/ |
H A D | pfexecd.c | 54 static int doorfd = -1; variable 180 if (doorfd != -1) in unregister_pfexec() 181 (void) syscall(SYS_privsys, PRIVSYS_PFEXEC_UNREG, doorfd); in unregister_pfexec() 533 doorfd = door_create(callback, NULL, DOOR_REFUSE_DESC); in main() 535 if (doorfd == -1 || register_pfexec(doorfd) != 0) { in main()
|
/illumos-gate/usr/src/cmd/ldapcachemgr/ |
H A D | cachemgr.c | 1409 static int doorfd = -1; local 1426 if (doorfd == -1) { 1428 if ((doorfd = open(NAME_SERVICE_DOOR, O_RDONLY, 0)) 1434 if (door_info(doorfd, &my_door) == -1 || 1440 (void) close(doorfd); 1441 doorfd = -1; 1450 if (door_info(doorfd, &my_door) == -1 || 1456 doorfd = -1; 1461 (void) close(doorfd); 1462 doorfd = -1; /* try and restart connection */
|
/illumos-gate/usr/src/cmd/vt/ |
H A D | vtdaemon.c | 1125 int doorfd = -1; in make_daemon_exclusive() local 1131 if ((doorfd = open(vt_door_path, O_CREAT|O_RDWR, in make_daemon_exclusive() 1136 if (fstat(doorfd, &st) < 0) { in make_daemon_exclusive() 1147 if (fcntl(doorfd, F_SETLK, &flock) < 0) { in make_daemon_exclusive() 1163 if (door_info(doorfd, &info) == 0 && info.di_target != -1) { in make_daemon_exclusive() 1169 (void) close(doorfd); in make_daemon_exclusive() 1176 (void) close(doorfd); in make_daemon_exclusive()
|
/illumos-gate/usr/src/cmd/fs.d/autofs/ |
H A D | autod_main.c | 914 int doorfd; in start_autofs_svcs() local 919 if ((doorfd = door_create(autofs_doorfunc, NULL, in start_autofs_svcs() 932 (void) close(doorfd); in start_autofs_svcs() 944 if (fattach(doorfd, AUTOFS_DOOR) == -1) { in start_autofs_svcs() 947 (void) close(doorfd); in start_autofs_svcs() 955 autofs_setdoor(doorfd); in start_autofs_svcs()
|
/illumos-gate/usr/src/cmd/auditd/ |
H A D | doorway.c | 100 static int doorfd = -1; variable 457 doorfd = door_create((void(*)())input, 0, in auditd_thread_init() 459 if (doorfd < 0) in auditd_thread_init() 553 rc = auditdoor(doorfd); in auditd_thread_init() 573 if (doorfd == -1) in auditd_thread_close() 575 (void) door_revoke(doorfd); in auditd_thread_close() 576 doorfd = -1; in auditd_thread_close()
|
/illumos-gate/usr/src/cmd/zoneadmd/ |
H A D | zoneadmd.c | 1713 int doorfd = -1; in make_daemon_exclusive() local 1725 if ((doorfd = open(zone_door_path, O_CREAT|O_RDWR, in make_daemon_exclusive() 1730 if (fstat(doorfd, &st) < 0) { in make_daemon_exclusive() 1741 if (fcntl(doorfd, F_SETLK, &flock) < 0) { in make_daemon_exclusive() 1757 if (door_info(doorfd, &info) == 0 && info.di_target != -1) { in make_daemon_exclusive() 1795 (void) close(doorfd); in make_daemon_exclusive() 1800 (void) close(doorfd); in make_daemon_exclusive()
|
/illumos-gate/usr/src/cmd/fs.d/nfs/mountd/ |
H A D | mountd.c | 163 int doorfd = -1; in nfsauth_svc() local 169 if ((doorfd = door_create(nfsauth_func, NULL, in nfsauth_svc() 182 (void) close(doorfd); in nfsauth_svc() 194 if (fattach(doorfd, MOUNTD_DOOR) == -1) { in nfsauth_svc() 197 (void) close(doorfd); in nfsauth_svc() 206 darg = doorfd; in nfsauth_svc() 230 int doorfd = -1; in cmd_svc() local 233 if ((doorfd = door_create(nfscmd_func, NULL, in cmd_svc() 242 darg = doorfd; in cmd_svc()
|
/illumos-gate/usr/src/cmd/zlogin/ |
H A D | zlogin.c | 1447 int pstatus = 0, error = -1, lockfd, doorfd; in start_zoneadmd() local 1462 if ((doorfd = open(doorpath, O_RDONLY)) < 0) { in start_zoneadmd() 1472 if (door_info(doorfd, &info) == 0 && in start_zoneadmd() 1502 (void) close(doorfd); in start_zoneadmd()
|
/illumos-gate/usr/src/lib/libzonecfg/common/ |
H A D | libzonecfg.c | 7635 int doorfd, lockfd; in start_zoneadmd() local 7650 if ((doorfd = open(doorpath, O_RDONLY)) < 0) { in start_zoneadmd() 7656 if (door_info(doorfd, &info) == 0 && in start_zoneadmd() 7659 (void) close(doorfd); in start_zoneadmd() 7662 (void) close(doorfd); in start_zoneadmd() 7728 int doorfd; in zonecfg_ping_zoneadmd() local 7734 if ((doorfd = open(doorpath, O_RDONLY)) < 0) { in zonecfg_ping_zoneadmd() 7737 if (door_info(doorfd, &info) == 0 && in zonecfg_ping_zoneadmd() 7739 (void) close(doorfd); in zonecfg_ping_zoneadmd() 7742 (void) close(doorfd); in zonecfg_ping_zoneadmd() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/ |
H A D | ikeadm.c | 51 static int doorfd = -1; variable 358 if (doorfd >= 0) in open_door() 359 (void) close(doorfd); in open_door() 360 doorfd = open(DOORNM, O_RDONLY); in open_door() 361 return (doorfd); in open_door() 378 if (door_call(doorfd, &arg) < 0) { in ikedoor_call()
|