[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Linux-cluster] Permissions in create_dlm_namespace() call ignored



Assuming that the named DLM namespace does not
already exist, the following code should
create a namespace which any process on the system
can open. However it doesn't work and subsequent
processes must be root or else the open_lockspace
call fails with
   "Error opening dlm namespace: Permission denied"
   
        dlm_lshandle_t dlmnamesp;
        int i;

        i = umask(0);
        dlmnamesp = dlm_create_lockspace("play",0777);
                                /* S_IRWXU|S_IRWXG|S_IRWXO */
        if (!dlmnamesp) {
           dlmnamesp = dlm_open_lockspace("play");
           if (!dlmnamesp) {
              umask(i);
              perror("Error opening dlm namespace");
              exit(1);
           }
        }
        umask(i);
        if (dlm_ls_pthread_init(dlmnamesp)) {
           perror("dlm_pthread_init failed");
           exit(1);
        }

[jeff lx3 ~]$ ls -l /dev/misc
total 0
?---------  ? ? ? ?           ? dlm-control
?---------  ? ? ? ?           ? dlm_play
?---------  ? ? ? ?           ? dlm_default
?---------  ? ? ? ?           ? dlm_testls
[jeff lx3 ~]$


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]