mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
PR 449/rtems: * src/getegid.c: Remove (Moved to ../libcsupport/src). * src/geteuid.c: Remove (Moved to ../libcsupport/src). * src/getgid.c: Remove (Moved to ../libcsupport/src). * src/getgroups.c: Remove (Moved to ../libcsupport/src). * src/getlogin.c: Remove (Moved to ../libcsupport/src). * src/getpgrp.c: Remove (Moved to ../libcsupport/src). * src/getpid.c: Remove (Moved to ../libcsupport/src). * src/getppid.c: Remove (Moved to ../libcsupport/src). * src/getuid.c: Remove (Moved to ../libcsupport/src). * src/setpgid.c: Remove (Moved to ../libcsupport/src). * src/setsid.c: Remove (Moved to ../libcsupport/src). * Makefile.am: Reflect changes above
This commit is contained in:
@@ -1,3 +1,19 @@
|
|||||||
|
2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
|
PR 449/rtems:
|
||||||
|
* src/getegid.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/geteuid.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/getgid.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/getgroups.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/getlogin.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/getpgrp.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/getpid.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/getppid.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/getuid.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/setpgid.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* src/setsid.c: Remove (Moved to ../libcsupport/src).
|
||||||
|
* Makefile.am: Reflect changes above
|
||||||
|
|
||||||
2003-08-14 Joel Sherrill <joel@OARcorp.com>
|
2003-08-14 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
* src/mqueuenametoid.c, src/semaphorenametoid.c: Added ID to name
|
* src/mqueuenametoid.c, src/semaphorenametoid.c: Added ID to name
|
||||||
|
|||||||
@@ -103,9 +103,6 @@ CONDITION_VARIABLE_C_FILES = src/cond.c src/condattrdestroy.c src/condattrgetpsh
|
|||||||
src/conddefaultattributes.c src/conddestroy.c src/condinit.c src/condmp.c src/condsignal.c \
|
src/conddefaultattributes.c src/conddestroy.c src/condinit.c src/condmp.c src/condsignal.c \
|
||||||
src/condsignalsupp.c src/condtimedwait.c src/condwait.c src/condwaitsupp.c
|
src/condsignalsupp.c src/condtimedwait.c src/condwait.c src/condwaitsupp.c
|
||||||
|
|
||||||
ID_C_FILES = src/getegid.c src/geteuid.c src/getgid.c src/getgroups.c src/getlogin.c src/getpgrp.c \
|
|
||||||
src/getpid.c src/getppid.c src/getuid.c src/setpgid.c src/setsid.c
|
|
||||||
|
|
||||||
KEY_C_FILES = src/key.c src/keycreate.c src/keydelete.c src/keygetspecific.c \
|
KEY_C_FILES = src/key.c src/keycreate.c src/keydelete.c src/keygetspecific.c \
|
||||||
src/keyrundestructors.c src/keysetspecific.c
|
src/keyrundestructors.c src/keysetspecific.c
|
||||||
|
|
||||||
@@ -161,7 +158,7 @@ TIMER_C_FILES = src/ptimer.c src/ptimer1.c
|
|||||||
EXTRA_DIST += src/README.mqueue
|
EXTRA_DIST += src/README.mqueue
|
||||||
|
|
||||||
C_FILES = src/adasupp.c $(CANCEL_C_FILES) $(CONDITION_VARIABLE_C_FILES) \
|
C_FILES = src/adasupp.c $(CANCEL_C_FILES) $(CONDITION_VARIABLE_C_FILES) \
|
||||||
$(ID_C_FILES) $(KEY_C_FILES) $(MEMORY_C_FILES) $(MESSAGE_QUEUE_C_FILES) \
|
$(KEY_C_FILES) $(MEMORY_C_FILES) $(MESSAGE_QUEUE_C_FILES) \
|
||||||
$(MUTEX_C_FILES) $(PTHREAD_C_FILES) $(PSIGNAL_C_FILES) src/sched.c \
|
$(MUTEX_C_FILES) $(PTHREAD_C_FILES) $(PSIGNAL_C_FILES) src/sched.c \
|
||||||
$(SEMAPHORE_C_FILES) src/sysconf.c $(TIME_C_FILES) $(TIMER_C_FILES) src/types.c \
|
$(SEMAPHORE_C_FILES) src/sysconf.c $(TIME_C_FILES) $(TIMER_C_FILES) src/types.c \
|
||||||
$(ENOSYS_C_FILES) $(BUILD_FOR_NOW_C_FILES)
|
$(ENOSYS_C_FILES) $(BUILD_FOR_NOW_C_FILES)
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
#include <rtems/userenv.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* MACRO in userenv.h
|
|
||||||
gid_t _POSIX_types_Egid = 0;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
|
|
||||||
* P1003.1b-1993, p. 84
|
|
||||||
*/
|
|
||||||
|
|
||||||
gid_t getegid( void )
|
|
||||||
{
|
|
||||||
return _POSIX_types_Egid;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
|
|
||||||
#include <rtems/userenv.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* MACRO in userenv.h
|
|
||||||
uid_t _POSIX_types_Euid = 0;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
|
|
||||||
* P1003.1b-1993, p. 84
|
|
||||||
*/
|
|
||||||
|
|
||||||
uid_t geteuid( void )
|
|
||||||
{
|
|
||||||
return _POSIX_types_Euid;
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
|
|
||||||
#include <rtems/userenv.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* MACRO in userenv.h
|
|
||||||
*
|
|
||||||
gid_t _POSIX_types_Gid = 0;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
|
|
||||||
* P1003.1b-1993, p. 84
|
|
||||||
*/
|
|
||||||
|
|
||||||
gid_t getgid( void )
|
|
||||||
{
|
|
||||||
return _POSIX_types_Gid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.2.2 Set User and Group IDs, P1003.1b-1993, p. 84
|
|
||||||
*/
|
|
||||||
|
|
||||||
int setgid(
|
|
||||||
gid_t gid
|
|
||||||
)
|
|
||||||
{
|
|
||||||
_POSIX_types_Gid = gid;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.2.3 Get Supplementary IDs, P1003.1b-1993, p. 86
|
|
||||||
*/
|
|
||||||
|
|
||||||
int getgroups(
|
|
||||||
int gidsetsize,
|
|
||||||
gid_t grouplist[]
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return 0; /* no supplemental group ids */
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
#include <rtems/userenv.h>
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.2.4 Get User Name, P1003.1b-1993, p. 87
|
|
||||||
*
|
|
||||||
* NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* MACRO in userenv.h
|
|
||||||
*
|
|
||||||
static char _POSIX_types_Getlogin_buffer[ LOGIN_NAME_MAX ];
|
|
||||||
*/
|
|
||||||
|
|
||||||
char *getlogin( void )
|
|
||||||
{
|
|
||||||
(void) getlogin_r( _POSIX_types_Getlogin_buffer, LOGIN_NAME_MAX );
|
|
||||||
return _POSIX_types_Getlogin_buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.2.4 Get User Name, P1003.1b-1993, p. 87
|
|
||||||
*
|
|
||||||
* NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
|
|
||||||
*/
|
|
||||||
|
|
||||||
int getlogin_r(
|
|
||||||
char *name,
|
|
||||||
size_t namesize
|
|
||||||
)
|
|
||||||
{
|
|
||||||
struct passwd *pw;
|
|
||||||
if ( namesize < LOGIN_NAME_MAX )
|
|
||||||
return ERANGE;
|
|
||||||
|
|
||||||
pw=getpwuid(getuid());
|
|
||||||
if (!pw) {
|
|
||||||
strcpy(name,"");
|
|
||||||
} else {
|
|
||||||
strncpy(name,pw->pw_name,LOGIN_NAME_MAX);
|
|
||||||
};
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.3.1 Get Process Group IDs, P1003.1b-1993, p. 89
|
|
||||||
*/
|
|
||||||
|
|
||||||
pid_t getpgrp( void )
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* This always succeeds and returns the process group id. For rtems,
|
|
||||||
* this will always be the local node;
|
|
||||||
*/
|
|
||||||
|
|
||||||
return _Objects_Local_node;
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
|
|
||||||
*/
|
|
||||||
|
|
||||||
pid_t getpid( void )
|
|
||||||
{
|
|
||||||
return _Objects_Local_node;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* _getpid_r
|
|
||||||
*
|
|
||||||
* This is the Newlib dependent reentrant version of getpid().
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(RTEMS_NEWLIB)
|
|
||||||
|
|
||||||
#include <reent.h>
|
|
||||||
|
|
||||||
pid_t _getpid_r(
|
|
||||||
struct _reent *ptr
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return getpid();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
|
|
||||||
pid_t _POSIX_types_Ppid = 0;
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
|
|
||||||
*/
|
|
||||||
|
|
||||||
pid_t getppid( void )
|
|
||||||
{
|
|
||||||
return _POSIX_types_Ppid;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
|
|
||||||
#include <rtems/userenv.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* MACRO in userenv.h
|
|
||||||
*
|
|
||||||
uid_t _POSIX_types_Uid = 0;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
|
|
||||||
* P1003.1b-1993, p. 84
|
|
||||||
*/
|
|
||||||
|
|
||||||
uid_t getuid( void )
|
|
||||||
{
|
|
||||||
return _POSIX_types_Uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.2.2 Set User and Group IDs, P1003.1b-1993, p. 84
|
|
||||||
*/
|
|
||||||
|
|
||||||
int setuid(
|
|
||||||
uid_t uid
|
|
||||||
)
|
|
||||||
{
|
|
||||||
_POSIX_types_Uid = uid;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.3.3 Set Process Group ID for Job Control, P1003.1b-1993, p. 89
|
|
||||||
*/
|
|
||||||
|
|
||||||
int setpgid(
|
|
||||||
pid_t pid,
|
|
||||||
pid_t pgid
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rtems_set_errno_and_return_minus_one( ENOSYS );
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <rtems/system.h>
|
|
||||||
#include <rtems/score/object.h>
|
|
||||||
#include <rtems/seterr.h>
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* 4.3.2 Create Session and Set Process Group ID, P1003.1b-1993, p. 88
|
|
||||||
*/
|
|
||||||
|
|
||||||
pid_t setsid( void )
|
|
||||||
{
|
|
||||||
rtems_set_errno_and_return_minus_one( EPERM );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user