netapi: give more correct error code in NetUserGetInfo.
authorGünther Deschner <gd@samba.org>
Wed, 27 Aug 2008 17:28:34 +0000 (19:28 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 29 Aug 2008 11:58:01 +0000 (13:58 +0200)
Guenther
(This used to be commit c66651b6fb023e5b0952fd135589eb955f51fa12)

source3/lib/netapi/user.c

index 887ab940025abad5e498a3d44dcc188d06e345e5..47053f29af1729217b3ff917da60e0c157105dea 100644 (file)
@@ -1263,14 +1263,20 @@ WERROR NetUserGetInfo_r(struct libnetapi_ctx *ctx,
 
        switch (r->in.level) {
                case 0:
-               /* case 1: */
                case 10:
                case 20:
                case 23:
                        break;
-               default:
+               case 1:
+               case 2:
+               case 3:
+               case 4:
+               case 11:
                        werr = WERR_NOT_SUPPORTED;
                        goto done;
+               default:
+                       werr = WERR_UNKNOWN_LEVEL;
+                       goto done;
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,