diff options
author | Thomas Bushnell <thomas@gnu.org> | 1997-05-20 19:57:13 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1997-05-20 19:57:13 +0000 |
commit | f44d3a4bc1d086012171cf68d4e198c7b4f184f8 (patch) | |
tree | 099f492dbe4c028d3909179afe67ed97ecbf2a3a /nfs/nfs.c | |
parent | 340a92d864a03c81452abc7b6fb63135f82b1ce6 (diff) |
Tue May 20 15:35:39 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* nfs.c (xdr_encode_create_state): New arg OWNER. Set the owner
of the new file to it. All callers changed.
* nfs.h (xdr_encode_create_state): Update prototype.
* ops.c (netfs_attempt_mkdir): If owner didn't get set correctly
(some servers ignore it) then try a chown.
(netfs_attempt_create_file): Likewise.
Diffstat (limited to 'nfs/nfs.c')
-rw-r--r-- | nfs/nfs.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,5 +1,5 @@ /* XDR frobbing and lower level routines for NFS client - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -290,15 +290,17 @@ xdr_encode_sattr_times (int *p, struct timespec *atime, struct timespec *mtime) return p; } -/* Encode MODE and a size of 0 into an otherwise empty sattr. */ +/* Encode MODE, a size of zero, and the specified owner into an otherwise + empty sattr. */ int * xdr_encode_create_state (int *p, - mode_t mode) + mode_t mode, + uid_t owner) { if (protocol_version == 2) { *p++ = htonl (hurd_mode_to_nfs_mode (mode)); - *p++ = -1; /* uid */ + *p++ = htonl (owner); /* uid */ *p++ = -1; /* gid */ *p++ = 0; /* size */ *p++ = -1; /* atime sec */ @@ -310,7 +312,8 @@ xdr_encode_create_state (int *p, { *p++ = htonl (1); /* mode */ *p++ = htonl (hurd_mode_to_nfs_mode (mode)); - *p++ = 0; /* no uid */ + *p++ = htonl (1); /* set uid */ + *p++ = htonl (owner); *p++ = 0; /* no gid */ *p++ = htonl (1); /* set size */ p = xdr_encode_64bit (p, 0); |