Changeset 19514 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- May 8, 2009 8:33:19 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r19513 r19514 221 221 #else 222 222 utmp* ut_user; 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 223 rc = utmpname(UTMP_FILE); 224 if (rc != 0) 225 { 226 VBoxServiceError("Could not set UTMP file! Error: %ld", errno); 227 } 228 setutent(); 229 while ((ut_user=getutent())) 230 { 231 /* Make sure we don't add user names which are not 232 * part of type USER_PROCESS and don't add same users twice. */ 233 if ( (ut_user->ut_type == USER_PROCESS) 234 && (strstr(szUserList, ut_user->ut_user) == NULL)) 235 { 236 if (uiUserCount > 0) 237 strcat(szUserList, ","); 238 strcat(szUserList, ut_user->ut_user); 239 uiUserCount++; 240 } 241 } 242 endutent(); 243 243 #endif /* !RT_OS_WINDOWS */ 244 244
Note:
See TracChangeset
for help on using the changeset viewer.