diff options
author | Stefan Siegl <stesie@brokenpipe.de> | 2006-08-05 19:02:36 +0000 |
---|---|---|
committer | Stefan Siegl <stesie@brokenpipe.de> | 2006-08-05 19:02:36 +0000 |
commit | c580f04bb2c2eab9b38300e403011ece495e4fa8 (patch) | |
tree | 20bae49f5f5717c9393967edb6a7a3e132f418cc | |
parent | e760d93255fdf3f0ffe39cf49a0b1ad4971412ef (diff) |
netfs_attempt_syncfs is called with cred==NULL on filesystem shutdown, changed it to not call test_allow_root_or_other in that case
-rw-r--r-- | src/netfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/netfs.c b/src/netfs.c index 4815027e4..a97b41b48 100644 --- a/src/netfs.c +++ b/src/netfs.c @@ -108,6 +108,8 @@ test_allow_root_or_other (struct iouser *cred) { FUNC_PROLOGUE("test_allow_root_or_other"); + assert(cred); + /* if allow_other is set, access is okay in any case */ if(libfuse_params.allow_other) FUNC_RETURN_FMT(0, "allow_other is set"); @@ -554,7 +556,7 @@ error_t netfs_attempt_syncfs (struct iouser *cred, int wait) FUNC_PROLOGUE("netfs_attempt_syncfs"); error_t err; - if(test_allow_root_or_other(cred)) + if(cred && test_allow_root_or_other(cred)) err = EPERM; else { |