diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-07 16:46:34 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-07 16:46:34 +0100 |
commit | f433f1426b10dc7bdd313ee72b842e27089f88f1 (patch) | |
tree | e06562452c98faf2c4dfbb435d803781596e9d9a /sys/src/libauth/auth_getuserpasswd.c | |
parent | f341ae8c777dda2876beb4d4a1c67c4e920595ca (diff) |
libauth: open internal file-descriptors with OCEXEC flag
Diffstat (limited to 'sys/src/libauth/auth_getuserpasswd.c')
-rw-r--r-- | sys/src/libauth/auth_getuserpasswd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/src/libauth/auth_getuserpasswd.c b/sys/src/libauth/auth_getuserpasswd.c index 4d66dcecb..831ee3300 100644 --- a/sys/src/libauth/auth_getuserpasswd.c +++ b/sys/src/libauth/auth_getuserpasswd.c @@ -32,12 +32,11 @@ auth_getuserpasswd(AuthGetkey *getkey, char *fmt, ...) UserPasswd *up; up = nil; - rpc = nil; params = nil; - fd = open("/mnt/factotum/rpc", ORDWR); + fd = open("/mnt/factotum/rpc", ORDWR|OCEXEC); if(fd < 0) - goto out; + return nil; rpc = auth_allocrpc(fd); if(rpc == nil) goto out; @@ -69,7 +68,7 @@ auth_getuserpasswd(AuthGetkey *getkey, char *fmt, ...) out: free(params); - auth_freerpc(rpc); close(fd); + auth_freerpc(rpc); return up; } |