(fill-in-the-blank) : missing modes on O_CREAT opens
PATCH 1/1 (fill-in-the-blank) : missing modes on O_CREAT opens
F8 now refuses to build anything that does an open("foo", O_CREAT); with no mode specified... Vlad, could you please fill in the /* mode */ blanks below? :) I think I caught them all...
Thanks,
-Eric
inventory/inv_fstab.c +1 -1
@@ -96,7 +96,7 @@ fstab_put_entry( uuid_t *fsidp, char *mnif ( errno !=ENOENT ) {return -1 ; } -if ((fd =open (INV_FSTAB ,INV_OFLAG (forwhat) |O_CREAT )) + if ((fd = open( INV_FSTAB, INV_OFLAG(forwhat) | O_CREAT, /* mode */ )) <0 ) {INV_PERROR (INV_FSTAB );return -1 ;
inventory/inv_idx.c +1 -1
@@ -257,7 +257,7 @@ idx_create( char *fname, inv_oflag_t forthe db for SEARCH_ONLY. */ ASSERT ( forwhat !=INV_SEARCH_ONLY ); -if ((fd =open ( fname ,INV_OFLAG (forwhat) |O_CREAT ) ) <0 ) { + if ((fd = open ( fname , INV_OFLAG(forwhat) | O_CREAT, /* mode */ ) ) < 0 ) {INV_PERROR ( fname );return INV_TOKEN_NULL ; }
inventory/inv_mgr.c +1 -1
@@ -692,7 +692,7 @@ invmgr_lockinit( void ) {if ( invlock_fd ==-1 ) {if (( invlock_fd =open (INV_LOCKFILE , -O_RDONLY |O_CREAT )) <0 ) { + O_RDONLY | O_CREAT, /* mode */ )) < 0 ) {INV_PERROR (INV_LOCKFILE );return BOOL_FALSE ; }
inventory/inv_oref.c +1 -1
@@ -429,7 +429,7 @@ oref_resolve_new_invidx(int stobjfd, fd;inv_idbtoken_t tok; -if ((fd =open ( fname ,O_RDWR |O_CREAT ) ) <0 ) { + if ((fd = open ( fname , O_RDWR | O_CREAT, /* mode */ ) ) < 0 ) {INV_PERROR ( fname );return INV_ERR ; }
inventory/inv_stobj.c +2 -2
@@ -527,7 +527,7 @@ stobj_create( char *fname )#endif /* create the new storage object */ -if (( fd =open ( fname,INV_OFLAG (forwhat) |O_EXCL |O_CREAT )) <0 ) { + if (( fd = open( fname, INV_OFLAG(forwhat) | O_EXCL | O_CREAT, /* mode */ )) < 0 ) {INV_PERROR ( fname );memset ( fname,0 ,INV_STRLEN );return -1 ;
@@ -1083,7 +1083,7 @@ stobj_unpack_sessinfo(#ifdef INVT_DELETION { -int tmpfd =open ("moids" ,O_RDWR |O_CREAT ); + int tmpfd = open( "moids", O_RDWR | O_CREAT, /* mode */ );u_int j;invt_mediafile_t *mmf = s->mfiles;for (i=0 ; i< s->ses->s_cur_nstreams; i++ ) {
invutil/invidx.c +2 -2
@@ -275,7 +275,7 @@ invidx_commit(WINDOW *win, node_t *currereturn 0 ; } - new_fd =open (dst_idxfile,O_CREAT |O_RDWR ); + new_fd = open(dst_idxfile, O_CREAT|O_RDWR, /* mode */);if (new_fd <0 ) {put_error ("Error: unable to open inventory index file" );return 0 ;
@@ -616,7 +616,7 @@ stobj_create( char *fname )invt_sescounter_t sescnt;/* create the new storage object */ -if (( fd =open ( fname,O_RDWR |O_EXCL |O_CREAT )) <0 ) { + if (( fd = open( fname, O_RDWR | O_EXCL | O_CREAT, /* mode */ )) < 0 ) {return -1 ; }