S_IREAD and S_IWRITE are not standard.
Thanks to Joachim Schmitz <schmitz@hp.com> for reporting!
/* 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) ));
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;
}
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);