summaryrefslogtreecommitdiff
path: root/setup_native/scripts/source
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-09-08 14:02:45 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-09-08 14:02:45 +0000
commit9c369f868c8aeb4ecdeed8c144482af73935fb7f (patch)
treed18e7ae5dc4edf0d3d4cf6c77328e9c6ac51f27a /setup_native/scripts/source
parentfa4bf1ee8c74429f5b506ea94485bdd6b5d89f58 (diff)
INTEGRATION: CWS customizer (1.1.2); FILE ADDED
2004/08/31 15:43:26 is 1.1.2.1: #i33634# userland scripts
Diffstat (limited to 'setup_native/scripts/source')
-rw-r--r--setup_native/scripts/source/getuid.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/setup_native/scripts/source/getuid.c b/setup_native/scripts/source/getuid.c
new file mode 100644
index 000000000000..3ea265a9f9ad
--- /dev/null
+++ b/setup_native/scripts/source/getuid.c
@@ -0,0 +1,41 @@
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <dlfcn.h>
+
+#ifdef _cplusplus
+extern "C" {
+#endif
+
+int chown (const char *path, uid_t owner, gid_t group) {return 0;}
+int lchown (const char *path, uid_t owner, gid_t group) {return 0;}
+int fchown (int fildes, uid_t owner, gid_t group) {return 0;}
+
+uid_t getuid (void) {return 0;}
+#ifdef __notdef__
+uid_t geteuid (void) {return 0;}
+gid_t getgid (void) {return 0;}
+gid_t getegid (void) {return 0;}
+#endif
+
+int setuid (uid_t p) {return 0;}
+int setgid (gid_t p) {return 0;}
+
+int fstat(int fildes, struct stat *buf)
+{
+ int ret = 0;
+ static int (*p_fstat) (int fildes, struct stat *buf) = NULL;
+ if (p_fstat == NULL)
+ p_fstat = (int (*)(int fildes, struct stat *buf))
+ dlsym (RTLD_NEXT, "fstat");
+ ret = (*p_fstat)(fildes, buf);
+ if (buf != NULL)
+ buf->st_uid = 0;
+
+ return ret;
+}
+
+#ifdef _cplusplus
+}
+#endif
+