diff options
Diffstat (limited to 'dev-libs/cyrus-sasl/files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch')
-rw-r--r-- | dev-libs/cyrus-sasl/files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch new file mode 100644 index 000000000000..a80ca0639690 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch @@ -0,0 +1,24 @@ +Author: Sam Hocevar <sam@zoy.org> +Description: pid_file_lock is created with a mask of 644 instead of 0644. This +patch fixes this octal/decimal confusion as well as the (harmless) one in the +previous umask() call. +--- trunk.orig/saslauthd/saslauthd-main.c ++++ trunk/saslauthd/saslauthd-main.c +@@ -276,7 +276,7 @@ + exit(1); + } + +- umask(077); ++ umask(0077); + + pid_file_size = strlen(run_path) + sizeof(PID_FILE_LOCK) + 1; + if ((pid_file_lock = malloc(pid_file_size)) == NULL) { +@@ -287,7 +287,7 @@ + strlcpy(pid_file_lock, run_path, pid_file_size); + strlcat(pid_file_lock, PID_FILE_LOCK, pid_file_size); + +- if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 644)) < 0) { ++ if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) { + rc = errno; + logger(L_ERR, L_FUNC, "could not open pid lock file: %s", pid_file_lock); + logger(L_ERR, L_FUNC, "open: %s", strerror(rc)); |