Changeset 2757:c5621a2329a7 in roaraudio
- Timestamp:
- 09/22/09 23:55:45 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/roard.c
r2756 r2757 1511 1511 #endif 1512 1512 1513 #if defined(ROAR_HAVE_SETUID) && defined(ROAR_HAVE_IO_POSIX) 1514 // early test for UID as we need this for the pidfile and the setuid() 1515 if ( sock_user != NULL ) { 1516 if ( (pwd = getpwnam(sock_user)) == NULL ) { 1517 ROAR_ERR("Can not get UID for user %s: %s", sock_user, strerror(errno)); 1518 return 1; 1519 } 1520 } 1521 #endif 1522 1513 1523 #ifdef SUPPORT_PIDFILE 1514 1524 if ( pidfile != NULL ) { … … 1541 1551 return 1; 1542 1552 } 1543 if ( (pwd = getpwnam(sock_user)) == NULL ) {1544 ROAR_ERR("Can not get UID for user %s: %s", sock_user, strerror(errno));1545 return 1;1546 }1547 1553 if ( !pwd || setuid(pwd->pw_uid) == -1 ) { 1548 1554 ROAR_ERR("Can not set UserID: %s", strerror(errno));
Note: See TracChangeset
for help on using the changeset viewer.