Package: cyrus-sasl2
Version: 2.1.22.dfsg1
Severity: normal
Tags: upstream patch

   Hi there,

   pid_file_lock is created with a mask of 644 instead of 0644. Attached
patch fixes this octal/decimal confusion as well as the (harmless) one
in the previous umask() call.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (50, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.20.1 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- cyrus-sasl2-2.1.22.dfsg1/saslauthd/saslauthd-main.c.old	2007-06-25 21:31:36 +0200
+++ cyrus-sasl2-2.1.22.dfsg1/saslauthd/saslauthd-main.c	2007-06-25 21:31:58 +0200
@@ -276,7 +276,7 @@ int main(int argc, char **argv) {
 		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 @@ int main(int argc, char **argv) {
 	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));

Reply via email to