s3: let g_lock_unlock() return more specific status codes on failure
authorGregor Beck <gbeck@sernet.de>
Wed, 31 Aug 2011 08:19:18 +0000 (10:19 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 11 Oct 2011 13:21:07 +0000 (15:21 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
source3/lib/g_lock.c

index c3d863f9a44fb2e6f4309cb1f05bab5aa3b33c69..a37fe932c7e3dad2e0a74ca2f8c7abfa47d7dc45 100644 (file)
@@ -520,7 +520,7 @@ static NTSTATUS g_lock_force_unlock(struct g_lock_ctx *ctx, const char *name,
 
        if (!g_lock_parse(talloc_tos(), rec->value, &num_locks, &locks)) {
                DEBUG(10, ("g_lock_parse for %s failed\n", name));
-               status = NT_STATUS_INTERNAL_ERROR;
+               status = NT_STATUS_FILE_INVALID;
                goto done;
        }
 
@@ -532,7 +532,7 @@ static NTSTATUS g_lock_force_unlock(struct g_lock_ctx *ctx, const char *name,
 
        if (i == num_locks) {
                DEBUG(10, ("g_lock_force_unlock: Lock not found\n"));
-               status = NT_STATUS_INTERNAL_ERROR;
+               status = NT_STATUS_NOT_FOUND;
                goto done;
        }