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:
Michael Jung
2019-08-06 07:17:23 -06:00
committed by Gregory Nutt
parent a12f80fb90
commit e8af615578
5 changed files with 171 additions and 2 deletions
+3 -1
View File
@@ -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
+5
View File
@@ -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)
}