The Samba-Bugzilla – Attachment 5983 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 for 3.5
0001-s3-Fix-bug-7470.patch (text/plain), 2.21 KB, created by
Volker Lendecke
on 2010-09-25 13:08:07 UTC
(
hide
)
Description:
Patch for 3.5
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2010-09-25 13:08:07 UTC
Size:
2.21 KB
patch
obsolete
>From 85edb48c9297f76357d752641bcea5be2a1396a6 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Sat, 25 Sep 2010 10:56:58 -0700 >Subject: [PATCH] s3: Fix bug 7470 > >S_IREAD and S_IWRITE are not standard. > >Thanks to Joachim Schmitz <schmitz@hp.com> for reporting! >--- > source3/registry/reg_api.c | 2 +- > source3/utils/net_rpc_registry.c | 3 ++- > source3/utils/profiles.c | 3 ++- > 3 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c >index 9aff4b0..b02481e 100644 >--- a/source3/registry/reg_api.c >+++ b/source3/registry/reg_api.c >@@ -953,7 +953,7 @@ static WERROR backup_registry_key(struct registry_key_handle *krecord, > /* open the registry file....fail if the file already exists */ > > regfile = regfio_open(fname, (O_RDWR|O_CREAT|O_EXCL), >- (S_IREAD|S_IWRITE)); >+ (S_IRUSR|S_IWUSR)); > if (regfile == NULL) { > DEBUG(0,("backup_registry_key: failed to open \"%s\" (%s)\n", > fname, strerror(errno) )); >diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c >index fb9d80b..8f1a10d 100644 >--- a/source3/utils/net_rpc_registry.c >+++ b/source3/utils/net_rpc_registry.c >@@ -1150,7 +1150,8 @@ static int rpc_registry_copy(struct net_context *c, int argc, const char **argv > d_printf(_("ok\n")); > > d_printf(_("Opening %s...."), argv[1]); >- if ( !(outfile = regfio_open( argv[1], (O_RDWR|O_CREAT|O_TRUNC), (S_IREAD|S_IWRITE) )) ) { >+ if ( !(outfile = regfio_open( argv[1], (O_RDWR|O_CREAT|O_TRUNC), >+ (S_IRUSR|S_IWUSR) )) ) { > d_fprintf(stderr, _("Failed to open %s for writing\n"),argv[1]); > goto out; > } >diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c >index 0dc9aca..eeaf2d2 100644 >--- a/source3/utils/profiles.c >+++ b/source3/utils/profiles.c >@@ -275,7 +275,8 @@ int main( int argc, char *argv[] ) > exit (1); > } > >- if ( !(outfile = regfio_open( new_filename, (O_RDWR|O_CREAT|O_TRUNC), (S_IREAD|S_IWRITE) )) ) { >+ if ( !(outfile = regfio_open( new_filename, (O_RDWR|O_CREAT|O_TRUNC), >+ (S_IRUSR|S_IWUSR) )) ) { > fprintf( stderr, "Failed to open new file %s!\n", new_filename ); > fprintf( stderr, "Error was (%s)\n", strerror(errno) ); > exit (1); >-- >1.6.5.7 >
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
Flags:
obnox
:
review+
Actions:
View
Attachments on
bug 7470
:
5754
| 5983