Changeset 1782:95be6b012d32 in roaraudio for roarclients
- Timestamp:
- 05/19/09 20:23:17 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r1781 r1782 24 24 25 25 #include <roaraudio.h> 26 27 #if defined(ROAR_HAVE_SETGID) && defined(ROAR_HAVE_SETUID) 28 #define _POSIX_USERS 29 #endif 30 31 #ifdef _POSIX_USERS 26 32 #include <pwd.h> 27 33 #include <grp.h> 34 #endif 35 28 36 #include <sys/time.h> 29 37 #include <time.h> … … 184 192 int id[ROAR_CLIENTS_MAX]; 185 193 struct roar_client c; 194 #ifdef _POSIX_USERS 186 195 struct group * grp = NULL; 187 196 struct passwd * pwd = NULL; 197 #endif 188 198 189 199 if ( (num = roar_list_clients(con, id, ROAR_CLIENTS_MAX)) == -1 ) { … … 201 211 printf("Player PID : %i(%s)\n", c.pid, proc_name(c.pid)); 202 212 if ( c.uid != -1 ) { 213 #ifdef _POSIX_USERS 203 214 pwd = getpwuid(c.uid); 204 215 grp = getgrgid(c.gid); 205 216 printf("Player UID/GID : %i(%s)/%i(%s)\n", c.uid, pwd ? pwd->pw_name : "?", c.gid, grp ? grp->gr_name : "?"); 217 #else 218 printf("Player UID/GID : %i/%i\n", c.uid, c.gid); 219 #endif 206 220 } 207 221 if ( c.execed != -1 )
Note: See TracChangeset
for help on using the changeset viewer.