vfstest: set umask(0) in vfstest
authorAndrew Bartlett <abartlet@samba.org>
Fri, 26 Oct 2012 03:23:39 +0000 (14:23 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 26 Oct 2012 08:07:01 +0000 (10:07 +0200)
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Oct 26 10:07:03 CEST 2012 on sn-devel-104

source3/torture/vfstest.c

index 72156a5752bab08f85eebf096799dcafb079ce41..dd3787b658bd0fce25d2309a174c251d64930f74 100644 (file)
@@ -34,6 +34,7 @@
 #include "messages.h"
 #include "libcli/security/security.h"
 #include "lib/smbd_shim.h"
+#include "system/filesys.h"
 
 /* List to hold groups of commands */
 static struct cmd_list {
@@ -483,6 +484,10 @@ int main(int argc, char *argv[])
 
        poptFreeContext(pc);
 
+       /* we want total control over the permissions on created files,
+          so set our umask to 0 */
+       umask(0);
+
        lp_load_initial_only(get_dyn_CONFIGFILE());
 
        /* TODO: check output */