summaryrefslogtreecommitdiff
path: root/libdiskfs/dir-mkfile.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-01-04 02:35:25 +0000
committerRoland McGrath <roland@gnu.org>2002-01-04 02:35:25 +0000
commitaca5ba7fc76dca693cdf4539354daa6e4e27a2ac (patch)
tree1613c3d4228d664d88718b1f03bb0c226508b0ff /libdiskfs/dir-mkfile.c
parent587b5be05c41ee13059e8c1fbcf5f021f5d29d02 (diff)
2002-01-03 Roland McGrath <roland@frob.com>
* dir-lookup.c (diskfs_S_dir_lookup): Clear S_ITRANS bits in MODE. * dir-mkdir.c (diskfs_S_dir_mkdir): Likewise. * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise.
Diffstat (limited to 'libdiskfs/dir-mkfile.c')
-rw-r--r--libdiskfs/dir-mkfile.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/libdiskfs/dir-mkfile.c b/libdiskfs/dir-mkfile.c
index 83158916..0385c56a 100644
--- a/libdiskfs/dir-mkfile.c
+++ b/libdiskfs/dir-mkfile.c
@@ -1,5 +1,5 @@
-/*
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation
+/* libdiskfs implementation of fs.defs: dir_mkfile
+ Copyright (C) 1994,95,96,97,2002 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -8,7 +8,7 @@ it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-The GNU Hurd is distributed in the hope that it will be useful,
+The GNU Hurd is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -34,7 +34,7 @@ diskfs_S_dir_mkfile (struct protid *cred,
struct node *dnp, *np;
error_t err;
struct protid *newpi;
-
+
if (!cred)
return EOPNOTSUPP;
if (diskfs_check_readonly ())
@@ -52,8 +52,8 @@ diskfs_S_dir_mkfile (struct protid *cred,
mutex_unlock (&dnp->lock);
return err;
}
-
- mode &= ~(S_IFMT | S_ISPARE | S_ISVTX);
+
+ mode &= ~(S_IFMT | S_ISPARE | S_ISVTX | S_ITRANS);
mode |= S_IFREG;
err = diskfs_create_node (dnp, 0, mode, &np, cred, 0);
mutex_unlock (&dnp->lock);
@@ -66,7 +66,7 @@ diskfs_S_dir_mkfile (struct protid *cred,
if (err)
return err;
-
+
flags &= (O_READ | O_WRITE | O_EXEC);
err = diskfs_create_protid (diskfs_make_peropen (np, flags, cred->po),
cred->user, &newpi);
@@ -81,5 +81,3 @@ diskfs_S_dir_mkfile (struct protid *cred,
return err;
}
-
-