diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32.c | 18 |
1 files changed, 16 insertions, 2 deletions
| @@ -628,13 +628,27 @@ request_sigio (void) | |||
| 628 | int | 628 | int |
| 629 | getuid () | 629 | getuid () |
| 630 | { | 630 | { |
| 631 | return 0; | 631 | char buffer[256]; |
| 632 | int size = 256; | ||
| 633 | |||
| 634 | if (!GetUserName (buffer, &size)) | ||
| 635 | /* Assume all powers upon failure. */ | ||
| 636 | return 0; | ||
| 637 | |||
| 638 | if (!stricmp ("administrator", buffer)) | ||
| 639 | return 0; | ||
| 640 | else | ||
| 641 | /* A complete fabrication...is there anything to base it on? */ | ||
| 642 | return 123; | ||
| 632 | } | 643 | } |
| 633 | 644 | ||
| 634 | int | 645 | int |
| 635 | geteuid () | 646 | geteuid () |
| 636 | { | 647 | { |
| 637 | return 0; | 648 | /* I could imagine arguing for checking to see whether the user is |
| 649 | in the Administrators group and returning a UID of 0 for that | ||
| 650 | case, but I don't know how wise that would be in the long run. */ | ||
| 651 | return getuid (); | ||
| 638 | } | 652 | } |
| 639 | 653 | ||
| 640 | /* Remove all CR's that are followed by a LF. | 654 | /* Remove all CR's that are followed by a LF. |