Ticket #1649: pr1649.diff

File pr1649.diff, 3.2 KB (added by Joel Sherrill, on 08/03/10 at 13:13:00)

Attempted Fix

  • cpukit/libcsupport/Makefile.am

    ? cpukit/libcsupport/src/.setegid.c.swp
    RCS file: /usr1/CVS/rtems/cpukit/libcsupport/Makefile.am,v
    retrieving revision 1.129
    diff -u -r1.129 Makefile.am
     
    8585
    8686ID_C_FILES = src/getegid.c src/geteuid.c src/getgid.c src/getgroups.c \
    8787    src/getlogin.c src/getpgrp.c src/getpid.c src/getppid.c src/getuid.c \
    88     src/setuid.c src/seteuid.c src/setpgid.c src/setsid.c
     88    src/seteuid.c src/setgid.c src/setuid.c src/seteuid.c src/setpgid.c \
     89    src/setsid.c
    8990
    9091MALLOC_C_FILES = src/malloc_initialize.c src/calloc.c src/malloc.c \
    9192    src/realloc.c src/_calloc_r.c src/_malloc_r.c \
  • cpukit/libcsupport/src/getgid.c

    RCS file: /usr1/CVS/rtems/cpukit/libcsupport/src/getgid.c,v
    retrieving revision 1.2
    diff -u -r1.2 getgid.c
     
    66#include "config.h"
    77#endif
    88
    9 #include <limits.h>
    10 #include <string.h>
    11 #include <sys/types.h>
    12 
    13 #include <rtems/system.h>
    14 #include <rtems/score/object.h>
    15 #include <rtems/seterr.h>
    16 
    179#include <rtems/userenv.h>
    1810
    1911/*
    20  * MACRO in userenv.h
    21  *
    22 gid_t _POSIX_types_Gid = 0;
    23 */
    24 
    25 /*PAGE
    26  *
    2712 *  4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
    2813 *        P1003.1b-1993, p. 84
    2914 */
    30 
    3115gid_t getgid( void )
    3216{
    3317  return _POSIX_types_Gid;
    3418}
    35 
    36 /*PAGE
    37  *
    38  *  4.2.2 Set User and Group IDs, P1003.1b-1993, p. 84
    39  */
    40 
    41 int setgid(
    42   gid_t  gid
    43 )
    44 {
    45   _POSIX_types_Gid = gid;
    46   return 0;
    47 }
  • new file cpukit/libcsupport/src/setegid.c

    RCS file: cpukit/libcsupport/src/setegid.c
    diff -N cpukit/libcsupport/src/setegid.c
    - +  
     1/*
     2 *  $Id: getegid.c,v 1.4 2010/07/01 15:37:48 joel Exp $
     3 */
     4
     5#if HAVE_CONFIG_H
     6#include "config.h"
     7#endif
     8
     9#include <limits.h>
     10#include <string.h>
     11#include <sys/types.h>
     12
     13#include <rtems/system.h>
     14#include <rtems/score/object.h>
     15#include <rtems/seterr.h>
     16#include <rtems/userenv.h>
     17
     18/*
     19 *  4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
     20 *        P1003.1b-1993, p. 84
     21 */
     22int setegid(
     23  gid_t  gid
     24)
     25{
     26  _POSIX_types_Egid = gid;
     27  return 0;
     28}
  • new file cpukit/libcsupport/src/setgid.c

    RCS file: cpukit/libcsupport/src/setgid.c
    diff -N cpukit/libcsupport/src/setgid.c
    - +  
     1/*
     2 *  $Id: getgid.c,v 1.2 2004/04/18 06:05:34 ralf Exp $
     3 */
     4
     5#if HAVE_CONFIG_H
     6#include "config.h"
     7#endif
     8
     9#include <rtems/userenv.h>
     10
     11/*
     12 *
     13 *  4.2.2 Set User and Group IDs, P1003.1b-1993, p. 84
     14 */
     15int setgid(
     16  gid_t  gid
     17)
     18{
     19  _POSIX_types_Gid = gid;
     20  return 0;
     21}