diff options
author | 2014-05-16 16:48:56 -0500 | |
---|---|---|
committer | 2014-05-16 16:48:56 -0500 | |
commit | c98e4f43b5d6499748a5057134408f4ba4854fb4 (patch) | |
tree | 3c0bc1d79867680784146b690647839ee1f8aca5 | |
parent | c9890aca3a3045e53bb9b7754c80f7ded51e65f6 (diff) | |
download | pseudo-c98e4f43b5d6499748a5057134408f4ba4854fb4.tar.gz pseudo-c98e4f43b5d6499748a5057134408f4ba4854fb4.tar.bz2 pseudo-c98e4f43b5d6499748a5057134408f4ba4854fb4.zip |
Mask 022 back in for database.
PSEUDO_DB_MODE restores a proposed mode's 0700 bits, but now that we're
masking 022 out, it should also restore those. Change it to restore
0722 from a proposed mode before sending to database.
-rw-r--r-- | ChangeLog.txt | 1 | ||||
-rw-r--r-- | pseudo_client.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 347a591..827ff7a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -11,6 +11,7 @@ * (pabigot) Don't memory-leak on checks for PSEUDO_UNLOAD, also check the correct environment when spawning new things. (Contributed by Peter A. Bigot). + * (seebs) mask 022 back in too, when restoring a database mode. 2014-05-15: * (seebs) drop flags when calling fchmodat() to appease GNU tar. diff --git a/pseudo_client.h b/pseudo_client.h index 4663c09..ecb13a6 100644 --- a/pseudo_client.h +++ b/pseudo_client.h @@ -86,5 +86,5 @@ extern int pseudo_nosymlinkexp; * this is a known limitation. */ #define PSEUDO_FS_MODE(mode, isdir) ((((mode) | S_IRUSR | S_IWUSR | ((isdir) ? S_IXUSR : 0)) & ~(S_IWGRP | S_IWOTH)) & ~(S_IWOTH | S_IWGRP)) -#define PSEUDO_DB_MODE(fs_mode, user_mode) (((fs_mode) & ~0700) | ((user_mode & 0700))) +#define PSEUDO_DB_MODE(fs_mode, user_mode) (((fs_mode) & ~0722) | ((user_mode & 0722))) |