]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbspool: Leave early if we print as root
authorAndreas Schneider <asn@samba.org>
Fri, 29 Nov 2019 07:28:28 +0000 (08:28 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 9 Dec 2019 14:18:11 +0000 (14:18 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Dec  9 14:18:11 UTC 2019 on sn-devel-184

source3/client/smbspool_krb5_wrapper.c

index 9290893163da8ba9f43094b1bfb3b436f94ce0d9..6a3e444f480d243d0c29d66f9769651c9941ee11 100644 (file)
@@ -234,6 +234,11 @@ int main(int argc, char *argv[])
        }
        uid = (uid_t)tmp;
 
+       /* If we are printing as the root user, we're done here. */
+       if (uid == 0) {
+               goto smbspool;
+       }
+
        pwd = getpwuid(uid);
        if (pwd == NULL) {
                CUPS_SMB_ERROR("Failed to find system user: %u - %s",