aboutsummaryrefslogtreecommitdiffstats
path: root/guts
diff options
context:
space:
mode:
Diffstat (limited to 'guts')
-rw-r--r--guts/README16
-rw-r--r--guts/fork.c17
2 files changed, 27 insertions, 6 deletions
diff --git a/guts/README b/guts/README
index 8bfbfe6..0a1fe5f 100644
--- a/guts/README
+++ b/guts/README
@@ -83,7 +83,7 @@ wrappers:
close
dup
dup2
- excl* (all redirect through execve)
+ execl* (no guts implementations; see pseudo_wrappers.c)
execv
execve
execvp
@@ -97,7 +97,6 @@ wrappers:
fcntl
fork
link
- vfork
The following functions don't have any direct database interactions,
but are used to simulate the permissions system:
@@ -206,3 +205,16 @@ needed because we don't actually track or manage extended attributes, but
a few programs attempt to use *setxattr() to set regular permissions,
and only use a regular chmod if the *setxattr() call returns -1 and
sets errno to ENOTSUP.
+
+ fgetxattr
+ flistxattr
+ fremovexattr
+ fsetxattr
+ getxattr
+ lgetxattr
+ listxattr
+ llistxattr
+ lremovexattr
+ lsetxattr
+ removexattr
+ setxattr
diff --git a/guts/fork.c b/guts/fork.c
index 4a91f7b..fa23be1 100644
--- a/guts/fork.c
+++ b/guts/fork.c
@@ -6,10 +6,19 @@
* wrap_fork(void) {
* int rc = -1;
*/
- rc = real_fork();
- if (rc == 0)
- pseudo_client_reset();
-
+ if (real_fork) {
+ rc = real_fork();
+ /* special case: we may want to enable or disable
+ * pseudo in the child process
+ */
+ if (rc == 0) {
+ pseudo_setupenv();
+ pseudo_client_reset();
+ }
+ } else {
+ /* rc was initialized to the "failure" value */
+ pseudo_enosys("fork");
+ }
/* return rc;
* }
*/