[dovecot-cvs] dovecot/src/master auth-process.c,1.56,1.57

cras at procontrol.fi cras at procontrol.fi
Wed Jun 23 17:50:49 EEST 2004


Update of /home/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv1498/master

Modified Files:
	auth-process.c 
Log Message:
don't change our umask permanently



Index: auth-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/auth-process.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- auth-process.c	16 Jun 2004 02:04:02 -0000	1.56
+++ auth-process.c	23 Jun 2004 14:50:47 -0000	1.57
@@ -385,6 +385,7 @@
 {
 	struct auth_process_group *group;
 	const char *path;
+	mode_t old_umask;
 
 	group = i_new(struct auth_process_group, 1);
 	group->set = auth_set;
@@ -393,9 +394,11 @@
 	path = t_strconcat(auth_set->parent->defaults->login_dir, "/",
 			   auth_set->name, NULL);
 	(void)unlink(path);
-        (void)umask(0117); /* we want 0660 mode for the socket */
 
+	old_umask = umask(0117); /* we want 0660 mode for the socket */
 	group->listen_fd = net_listen_unix(path);
+	umask(old_umask);
+
 	if (group->listen_fd < 0)
 		i_fatal("Can't listen in UNIX socket %s: %m", path);
 	net_set_nonblock(group->listen_fd, TRUE);



More information about the dovecot-cvs mailing list