Home
last modified time | relevance | path

Searched refs:lockfile (Results 1 – 23 of 23) sorted by relevance

/illumos-gate/usr/src/cmd/ypcmd/shared/
H A Dlockmap.c59 static int lockfile; variable
183 lockfile = open(LOCKFILE, O_RDWR|O_CREAT, 0600); in init_lock_map()
184 if (lockfile != -1) { in init_lock_map()
185 if (lockf(lockfile, F_LOCK, 0) == 0) { in init_lock_map()
186 if (fstat(lockfile, &fdata) == 0) { in init_lock_map()
190 if ((write_cnt = write(lockfile, buff, in init_lock_map()
203 lockf(lockfile, F_ULOCK, 0); in init_lock_map()
204 close(lockfile); in init_lock_map()
211 lockf(lockfile, F_ULOCK, 0); in init_lock_map()
212 close(lockfile); in init_lock_map()
[all …]
/illumos-gate/usr/src/lib/libnisdb/yptol/
H A Dlock_update.c66 static int lockfile; variable
130 lockfile = open(LOCKFILE, O_RDWR|O_CREAT, 0600); in init_update_lock_map()
131 if (lockfile != -1) { in init_update_lock_map()
132 if (lockf(lockfile, F_LOCK, 0) == 0) { in init_update_lock_map()
133 if (fstat(lockfile, &fdata) == 0) { in init_update_lock_map()
137 if ((write_cnt = write(lockfile, buff, in init_update_lock_map()
152 lockf(lockfile, F_ULOCK, 0); in init_update_lock_map()
153 close(lockfile); in init_update_lock_map()
160 lockf(lockfile, F_ULOCK, 0); in init_update_lock_map()
161 close(lockfile); in init_update_lock_map()
[all …]
/illumos-gate/usr/src/lib/pkcs11/pkcs11_tpm/common/
H A Dloadsave.c320 lockfile(int fd, int op) in lockfile() function
477 if (lockfile(fileno(fp), F_RDLCK)) { in load_token_data()
518 (void) lockfile(fileno(fp), F_UNLCK); in load_token_data()
566 if (lockfile(fileno(fp), F_WRLCK)) { in save_token_data()
607 (void) lockfile(fileno(fp), F_UNLCK); in save_token_data()
643 if (lockfile(fileno(fp), F_RDLCK)) { in save_token_object()
654 (void) lockfile(fileno(fp), F_UNLCK); in save_token_object()
660 (void) lockfile(fileno(fp), F_UNLCK); in save_token_object()
668 if (lockfile(fileno(fp), F_WRLCK)) { in save_token_object()
675 (void) lockfile(fileno(fp), F_UNLCK); in save_token_object()
[all …]
/illumos-gate/usr/src/lib/krb5/plugins/kdb/db2/
H A Dadb_openclose.c208 if (lockp->lockinfo.lockfile == NULL) { in osa_adb_init_db()
219 if ((lockp->lockinfo.lockfile = fopen(lockfilename, "r+F")) == NULL) { in osa_adb_init_db()
224 if ((lockp->lockinfo.lockfile = fopen(lockfilename, "rF")) in osa_adb_init_db()
266 (void) fclose(db->lock->lockfile); in osa_adb_fini_db()
267 db->lock->lockfile = NULL; in osa_adb_fini_db()
304 fileno(db->lock->lockfile), in osa_adb_get_lock()
331 fileno(db->lock->lockfile), in osa_adb_get_lock()
345 fileno(db->lock->lockfile), in osa_adb_get_lock()
355 (void) fclose(db->lock->lockfile); in osa_adb_get_lock()
375 if ((db->lock->lockfile = fdopen(fd, "w+F")) == NULL) in osa_adb_release_lock()
[all …]
H A Dpolicy_db.h53 FILE *lockfile; member
79 krb5_error_code osa_adb_create_db(char *filename, char *lockfile, int magic);
80 krb5_error_code osa_adb_destroy_db(char *filename, char *lockfile, int magic);
84 char *lockfile, int magic);
/illumos-gate/usr/src/cmd/sgs/libldmake/common/
H A Dld_file.c107 char lockfile[MAXPATHLEN], *err, *space, *target; in ld_atexit() local
119 (void) snprintf(lockfile, MAXPATHLEN, "%s.lock", depend_file); in ld_atexit()
120 if ((err = file_lock(depend_file, lockfile, 0))) { in ld_atexit()
137 (void) unlink(lockfile); in ld_atexit()
/illumos-gate/usr/src/cmd/make/lib/makestate/
H A Dld_file.c99 char lockfile[MAXPATHLEN], *err, *space, *target; in mk_state_update_exit() local
111 (void) sprintf(lockfile, "%s.lock", depend_file); in mk_state_update_exit()
112 if ((err = file_lock(depend_file, lockfile, 0))) { in mk_state_update_exit()
129 (void) unlink(lockfile); in mk_state_update_exit()
/illumos-gate/usr/src/lib/krb5/kadm5/
H A Dadb.h43 FILE *lockfile; member
108 osa_adb_ret_t osa_adb_create_db(char *filename, char *lockfile, int magic);
109 osa_adb_ret_t osa_adb_destroy_db(char *filename, char *lockfile, int magic);
115 char *lockfile, int magic);
/illumos-gate/usr/src/cmd/ypcmd/yppasswd/
H A Dyplckpwdf.c52 extern char lockfile[];
64 if ((fildes = creat(lockfile, 0600)) == -1) in yplckpwdf()
H A Dyppasswdd.c136 char lockfile[FILENAME_MAX], adjunct_file[FILENAME_MAX]; variable
151 strcpy(lockfile, DEFDIR ".pwd.lock"); in main()
176 strcpy(lockfile, argv[i]); in main()
180 strcat(lockfile, ".pwd.lock"); in main()
185 strcat(lockfile, "/.pwd.lock"); in main()
/illumos-gate/usr/src/cmd/sendmail/libsmutil/
H A Dlockfile.c37 lockfile(fd, filename, ext, type)
H A DMakefile39 OBJS= cf.o debug.o err.o lockfile.o safefile.o snprintf.o
H A Dsafefile.c970 if (!lockfile(fd, filename, NULL, locktype))
/illumos-gate/usr/src/cmd/allocate/
H A Dallocate3.c650 char *lockfile; in lock_dev() local
653 lockfile = DA_DB_LOCK; in lock_dev()
655 lockfile = file; in lock_dev()
662 dprintf("locking %s\n", lockfile); in lock_dev()
665 (lockfd = open(lockfile, O_RDWR | O_CREAT, 0600)) == -1) { in lock_dev()
670 (void) _newdac(lockfile, DA_UID, DA_GID, 0600); in lock_dev()
/illumos-gate/usr/src/cmd/sendmail/src/
H A Dmci.c750 if (!lockfile(sm_io_getinfo(mci->mci_statfile, SM_IO_WHAT_FD, NULL),
880 locked = lockfile(sm_io_getinfo(fp, SM_IO_WHAT_FD, NULL), fname, "",
885 (void) lockfile(sm_io_getinfo(fp, SM_IO_WHAT_FD, NULL), fname,
1331 locked = !lockfile(sm_io_getinfo(fp, SM_IO_WHAT_FD, NULL), pathname,
H A Dalias.c551 !lockfile(sm_io_getinfo(af, SM_IO_WHAT_FD, NULL), map->map_file,
560 (void) lockfile(sm_io_getinfo(af, SM_IO_WHAT_FD, NULL),
H A Dmap.c1628 (void) lockfile(dfd, map->map_file, ".dir", LOCK_UN);
1630 (void) lockfile(pfd, map->map_file, ".pag", LOCK_UN);
1700 (void) lockfile(dfd, map->map_file, ".dir", LOCK_SH);
1710 (void) lockfile(dfd, map->map_file, ".dir", LOCK_UN);
1754 (void) lockfile(dfd, map->map_file, ".dir", LOCK_UN);
2121 if (!lockfile(fd, buf, NULL, mode == O_RDONLY ? LOCK_SH : LOCK_EX))
2246 (void) lockfile(fd, buf, NULL, LOCK_UN);
2351 (void) lockfile(fd, buf, ".db", LOCK_SH);
2359 (void) lockfile(fd, buf, ".db", LOCK_UN);
2444 (void) lockfile(fd, buf, ".db", LOCK_UN);
H A Dqueue.c397 !lockfile(tfd, tf, NULL, LOCK_EX|LOCK_NB) ||
445 if (lockfile(tfd, tf, NULL, LOCK_EX|LOCK_NB))
2705 w->w_lock = !lockfile(sm_io_getinfo(cf, SM_IO_WHAT_FD,
3962 if (!lockfile(sm_io_getinfo(qfp, SM_IO_WHAT_FD, NULL), qf, NULL,
8538 if (!lockfile(fd, tempqf, NULL, LOCK_EX|LOCK_NB))
H A Dsendmail.h2567 extern bool lockfile __P((int, char *, char *, int));
H A Dconf.c3532 lockfile(fd, filename, ext, type) in lockfile() function
/illumos-gate/usr/src/lib/libbsm/common/
H A Ddevalloc.c1179 char *lockfile; in _da_lock_devdb() local
1184 lockfile = DA_DB_LOCK; in _da_lock_devdb()
1189 lockfile = path; in _da_lock_devdb()
1192 if ((lockfd = open(lockfile, O_RDWR | O_CREAT, 0600)) == -1) in _da_lock_devdb()
1209 (void) utime(lockfile, NULL); in _da_lock_devdb()
/illumos-gate/usr/src/lib/libdevinfo/
H A Ddevinfo_devlink.c3079 char lockfile[PATH_MAX]; in enter_db_lock() local
3087 get_db_path(hdp, DB_LOCK, lockfile, sizeof (lockfile)); in enter_db_lock()
3095 again: if ((fd = open(lockfile, in enter_db_lock()
/illumos-gate/usr/src/tools/scripts/
H A Dnightly1153 [ -z "$lockfile" ] || staffer rm -f $lockfile