diff -u ./source3/registry/reg_api.c.orig ./source3/registry/reg_api.c --- ./source3/registry/reg_api.c.orig 2010-05-17 06:51:23.000000000 -0500 +++ ./source3/registry/reg_api.c 2010-05-26 14:36:46.000000000 -0500 @@ -953,7 +953,11 @@ /* open the registry file....fail if the file already exists */ regfile = regfio_open(fname, (O_RDWR|O_CREAT|O_EXCL), +#if defined(S_IRUSR) && defined(S_IWUSR) + (S_IRUSR|S_IWUSR)); +#else (S_IREAD|S_IWRITE)); +#endif if (regfile == NULL) { DEBUG(0,("backup_registry_key: failed to open \"%s\" (%s)\n", fname, strerror(errno) )); diff -u ./source3/utils/net_rpc_registry.c.orig ./source3/utils/net_rpc_registry.c --- ./source3/utils/net_rpc_registry.c.orig 2010-05-17 06:51:23.000000000 -0500 +++ ./source3/utils/net_rpc_registry.c 2010-05-26 09:13:51.000000000 -0500 @@ -1150,7 +1150,11 @@ d_printf(_("ok\n")); d_printf(_("Opening %s...."), argv[1]); +#if defined(S_IRUSR) && defined(S_IWUSR) + if ( !(outfile = regfio_open( argv[1], (O_RDWR|O_CREAT|O_TRUNC), (S_IRUSR|S_IWUSR) )) ) { +#else if ( !(outfile = regfio_open( argv[1], (O_RDWR|O_CREAT|O_TRUNC), (S_IREAD|S_IWRITE) )) ) { +#endif d_fprintf(stderr, _("Failed to open %s for writing\n"),argv[1]); goto out; } diff -u ./source3/utils/profiles.c.orig ./source3/utils/profiles.c --- ./source3/utils/profiles.c.orig 2010-05-17 06:51:23.000000000 -0500 +++ ./source3/utils/profiles.c 2010-05-26 09:16:24.000000000 -0500 @@ -275,7 +275,11 @@ exit (1); } +#if defined(S_IRUSR) && defined(S_IWUSR) + if ( !(outfile = regfio_open( new_filename, (O_RDWR|O_CREAT|O_TRUNC), (S_IRUSR|S_IWUSR) )) ) { +#else if ( !(outfile = regfio_open( new_filename, (O_RDWR|O_CREAT|O_TRUNC), (S_IREAD|S_IWRITE) )) ) { +#endif fprintf( stderr, "Failed to open new file %s!\n", new_filename ); fprintf( stderr, "Error was (%s)\n", strerror(errno) ); exit (1);