Changeset e565720a in rtems
- Timestamp:
- 05/24/01 21:43:08 (23 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- b2712e3
- Parents:
- aaf6063
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libcsupport/src/base_fs.c
raaf6063 re565720a 55 55 */ 56 56 57 rtems_filesystem_umask = S_IWOTH | S_IROTH; 57 rtems_filesystem_umask = 022; 58 58 59 59 60 init_fs_mount_table(); … … 78 79 rtems_filesystem_current = rtems_filesystem_root; 79 80 81 80 82 /* 81 83 * Traditionally RTEMS devices are under "/dev" so install this directory. … … 85 87 * NOTE: UNIX root is 755 and owned by root/root (0/0). 86 88 */ 89 status=chmod("/", 0755); 90 if ( status != 0 ) 91 rtems_fatal_error_occurred( 0xABCD0003 ); 87 92 88 status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO);93 status = mkdir( "/dev", 0777); 89 94 if ( status != 0 ) 90 95 rtems_fatal_error_occurred( 0xABCD0003 ); -
c/src/exec/libcsupport/src/getpwent.c
raaf6063 re565720a 58 58 etc_passwd_initted = 1; 59 59 60 (void) mkdir( "/etc", S_IRWXU | S_IRWXG | S_IRWXO);60 (void) mkdir( "/etc", 0777); 61 61 62 62 /* … … 67 67 return; 68 68 69 fprintf( fp, "root:*:0:0:root,,,,:/tmp:/bin/false\n" 70 "rtems:*:1:1:RTEMS Application,,,,:/tmp:/bin/false\n" ); 69 fprintf( fp, "root:*:0:0:root,,,,:/:/bin/sh\n" 70 "rtems:*:1:1:RTEMS Application,,,,:/:/bin/sh\n" 71 "tty:!:2:2:tty owner,,,,:/:/bin/false\n" ); 71 72 72 73 fclose( fp ); … … 79 80 return; 80 81 81 fprintf( fp, "root::0:root\n" 82 "rtems::0:rtems\n" ); 82 fprintf( fp, "root:x:0:root\n" 83 "rtems:x:1:rtems\n" 84 "tty:x:2:tty\n" ); 83 85 84 86 fclose( fp ); -
c/src/exec/libcsupport/src/ttyname.c
raaf6063 re565720a 40 40 41 41 /* Must be a character device. */ 42 if ( _fstat (fd, &sb) || !S_ISCHR (sb.st_mode))42 if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 43 43 set_errno_and_return_minus_one(EBADF); 44 44 … … 54 54 sb.st_ino != dsb.st_ino) 55 55 continue; 56 (void) closedir (dp);57 56 rval = name; 58 57 break; -
c/src/lib/ChangeLog
raaf6063 re565720a 1 2000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es> 2 3 * libc/ttyname.c (ttyname_r): Removed duplicate call to closedir(). 4 * libc/getpwent.c: Create a more robust /etc/passwd and /etc/group. 5 * libc/base_fs.c: Change permissions of files and directories. Now uses 6 octal constants. 7 1 8 2001-05-11 Joel Sherrill <joel@OARcorp.com> 2 9 -
c/src/lib/libc/base_fs.c
raaf6063 re565720a 55 55 */ 56 56 57 rtems_filesystem_umask = S_IWOTH | S_IROTH; 57 rtems_filesystem_umask = 022; 58 58 59 59 60 init_fs_mount_table(); … … 78 79 rtems_filesystem_current = rtems_filesystem_root; 79 80 81 80 82 /* 81 83 * Traditionally RTEMS devices are under "/dev" so install this directory. … … 85 87 * NOTE: UNIX root is 755 and owned by root/root (0/0). 86 88 */ 89 status=chmod("/", 0755); 90 if ( status != 0 ) 91 rtems_fatal_error_occurred( 0xABCD0003 ); 87 92 88 status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO);93 status = mkdir( "/dev", 0777); 89 94 if ( status != 0 ) 90 95 rtems_fatal_error_occurred( 0xABCD0003 ); -
c/src/lib/libc/getpwent.c
raaf6063 re565720a 58 58 etc_passwd_initted = 1; 59 59 60 (void) mkdir( "/etc", S_IRWXU | S_IRWXG | S_IRWXO);60 (void) mkdir( "/etc", 0777); 61 61 62 62 /* … … 67 67 return; 68 68 69 fprintf( fp, "root:*:0:0:root,,,,:/tmp:/bin/false\n" 70 "rtems:*:1:1:RTEMS Application,,,,:/tmp:/bin/false\n" ); 69 fprintf( fp, "root:*:0:0:root,,,,:/:/bin/sh\n" 70 "rtems:*:1:1:RTEMS Application,,,,:/:/bin/sh\n" 71 "tty:!:2:2:tty owner,,,,:/:/bin/false\n" ); 71 72 72 73 fclose( fp ); … … 79 80 return; 80 81 81 fprintf( fp, "root::0:root\n" 82 "rtems::0:rtems\n" ); 82 fprintf( fp, "root:x:0:root\n" 83 "rtems:x:1:rtems\n" 84 "tty:x:2:tty\n" ); 83 85 84 86 fclose( fp ); -
c/src/lib/libc/ttyname.c
raaf6063 re565720a 40 40 41 41 /* Must be a character device. */ 42 if ( _fstat (fd, &sb) || !S_ISCHR (sb.st_mode))42 if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 43 43 set_errno_and_return_minus_one(EBADF); 44 44 … … 54 54 sb.st_ino != dsb.st_ino) 55 55 continue; 56 (void) closedir (dp);57 56 rval = name; 58 57 break; -
cpukit/libcsupport/src/base_fs.c
raaf6063 re565720a 55 55 */ 56 56 57 rtems_filesystem_umask = S_IWOTH | S_IROTH; 57 rtems_filesystem_umask = 022; 58 58 59 59 60 init_fs_mount_table(); … … 78 79 rtems_filesystem_current = rtems_filesystem_root; 79 80 81 80 82 /* 81 83 * Traditionally RTEMS devices are under "/dev" so install this directory. … … 85 87 * NOTE: UNIX root is 755 and owned by root/root (0/0). 86 88 */ 89 status=chmod("/", 0755); 90 if ( status != 0 ) 91 rtems_fatal_error_occurred( 0xABCD0003 ); 87 92 88 status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO);93 status = mkdir( "/dev", 0777); 89 94 if ( status != 0 ) 90 95 rtems_fatal_error_occurred( 0xABCD0003 ); -
cpukit/libcsupport/src/getpwent.c
raaf6063 re565720a 58 58 etc_passwd_initted = 1; 59 59 60 (void) mkdir( "/etc", S_IRWXU | S_IRWXG | S_IRWXO);60 (void) mkdir( "/etc", 0777); 61 61 62 62 /* … … 67 67 return; 68 68 69 fprintf( fp, "root:*:0:0:root,,,,:/tmp:/bin/false\n" 70 "rtems:*:1:1:RTEMS Application,,,,:/tmp:/bin/false\n" ); 69 fprintf( fp, "root:*:0:0:root,,,,:/:/bin/sh\n" 70 "rtems:*:1:1:RTEMS Application,,,,:/:/bin/sh\n" 71 "tty:!:2:2:tty owner,,,,:/:/bin/false\n" ); 71 72 72 73 fclose( fp ); … … 79 80 return; 80 81 81 fprintf( fp, "root::0:root\n" 82 "rtems::0:rtems\n" ); 82 fprintf( fp, "root:x:0:root\n" 83 "rtems:x:1:rtems\n" 84 "tty:x:2:tty\n" ); 83 85 84 86 fclose( fp ); -
cpukit/libcsupport/src/ttyname.c
raaf6063 re565720a 40 40 41 41 /* Must be a character device. */ 42 if ( _fstat (fd, &sb) || !S_ISCHR (sb.st_mode))42 if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 43 43 set_errno_and_return_minus_one(EBADF); 44 44 … … 54 54 sb.st_ino != dsb.st_ino) 55 55 continue; 56 (void) closedir (dp);57 56 rval = name; 58 57 break;
Note: See TracChangeset
for help on using the changeset viewer.