This repository has been archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #103
- Loading branch information
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// code: 1 | ||
struct s { | ||
int i, j; | ||
} my_s, *my_sp = &my_s; | ||
int main() { | ||
return my_sp->j = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// code: 1 | ||
typedef unsigned int __uid_t; | ||
extern __uid_t getuid (void) ; | ||
|
||
struct passwd { | ||
char *pw_name; | ||
char *pw_passwd; | ||
}; | ||
|
||
extern struct passwd *getpwuid (__uid_t __uid); | ||
extern int puts (const char *__s); | ||
|
||
int main(void) { | ||
return puts(getpwuid(getuid())->pw_name) >= 0; | ||
} |