aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'pseudo_client.c')
-rw-r--r--pseudo_client.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/pseudo_client.c b/pseudo_client.c
index bb9e1e8..2f7fe7d 100644
--- a/pseudo_client.c
+++ b/pseudo_client.c
@@ -74,6 +74,7 @@ char *pseudo_cwd_rel = NULL;
int pseudo_disabled = 0;
int pseudo_allow_fsync = 0;
static int pseudo_local_only = 0;
+static int pseudo_client_logging = 1;
int pseudo_umask = 022;
@@ -1065,7 +1066,14 @@ client_ping(void) {
/* and that's not good, so... */
server_pid = 0;
return 1;
- }
+ } else {
+ /* The server tells us whether or not to log things. */
+ if (ack->result == RESULT_SUCCEED) {
+ pseudo_client_logging = 1;
+ } else {
+ pseudo_client_logging = 0;
+ }
+ }
pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "ping ok\n");
return 0;
}
@@ -1645,7 +1653,8 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path
break;
case OP_OPEN:
pseudo_client_path(fd, path);
- do_request = 1;
+ case OP_EXEC: /* fallthrough */
+ do_request = pseudo_client_logging;
break;
case OP_CLOSE:
/* no request needed */
@@ -1701,7 +1710,6 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path
* (operations which can create should be CREAT or MKNOD
* or MKDIR)
*/
- case OP_EXEC:
case OP_CHOWN:
case OP_FCHOWN:
case OP_FSTAT: