Changeset aaf6063 in rtems for c


Ignore:
Timestamp:
May 24, 2001, 9:38:10 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
e565720a
Parents:
9a23bf64
Message:

2000-05-24 Fernando Ruiz Casas <fernando.ruiz@…>

  • src/getegid.c, src/geteuid.c, src/getgid.c, src/getlogin.c, src/getuid.c: Now save their values in private user environment.
Location:
c/src/exec/posix
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/ChangeLog

    r9a23bf64 raaf6063  
     12000-05-24      Fernando Ruiz Casas <fernando.ruiz@ctv.es>
     2
     3        * src/getegid.c, src/geteuid.c, src/getgid.c, src/getlogin.c,
     4        src/getuid.c: Now save their values in private user environment.
     5
    162001-04-27      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    27
  • c/src/exec/posix/src/getegid.c

    r9a23bf64 raaf6063  
    1616#include <rtems/seterr.h>
    1717
     18#include <rtems/libio_.h>
     19
     20/*
     21 * MACRO in libio_.h
    1822gid_t _POSIX_types_Egid = 0;
     23*/
    1924
    2025/*PAGE
  • c/src/exec/posix/src/geteuid.c

    r9a23bf64 raaf6063  
    1616#include <rtems/seterr.h>
    1717
     18#include <rtems/libio_.h>
     19
     20/*
     21 * MACRO in libio_.h
    1822uid_t _POSIX_types_Euid = 0;
     23*/
    1924
    2025/*PAGE
  • c/src/exec/posix/src/getgid.c

    r9a23bf64 raaf6063  
    1616#include <rtems/seterr.h>
    1717
     18#include <rtems/libio_.h>
     19
     20/*
     21 * MACRO in libio_.h
     22 *
    1823gid_t _POSIX_types_Gid = 0;
     24*/
    1925
    2026/*PAGE
  • c/src/exec/posix/src/getlogin.c

    r9a23bf64 raaf6063  
    1616#include <rtems/seterr.h>
    1717
     18#include <rtems/libio_.h>
     19#include <string.h>
     20#include <unistd.h>
     21#include <pwd.h>
     22
    1823/*PAGE
    1924 *
     
    2328 */
    2429
     30/*
     31 * MACRO in libio_.h
     32 *
    2533static char _POSIX_types_Getlogin_buffer[ LOGIN_NAME_MAX ];
     34*/
    2635
    2736char *getlogin( void )
     
    4352)
    4453{
     54  struct passwd *pw;   
    4555  if ( namesize < LOGIN_NAME_MAX )
    4656    return ERANGE;
    4757
    48   strcpy( name, "posixapp" );
     58  pw=getpwuid(getuid());
     59  if (!pw) {
     60   strcpy(name,"");
     61  } else {
     62   strncpy(name,pw->pw_name,LOGIN_NAME_MAX);
     63  };
    4964  return 0;
    5065}
  • c/src/exec/posix/src/getuid.c

    r9a23bf64 raaf6063  
    1616#include <rtems/seterr.h>
    1717
     18#include <rtems/libio_.h>
     19
     20/*
     21 * MACRO in libio_.h
     22 *
    1823uid_t _POSIX_types_Uid = 0;
     24*/
    1925
    2026/*PAGE
Note: See TracChangeset for help on using the changeset viewer.