Changeset 24512 in vbox
- Timestamp:
- Nov 9, 2009 3:37:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r24506 r24512 192 192 193 193 #ifdef RT_OS_WINDOWS 194 #ifndef TARGET_NT4194 # ifndef TARGET_NT4 195 195 PLUID pSessions = NULL; 196 196 ULONG ulCount = 0; … … 235 235 236 236 ::LsaFreeReturnBuffer(pSessions); 237 #endif /* TARGET_NT4 */237 # endif /* TARGET_NT4 */ 238 238 #elif defined(RT_OS_FREEBSD) 239 239 /** @todo FreeBSD: Port logged on user info retrival. */ … … 241 241 /** @todo OS/2: Port logged on (LAN/local/whatever) user info retrival. */ 242 242 #else 243 utmp* ut_user;244 243 rc = utmpname(UTMP_FILE); 245 #ifdef RT_OS_SOLARIS246 if (rc == 0)247 #else244 # ifdef RT_OS_SOLARIS 245 if (rc != 1) 246 # else 248 247 if (rc != 0) 249 #endif /* !RT_OS_SOLARIS */ 248 # endif 250 249 { 251 250 VBoxServiceError("Could not set UTMP file! Error: %ld\n", errno); 252 251 } 253 252 setutent(); 254 while ((ut_user=getutent())) 253 utmp *ut_user; 254 while ((ut_user = getutent())) 255 255 { 256 256 /* Make sure we don't add user names which are not 257 257 * part of type USER_PROCESS and don't add same users twice. */ 258 if ( (ut_user->ut_type == USER_PROCESS)259 && (strstr(szUserList, ut_user->ut_user) == NULL))258 if ( ut_user->ut_type == USER_PROCESS 259 && strstr(szUserList, ut_user->ut_user) == NULL) 260 260 { 261 /** @todo Do we really want to filter out double user names? (Same user logged in twice) */ 261 /** @todo Do we really want to filter out double user names? (Same user logged in twice) 262 * bird: If we do, then we must add checks for buffer overflows here! */ 263 /** @todo r=bird: strstr will filtering out users with similar names. For 264 * example: smith, smithson, joesmith and bobsmith */ 262 265 if (uiUserCount > 0) 263 266 strcat(szUserList, ",");
Note:
See TracChangeset
for help on using the changeset viewer.

