mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
libs/libc/unistd: Stubs for setuid and setgid. Added stubbed implementations of setuid and setgid. These functions are essentially stubs pretending that NuttX supported users and groups and that the only configured user and group in the system were both 'root' with a uid and a gid of 0, respectively. The intent is not to provide meaningful new features, but to ease porting of foreign source code to NuttX.
This commit is contained in:
committed by
Gregory Nutt
parent
a12f80fb90
commit
e8af615578
+3
-1
@@ -45,6 +45,7 @@
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* How can we access the errno variable? */
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) && !defined(CONFIG_BUILD_KERNEL)
|
||||
@@ -87,7 +88,8 @@
|
||||
|
||||
# else
|
||||
/* User libraries for the kernel. Only indirect access from user
|
||||
* libraries */
|
||||
* libraries
|
||||
*/
|
||||
|
||||
# undef __DIRECT_ERRNO_ACCESS
|
||||
# endif
|
||||
|
||||
@@ -368,6 +368,11 @@ int sethostname(FAR const char *name, size_t size);
|
||||
|
||||
long sysconf(int name);
|
||||
|
||||
/* User and group identity management */
|
||||
|
||||
int setuid(uid_t uid);
|
||||
int setgid(gid_t gid);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user