aboutsummaryrefslogtreecommitdiff
path: root/src/lock.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-04-13 21:50:15 +0300
committerSergey Poznyakoff <gray@gnu.org>2020-04-13 22:32:40 +0300
commit2f3ec2402f827066cb55ae562154106433d29ac2 (patch)
tree87e650e32e90da305478c17e1e9730932e4e3c50 /src/lock.c
parenta9d38e5de5cceb667bec3db15fed68f7e8d96a8b (diff)
downloadwydawca-2f3ec2402f827066cb55ae562154106433d29ac2.tar.gz
wydawca-2f3ec2402f827066cb55ae562154106433d29ac2.tar.bz2
Rewrite diskio function so as not to assume any particular cwd
* src/backup.c (get_backup_suffix) (find_backup_file_name): Get directory descriptor as first argument. * src/diskio.c: Rewrite using *at() functions. * src/gpg.c (rmdir_r): Silently skip ENOENT. (verify_detached_signature): push_dir/pop_dir. * src/triplet.c: Don't change to spool->source_dir. Underlying functions don't assume any specific cwd. * src/wydawca.h (find_backup_file_name) (create_hierarchy): Change signatures. All uses changed. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise. (AT_WYDAWCA_DAEMON): Take additional argument. * tests/inotify-rmsymlink.at: New test. * tests/inotify-symlink.at: New test. * tests/rmsymlink00.at: New test. * tests/symlink00.at: New test. * tests/symlink01.at: New test. * tests/dist/rmsymlink.directive.asc: New directive file. * tests/dist/symlink.directive.asc: New directive file.
Diffstat (limited to 'src/lock.c')
-rw-r--r--src/lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lock.c b/src/lock.c
index 8f8127e..f2ed532 100644
--- a/src/lock.c
+++ b/src/lock.c
@@ -269,7 +269,7 @@ wydawca_lock_init()
if (enable_locking) {
if (!lockdir)
lockdir = grecs_strdup(LOCALSTATEDIR "/lock/" PACKAGE);
- if (create_hierarchy(lockdir, 0))
+ if (create_hierarchy(AT_FDCWD, lockdir))
exit(EX_OSFILE);
}
}

Return to:

Send suggestions and report system problems to the System administrator.