Enable locking of fnetnodes.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Fri, 5 Jan 2007 18:36:33 +0000 (18:36 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Fri, 5 Jan 2007 18:36:33 +0000 (18:36 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@805 959494ce-11ee-0310-bf91-de5d638817bd

daemon/ui.c

index 96c1eb7..9b3eba6 100644 (file)
@@ -641,6 +641,11 @@ static void cmd_disconnect(struct socket *sk, struct uidata *data, int argc, wch
            sq(sk, 0, L"510", L"No such node", NULL);
            return;
        }
+       if(wpfind(fn->args, L"locked") && !((data->userinfo->perms & PERM_ADMIN) || !wcscmp(data->userinfo->name, fn->owner)))
+       {
+           sq(sk, 0, L"502", L"This node is locked and you are neither administrator nor its owner", NULL);
+           return;
+       }
        killfnetnode(fn);
        unlinkfnetnode(fn);
     }