diff options
| author | Juanma Barranquero | 2007-06-14 10:01:04 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2007-06-14 10:01:04 +0000 |
| commit | 10aabbf959dd7d654bded66e2a70d56b922e79c6 (patch) | |
| tree | 95daabf6271b666d9a3175a7b63a833e27ce7ecf /src | |
| parent | 94d9d20c6d48013a2d8d24b4038902412948668d (diff) | |
| download | emacs-10aabbf959dd7d654bded66e2a70d56b922e79c6.tar.gz emacs-10aabbf959dd7d654bded66e2a70d56b922e79c6.zip | |
(init_user_info): Fix weird formatting not following GNU coding guidelines.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32.c | 28 |
1 files changed, 12 insertions, 16 deletions
| @@ -486,20 +486,16 @@ init_user_info () | |||
| 486 | the user-sid as the user id value (same for group id using the | 486 | the user-sid as the user id value (same for group id using the |
| 487 | primary group sid from the process token). */ | 487 | primary group sid from the process token). */ |
| 488 | 488 | ||
| 489 | char user_sid[256], name[256], domain[256]; | 489 | char user_sid[256], name[256], domain[256]; |
| 490 | DWORD length = sizeof (name), dlength = sizeof (domain), trash; | 490 | DWORD length = sizeof (name), dlength = sizeof (domain), trash; |
| 491 | HANDLE token = NULL; | 491 | HANDLE token = NULL; |
| 492 | SID_NAME_USE user_type; | 492 | SID_NAME_USE user_type; |
| 493 | 493 | ||
| 494 | if ( | 494 | if (open_process_token (GetCurrentProcess (), TOKEN_QUERY, &token) |
| 495 | open_process_token (GetCurrentProcess (), TOKEN_QUERY, &token) | 495 | && get_token_information (token, TokenUser, |
| 496 | && get_token_information ( | 496 | (PVOID) user_sid, sizeof (user_sid), &trash) |
| 497 | token, TokenUser, | 497 | && lookup_account_sid (NULL, *((PSID *) user_sid), name, &length, |
| 498 | (PVOID) user_sid, sizeof (user_sid), &trash) | 498 | domain, &dlength, &user_type)) |
| 499 | && lookup_account_sid ( | ||
| 500 | NULL, *((PSID *) user_sid), name, &length, | ||
| 501 | domain, &dlength, &user_type) | ||
| 502 | ) | ||
| 503 | { | 499 | { |
| 504 | strcpy (the_passwd.pw_name, name); | 500 | strcpy (the_passwd.pw_name, name); |
| 505 | /* Determine a reasonable uid value. */ | 501 | /* Determine a reasonable uid value. */ |
| @@ -524,7 +520,7 @@ init_user_info () | |||
| 524 | 520 | ||
| 525 | /* Get group id */ | 521 | /* Get group id */ |
| 526 | if (get_token_information (token, TokenPrimaryGroup, | 522 | if (get_token_information (token, TokenPrimaryGroup, |
| 527 | (PVOID) user_sid, sizeof (user_sid), &trash)) | 523 | (PVOID) user_sid, sizeof (user_sid), &trash)) |
| 528 | { | 524 | { |
| 529 | SID_IDENTIFIER_AUTHORITY * pSIA; | 525 | SID_IDENTIFIER_AUTHORITY * pSIA; |
| 530 | 526 | ||
| @@ -541,7 +537,7 @@ init_user_info () | |||
| 541 | } | 537 | } |
| 542 | } | 538 | } |
| 543 | /* If security calls are not supported (presumably because we | 539 | /* If security calls are not supported (presumably because we |
| 544 | are running under Windows 95), fallback to this. */ | 540 | are running under Windows 95), fallback to this. */ |
| 545 | else if (GetUserName (name, &length)) | 541 | else if (GetUserName (name, &length)) |
| 546 | { | 542 | { |
| 547 | strcpy (the_passwd.pw_name, name); | 543 | strcpy (the_passwd.pw_name, name); |