Module: xenomai-3
Branch: master
Commit: 392a64303a3270e2f113a9e53c73b3ddbf551382
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=392a64303a3270e2f113a9e53c73b3ddbf551382

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Wed Jan  7 18:23:32 2015 +0100

sysregd: Adjust access rights of mount point directories

This enables sharing the registry across users of the same group the
registry root is assigned to. Such an assignment can be done manually or
with the help of a to-be-added multi-user preparation script.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 lib/copperplate/regd/regd.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c
index 637bd30..3f7f378 100644
--- a/lib/copperplate/regd/regd.c
+++ b/lib/copperplate/regd/regd.c
@@ -147,6 +147,12 @@ static int create_directory_recursive(const char *dir) /* 
absolute path */
                p = strtok(NULL, "/");
        }
 
+       if (shared) {
+               ret = chmod(dir, 0775 | S_ISGID);
+               if (ret)
+                       return -errno;
+       }
+
        free(s);
        chdir(rootdir);         /* Back to rootdir */
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to