Changeset 5160:efd742a8d396 in roaraudio
- Timestamp:
- 10/16/11 16:05:08 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/roard.c
r5146 r5160 2418 2418 ROAR_ERR("Can not clear supplementary group IDs: %s", strerror(errno)); 2419 2419 } 2420 if ( !grp|| setgid(grp->gr_gid) == -1 ) {2420 if ( grp == NULL || setgid(grp->gr_gid) == -1 ) { 2421 2421 ROAR_ERR("Can not set GroupID: %s", strerror(errno)); 2422 2422 } … … 2498 2498 } 2499 2499 #if defined(ROAR_HAVE_SETGID) && defined(ROAR_HAVE_SETUID) && defined(ROAR_HAVE_IO_POSIX) 2500 if ( pwd || grp) {2501 if ( chown(pidfile, pwd ? pwd->pw_uid : -1, grp? grp->gr_gid : -1) == -1 ) {2500 if ( pwd != NULL || grp != NULL ) { 2501 if ( chown(pidfile, pwd != NULL ? pwd->pw_uid : -1, grp != NULL ? grp->gr_gid : -1) == -1 ) { 2502 2502 ROAR_WARN("Can not change ownership of pidfile: %s: %s", pidfile, strerror(errno)); 2503 2503 } … … 2529 2529 return 1; 2530 2530 } 2531 if ( !pwd|| setuid(pwd->pw_uid) == -1 ) {2531 if ( pwd == NULL || setuid(pwd->pw_uid) == -1 ) { 2532 2532 ROAR_ERR("Can not set UserID: %s", strerror(errno)); 2533 2533 return 3;
Note: See TracChangeset
for help on using the changeset viewer.