/titanic_50/usr/src/lib/pam_modules/authtok_check/ |
H A D | dict.c | 35 static int lockfd = -1; variable 69 if ((lockfd = open(dblock, O_WRONLY|O_CREAT|O_EXCL, 0400)) == -1) { in lock_db() 71 lockfd = open(dblock, O_WRONLY); in lock_db() 72 if (lockfd == -1) { in lock_db() 83 retval = fcntl(lockfd, F_SETLK, &flock); in lock_db() 106 if (lockfd != -1) { in unlock_db() 108 (void) fcntl(lockfd, F_SETLK, &flock); in unlock_db() 109 (void) close(lockfd); in unlock_db() 110 lockfd = -1; in unlock_db()
|
/titanic_50/usr/src/lib/libbsm/common/ |
H A D | devalloc.c | 1173 int lockfd = -1; in _da_lock_devdb() local 1192 if ((lockfd = open(lockfile, O_RDWR | O_CREAT, 0600)) == -1) in _da_lock_devdb() 1196 (void) fchown(lockfd, DA_UID, DA_GID); in _da_lock_devdb() 1198 if (lseek(lockfd, (off_t)0, SEEK_SET) == -1) { in _da_lock_devdb() 1200 (void) close(lockfd); in _da_lock_devdb() 1207 ret = lockf(lockfd, F_TLOCK, 0); in _da_lock_devdb() 1210 return (lockfd); in _da_lock_devdb() 1214 (void) close(lockfd); in _da_lock_devdb() 1243 int lockfd = -1; in da_open_devdb() local 1260 if ((lockfd = _da_lock_devdb(rootdir)) == -1) in da_open_devdb() [all …]
|
/titanic_50/usr/src/cmd/filesync/ |
H A D | main.c | 96 static int lockfd; /* file descriptor for locking baseline */ variable 550 lockfd = creat(file_base, 0666); in findfiles() 552 lockfd = open(file_base, O_RDWR); in findfiles() 554 if (lockfd < 0) { in findfiles() 559 ret = lockf(lockfd, F_TLOCK, 0L); in findfiles() 595 (void) lockf(lockfd, F_ULOCK, 0); in cleanup()
|
/titanic_50/usr/src/cmd/zoneadm/ |
H A D | zoneadm.c | 2923 int lockfd; in install_func() local 3045 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in install_func() 3066 zonecfg_release_lock_file(target_zone, lockfd); in install_func() 3118 zonecfg_release_lock_file(target_zone, lockfd); in install_func() 3549 int lockfd; in clone_func() local 3670 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in clone_func() 3838 zonecfg_release_lock_file(target_zone, lockfd); in clone_func() 3973 int lockfd; in move_func() local 4095 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in move_func() 4191 zonecfg_release_lock_file(target_zone, lockfd); in move_func() [all …]
|
/titanic_50/usr/src/cmd/zlogin/ |
H A D | zlogin.c | 1401 release_lock_file(int lockfd) in release_lock_file() argument 1403 (void) close(lockfd); in release_lock_file() 1407 grab_lock_file(const char *zone_name, int *lockfd) in grab_lock_file() argument 1421 if ((*lockfd = open(pathbuf, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR)) < 0) { in grab_lock_file() 1433 if (fcntl(*lockfd, F_SETLKW, &flock) < 0) { in grab_lock_file() 1436 release_lock_file(*lockfd); in grab_lock_file() 1446 int pstatus = 0, error = -1, lockfd, doorfd; in start_zoneadmd() local 1452 if (grab_lock_file(zone_name, &lockfd) != Z_OK) in start_zoneadmd() 1500 release_lock_file(lockfd); in start_zoneadmd()
|
/titanic_50/usr/src/lib/libc/port/gen/ |
H A D | getutx.c | 1080 int lockfd; in lockutx() local 1082 if ((lockfd = open(UTMPX_FILE, O_RDWR|O_CREAT, 0644)) < 0) in lockutx() 1085 if (lockf(lockfd, F_LOCK, 0) < 0) { in lockutx() 1086 (void) close(lockfd); in lockutx() 1091 fd = lockfd; in lockutx()
|
/titanic_50/usr/src/cmd/allocate/ |
H A D | allocate3.c | 644 static int lockfd = -1; in lock_dev() local 664 if ((lockfd == -1) && in lock_dev() 665 (lockfd = open(lockfile, O_RDWR | O_CREAT, 0600)) == -1) { in lock_dev() 671 if (lseek(lockfd, offset, SEEK_SET) == -1) { in lock_dev() 680 ret = lockf(lockfd, F_TLOCK, size); in lock_dev() 682 return (lockfd); in lock_dev()
|
/titanic_50/usr/src/lib/libshare/common/ |
H A D | libshare.c | 833 int lockfd; in sa_init() local 880 lockfd = open(DFS_LOCK_FILE, O_RDWR); in sa_init() 881 if (lockfd >= 0) { in sa_init() 884 (void) lockf(lockfd, F_LOCK, 0); in sa_init() 925 (void) lockf(lockfd, F_ULOCK, in sa_init() 927 (void) close(lockfd); in sa_init() 976 (void) lockf(lockfd, in sa_init() 978 (void) close(lockfd); in sa_init() 1006 (void) lockf(lockfd, F_ULOCK, 0); in sa_init() 1007 (void) close(lockfd); in sa_init()
|
/titanic_50/usr/src/lib/libzonecfg/common/ |
H A D | libzonecfg.c | 7168 zonecfg_release_lock_file(const char *zone_name, int lockfd) in zonecfg_release_lock_file() argument 7181 assert(lockfd == -1); in zonecfg_release_lock_file() 7190 assert(lockfd >= 0); in zonecfg_release_lock_file() 7191 (void) close(lockfd); in zonecfg_release_lock_file() 7195 zonecfg_grab_lock_file(const char *zone_name, int *lockfd) in zonecfg_grab_lock_file() argument 7209 *lockfd = -1; in zonecfg_grab_lock_file() 7238 if ((*lockfd = open(pathbuf, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR)) < 0) { in zonecfg_grab_lock_file() 7250 if ((fcntl(*lockfd, F_SETLKW, &flock) < 0) || in zonecfg_grab_lock_file() 7254 zonecfg_release_lock_file(zone_name, *lockfd); in zonecfg_grab_lock_file() 7262 zonecfg_lock_file_held(int *lockfd) in zonecfg_lock_file_held() argument [all …]
|
/titanic_50/usr/src/cmd/fs.d/ufs/mkfs/ |
H A D | mkfs.c | 5147 int lockfd; variable 5165 if (ioctl(lockfd, _FIOLFSS, &lockfs) == -1) { in ulockfs() 5184 if (ioctl(lockfd, _FIOLFS, &lockfs) == -1) { in ulockfs() 5202 if ((lockfd = open64(directory, O_RDONLY)) == -1) { in wlockfs() 5210 if (ioctl(lockfd, _FIOLFSS, &lockfs) == -1) { in wlockfs() 5220 if (ioctl(lockfd, _FIOLFS, &lockfs) == -1) { in wlockfs()
|