Changeset 5586:5b82b3417705 in roaraudio for roard/roard.c
- Timestamp:
- 07/22/12 02:24:07 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/roard.c
r5577 r5586 909 909 if ( *addr == '/' ) { 910 910 if ( grp != NULL || pwd != NULL ) { 911 if ( chown(addr, pwd != NULL ? pwd->pw_uid : -1, grp != NULL ? grp->gr_gid :-1) == -1 )911 if ( chown(addr, pwd != NULL ? pwd->pw_uid : (uid_t)-1, grp != NULL ? grp->gr_gid : (gid_t)-1) == -1 ) 912 912 return -1; 913 913 } … … 1242 1242 // SLP: 1243 1243 void register_slp_callback(SLPHandle hslp, SLPError errcode, void * cookie) { 1244 (void)hslp; 1244 1245 /* return the error code in the cookie */ 1245 1246 *(SLPError*)cookie = errcode; … … 1374 1375 i = 0; 1375 1376 1376 if ( trust_uid != -1 )1377 if ( trust_uid != (uid_t)-1 ) 1377 1378 key->trust.uids[i++] = trust_uid; 1378 1379 … … 1386 1387 i = 0; 1387 1388 1388 if ( trust_gid != -1 )1389 if ( trust_gid != (gid_t)-1 ) 1389 1390 key->trust.gids[i++] = trust_gid; 1390 1391 … … 2605 2606 #if defined(ROAR_HAVE_SETGID) && defined(ROAR_HAVE_SETUID) && defined(ROAR_HAVE_IO_POSIX) 2606 2607 if ( pwd != NULL || grp != NULL ) { 2607 if ( chown(pidfile, pwd != NULL ? pwd->pw_uid : -1, grp != NULL ? grp->gr_gid :-1) == -1 ) {2608 if ( chown(pidfile, pwd != NULL ? pwd->pw_uid : (uid_t)-1, grp != NULL ? grp->gr_gid : (gid_t)-1) == -1 ) { 2608 2609 ROAR_WARN("Can not change ownership of pidfile: %s: %s", pidfile, strerror(errno)); 2609 2610 }
Note: See TracChangeset
for help on using the changeset viewer.