The Samba-Bugzilla – Attachment 5754 Details for
Bug 7470
Improper use of S_IREAD and S_IWRITE
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
samba-3.5.3-bug7470.diff (text/plain), 1.85 KB, created by
Joachim Schmitz (mail address dead)
on 2010-06-01 04:14:53 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Joachim Schmitz (mail address dead)
Created:
2010-06-01 04:14:53 UTC
Size:
1.85 KB
patch
obsolete
>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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7470
: 5754 |
5983