From 61f0293e39c5e0ec99ffefe0da2fc8a9953377d1 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Tue, 5 Sep 2017 23:53:40 +0200 Subject: [PATCH] libposix: fake get/set functions for uid, gid, euid, egid, pgid, sid, reuid... --- sys/src/lib/posix/build.json | 1 + sys/src/lib/posix/ids.c | 102 +++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 sys/src/lib/posix/ids.c diff --git a/sys/src/lib/posix/build.json b/sys/src/lib/posix/build.json index ff4998e..e331247 100644 --- a/sys/src/lib/posix/build.json +++ b/sys/src/lib/posix/build.json @@ -13,6 +13,7 @@ "environment.c", "errors.c", "files.c", + "ids.c", "initlib.c", "links.c", "memory.c", diff --git a/sys/src/lib/posix/ids.c b/sys/src/lib/posix/ids.c new file mode 100644 index 0000000..d130064 --- /dev/null +++ b/sys/src/lib/posix/ids.c @@ -0,0 +1,102 @@ +/* + * This file is part of Jehanne. + * + * Copyright (C) 2017 Giacomo Tesio + * + * This is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, version 3 of the License. + * + * Jehanne is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Jehanne. If not, see . + */ +#include +#include +#include <9P2000.h> +#include +#include "internal.h" + +int +POSIX_getuid(int *errnop) +{ + return 0; +} + +int +POSIX_geteuid(int *errnop) +{ + return 0; +} + +int +POSIX_setuid(int *errnop, int uid) +{ + return 0; +} + +int +POSIX_seteuid(int *errnop, int euid) +{ + return 0; +} + +int +POSIX_setreuid(int *errnop, int ruid, int euid) +{ + return 0; +} + +int +POSIX_getgid(int *errnop) +{ + return 0; +} + +int +POSIX_getegid(int *errnop) +{ + return 0; +} + +int +POSIX_setgid(int *errnop, int gid) +{ + return 0; +} + +int +POSIX_setegid(int *errnop, int egid) +{ + return 0; +} + +int +POSIX_setregid(int *errnop, int rgid, int egid) +{ + return 0; +} + +int +POSIX_setpgid(int *errnop, int pid, int pgid) +{ + return 0; +} + +int +POSIX_getsid(int *errnop, int pid) +{ + return 0; +} + +int +POSIX_setsid(int *errnop) +{ + *errnop = __libposix_get_errno(PosixEPERM); + return 0; +} +