Changeset 445:98a28217dc32 in roaraudio
- Timestamp:
- 08/12/08 01:16:32 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r438 r445 2 2 3 3 #include <roaraudio.h> 4 #include <pwd.h> 5 #include <grp.h> 6 4 7 5 8 int display_mixer (struct roar_connection * con, int stream); … … 66 69 int id[ROAR_CLIENTS_MAX]; 67 70 struct roar_client c; 71 struct group * grp = NULL; 72 struct passwd * pwd = NULL; 68 73 69 74 if ( (num = roar_list_clients(con, id, ROAR_CLIENTS_MAX)) == -1 ) { … … 80 85 printf("Player name : %s\n", c.name); 81 86 printf("Player PID : %i\n", c.pid); 82 if ( c.uid != -1 ) 83 printf("Player UID/GID : %i/%i\n", c.uid, c.gid); 87 if ( c.uid != -1 ) { 88 pwd = getpwuid(c.uid); 89 grp = getgrgid(c.gid); 90 printf("Player UID/GID : %i(%s)/%i(%s)\n", c.uid, pwd ? pwd->pw_name : "?", c.gid, grp ? grp->gr_name : "?"); 91 } 84 92 if ( c.execed != -1 ) 85 93 printf("Execed stream : %i\n", c.execed);
Note: See TracChangeset
for help on using the changeset viewer.