summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMatt McCutchen <matt@mattmccutchen.net>2010-02-01 13:29:39 -0500
committerWayne Davison <wayned@samba.org>2010-04-24 09:28:58 -0700
commit9a54a640f74dcaeb03ef99799a5320b3eb77f7ec (patch)
treefb3771462e84532dad9390f98aca2090600f9665 /main.c
parent58a79f4b44593996e53a9bfc94b56006ea86c2ec (diff)
downloadrsync-9a54a640f74dcaeb03ef99799a5320b3eb77f7ec.tar.gz
Don't set the umask to 0 any more: it's ugly and pointless.
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.c b/main.c
index 4f3729e8..66412916 100644
--- a/main.c
+++ b/main.c
@@ -1521,9 +1521,10 @@ int main(int argc,char *argv[])
exit_cleanup(RERR_SYNTAX);
}
- /* we set a 0 umask so that correct file permissions can be
- * carried across */
- orig_umask = umask(0);
+ /* Get the umask for use in permission calculations. We no longer set
+ * it to zero; that is ugly and pointless now that all the callers that
+ * relied on it have been reeducated to work with default ACLs. */
+ umask(orig_umask = umask(0));
#if defined CONFIG_LOCALE && defined HAVE_SETLOCALE
setlocale(LC_CTYPE, "");