diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-05-24 21:43:08 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-05-24 21:43:08 +0000 |
commit | e565720aadd79ad42f8bac7a5d9aab1a7ad2e5a7 (patch) | |
tree | 788463960ee09cb66c50aa1159b91042773341bf /cpukit/libcsupport/src/getpwent.c | |
parent | 2000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es> (diff) | |
download | rtems-e565720aadd79ad42f8bac7a5d9aab1a7ad2e5a7.tar.bz2 |
2000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es>
* libc/ttyname.c (ttyname_r): Removed duplicate call to closedir().
* libc/getpwent.c: Create a more robust /etc/passwd and /etc/group.
* libc/base_fs.c: Change permissions of files and directories. Now uses
octal constants.
Diffstat (limited to 'cpukit/libcsupport/src/getpwent.c')
-rw-r--r-- | cpukit/libcsupport/src/getpwent.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpukit/libcsupport/src/getpwent.c b/cpukit/libcsupport/src/getpwent.c index d749e74f83..7b56e26228 100644 --- a/cpukit/libcsupport/src/getpwent.c +++ b/cpukit/libcsupport/src/getpwent.c @@ -57,7 +57,7 @@ void init_etc_passwd_group(void) return; etc_passwd_initted = 1; - (void) mkdir( "/etc", S_IRWXU | S_IRWXG | S_IRWXO ); + (void) mkdir( "/etc", 0777); /* * Initialize /etc/passwd @@ -66,8 +66,9 @@ void init_etc_passwd_group(void) if ((fp = fopen ("/etc/passwd", "w")) == NULL) return; - fprintf( fp, "root:*:0:0:root,,,,:/tmp:/bin/false\n" - "rtems:*:1:1:RTEMS Application,,,,:/tmp:/bin/false\n" ); + fprintf( fp, "root:*:0:0:root,,,,:/:/bin/sh\n" + "rtems:*:1:1:RTEMS Application,,,,:/:/bin/sh\n" + "tty:!:2:2:tty owner,,,,:/:/bin/false\n" ); fclose( fp ); @@ -78,8 +79,9 @@ void init_etc_passwd_group(void) if ((fp = fopen ("/etc/group", "w")) == NULL) return; - fprintf( fp, "root::0:root\n" - "rtems::0:rtems\n" ); + fprintf( fp, "root:x:0:root\n" + "rtems:x:1:rtems\n" + "tty:x:2:tty\n" ); fclose( fp ); } |