summaryrefslogtreecommitdiff
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
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.
-rw-r--r--libdiskfs/dir-lookup.c2
-rw-r--r--libdiskfs/dir-mkdir.c6
-rw-r--r--libdiskfs/dir-mkfile.c16
3 files changed, 11 insertions, 13 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index 4838b8c7..fe68251e 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -183,7 +183,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
{
if (error == ENOENT)
{
- mode &= ~(S_IFMT | S_ISPARE | S_ISVTX);
+ mode &= ~(S_IFMT | S_ISPARE | S_ISVTX | S_ITRANS);
mode |= S_IFREG;
error = diskfs_create_node (dnp, path, mode, &np, dircred, ds);
if (diskfs_synchronous)
diff --git a/libdiskfs/dir-mkdir.c b/libdiskfs/dir-mkdir.c
index 1f4ff0ea..30d7a3b4 100644
--- a/libdiskfs/dir-mkdir.c
+++ b/libdiskfs/dir-mkdir.c
@@ -1,5 +1,5 @@
/* libdiskfs implementation of fs.defs: dir_mkdir
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation
+ Copyright (C) 1992,93,94,95,96,97,2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -31,7 +31,7 @@ diskfs_S_dir_mkdir (struct protid *dircred,
if (!dircred)
return EOPNOTSUPP;
-
+
dnp = dircred->po->np;
if (diskfs_check_readonly ())
return EROFS;
@@ -51,7 +51,7 @@ diskfs_S_dir_mkdir (struct protid *dircred,
return error;
}
- mode &= ~(S_ISPARE | S_IFMT);
+ mode &= ~(S_ISPARE | S_IFMT | S_ITRANS);
mode |= S_IFDIR;
error = diskfs_create_node (dnp, name, mode, &np, dircred, ds);
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;
}
-
-