X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fui.c;h=9b3eba6643edc8b521d764cde2f1c64136bccc14;hb=186031535760dcfde374afa84946ec24fcf5bb3e;hp=96c1eb7ebc2c475376888cf3672e7f2fbf7856d0;hpb=d5e00af48ff2ab4817b391fb81d423dcd43b04ae;p=doldaconnect.git diff --git a/daemon/ui.c b/daemon/ui.c index 96c1eb7..9b3eba6 100644 --- a/daemon/ui.c +++ b/daemon/ui.c @@ -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); }