s3-lanman: Fix return code for "" printqname in api_DosPrintQGetInfo().
authorGünther Deschner <gd@samba.org>
Wed, 16 Jun 2010 09:04:34 +0000 (11:04 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 16 Jun 2010 10:15:24 +0000 (12:15 +0200)
Guenther

source3/smbd/lanman.c

index 8c262628c7728d25e8a8ba810d996c7cdbfe649b..72d488ecabf870aec550869b5ddbb6c847e76c0b 100644 (file)
@@ -819,6 +819,11 @@ static bool api_DosPrintQGetInfo(struct smbd_server_connection *sconn,
 
        ZERO_STRUCT(handle);
 
+       if (QueueName == NULL || (strlen(QueueName) < 1)) {
+               desc.errcode = W_ERROR_V(WERR_INVALID_PARAM);
+               goto out;
+       }
+
        status = rpc_connect_spoolss_pipe(conn, &cli);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("api_DosPrintQGetInfo: could not connect to spoolss: %s\n",