diff options
author | Richard Jones <rjones@redhat.com> | 2009-11-25 14:56:42 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-11-25 16:28:26 +0000 |
commit | ea99d9ec56e52758ea0d9f01a605fbc51ec95fba (patch) | |
tree | cab70169edf799c037a00b187cffc5424414b3fc /daemon/guestfsd.c | |
parent | 33bc8fb6d25143ebba54f34c8ea6f5841a71f3e5 (diff) | |
download | libguestfs-ea99d9ec56e52758ea0d9f01a605fbc51ec95fba.tar.gz libguestfs-ea99d9ec56e52758ea0d9f01a605fbc51ec95fba.tar.xz libguestfs-ea99d9ec56e52758ea0d9f01a605fbc51ec95fba.zip |
daemon/Win32: Windows replacement for umask.
Diffstat (limited to 'daemon/guestfsd.c')
-rw-r--r-- | daemon/guestfsd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 64cf87fc..40b3c2f3 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -182,8 +182,16 @@ main (int argc, char *argv[]) setenv ("SHELL", "/bin/sh", 1); setenv ("LC_ALL", "C", 1); +#ifndef WIN32 /* We document that umask defaults to 022 (it should be this anyway). */ umask (022); +#else + /* This is the default for Windows anyway. It's not even clear if + * Windows ever uses this -- the MSDN documentation for the function + * contains obvious errors. + */ + _umask (0); +#endif /* Get the vmchannel string. * |