Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpvfs Permissions work better if you spec...



details:   https://anonhg.NetBSD.org/src/rev/0474bdb4ca99
branches:  trunk
changeset: 796166:0474bdb4ca99
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri May 23 10:56:36 2014 +0000

description:
Permissions work better if you specify them in octal ...

Also, do an explicit chmod of /tmp to account for cmask getting in the way.

diffstat:

 sys/rump/librump/rumpvfs/rump_vfs.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 5829c383924f -r 0474bdb4ca99 sys/rump/librump/rumpvfs/rump_vfs.c
--- a/sys/rump/librump/rumpvfs/rump_vfs.c       Fri May 23 08:17:08 2014 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs.c       Fri May 23 10:56:36 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_vfs.c,v 1.79 2014/05/22 12:31:28 pooka Exp $      */
+/*     $NetBSD: rump_vfs.c,v 1.80 2014/05/23 10:56:36 pooka Exp $      */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,12 +29,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.79 2014/05/22 12:31:28 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.80 2014/05/23 10:56:36 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
 #include <sys/conf.h>
 #include <sys/evcnt.h>
+#include <sys/fcntl.h>
 #include <sys/filedesc.h>
 #include <sys/fstrans.h>
 #include <sys/lockf.h>
@@ -137,7 +138,8 @@
 
        /* "mtree": create /dev and /tmp */
        do_sys_mkdir("/dev", 0755, UIO_SYSSPACE);
-       do_sys_mkdir("/tmp", 1777, UIO_SYSSPACE);
+       do_sys_mkdir("/tmp", 01777, UIO_SYSSPACE);
+       do_sys_chmodat(curlwp, AT_FDCWD, "/tmp", 01777, 0);
 
        rump_proc_vfs_init = pvfs_init;
        rump_proc_vfs_release = pvfs_rele;



Home | Main Index | Thread Index | Old Index