diff options
author | Roland McGrath <roland@gnu.org> | 2001-06-16 20:23:29 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-06-16 20:23:29 +0000 |
commit | 0a746fb19a663f41794f4c6ed6e63d4c5ce714b4 (patch) | |
tree | 8a32333adeedb387dabadce6165358563ec61e7d /libnetfs/dir-mkfile.c | |
parent | 487bba2f0cd506b4a79e1d92184a5f80d827954f (diff) | |
download | hurd-0a746fb19a663f41794f4c6ed6e63d4c5ce714b4.tar.gz hurd-0a746fb19a663f41794f4c6ed6e63d4c5ce714b4.tar.bz2 hurd-0a746fb19a663f41794f4c6ed6e63d4c5ce714b4.zip |
2001-04-01 Neal H Walfield <neal@cs.uml.edu>
* dir-lookup.c (netfs_S_dir_lookup): Use
iohelp_create_empty_iouser. Use iohelp_dup_iouser
as per the new semantics.
* dir-mkfile.c (netfs_S_dir_mkfile): Use iohelp_dup_iouser
as per the new semantics.
* file-exec.c (netfs_S_file_exec): Likewise.
* file-reparent.c (netfs_S_file_reparent): Likewise.
* fsys-getroot.c (netfs_S_fsys_getroot): Use
iohelp_create_complex_iouser.
* fsys-syncfs.c (netfs_S_fsys_syncfs): Use
iohelp_create_simple_iouser.
* io-duplicate.c (netfs_S_io_duplicate): Use iohelp_dup_iouser
as per the new semantics.
* io-reauthenticate.c (netfs_S_io_reauthenticate): Use
iohelp_reauth as per the new semantics.
* io-restric-auth.c (netfs_S_io_restric_auth): Use
iohelp_create_complex_iouser. Check return values.
* trans-callback.c (_netfs_transcallback2_fn): Use
iohelp_create_simple_iouser.
Diffstat (limited to 'libnetfs/dir-mkfile.c')
-rw-r--r-- | libnetfs/dir-mkfile.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/libnetfs/dir-mkfile.c b/libnetfs/dir-mkfile.c index abd8d0ad..16c5dd77 100644 --- a/libnetfs/dir-mkfile.c +++ b/libnetfs/dir-mkfile.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,2001 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -28,6 +28,7 @@ netfs_S_dir_mkfile (struct protid *diruser, int flags, mode_t mode, { error_t err; struct node *np; + struct iouser *user; struct protid *newpi; mutex_lock (&diruser->po->np->lock); @@ -37,15 +38,19 @@ netfs_S_dir_mkfile (struct protid *diruser, int flags, mode_t mode, { /* the dir is now unlocked and NP is locked */ flags &= OPENONLY_STATE_MODES; - newpi = netfs_make_protid (netfs_make_peropen (np, flags, diruser->po), - iohelp_dup_iouser (diruser->user)); - *newfile = ports_get_right (newpi); - *newfiletype = MACH_MSG_TYPE_MAKE_SEND; - ports_port_deref (newpi); + err = iohelp_dup_iouser (&user, diruser->user); + if (! err) + { + newpi = netfs_make_protid (netfs_make_peropen (np, flags, + diruser->po), + user); + *newfile = ports_get_right (newpi); + *newfiletype = MACH_MSG_TYPE_MAKE_SEND; + ports_port_deref (newpi); + } netfs_nput (np); - return 0; } - else - return err; + + return err; } |