From: Andreas Schneider Date: Fri, 29 Nov 2019 07:28:28 +0000 (+0100) Subject: s3:smbspool: Leave early if we print as root X-Git-Tag: ldb-2.1.0~384 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67f455c3d576a0bc3174fd10cf4f3244621b6b13;p=thirdparty%2Fsamba.git s3:smbspool: Leave early if we print as root Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner Autobuild-User(master): Günther Deschner Autobuild-Date(master): Mon Dec 9 14:18:11 UTC 2019 on sn-devel-184 --- diff --git a/source3/client/smbspool_krb5_wrapper.c b/source3/client/smbspool_krb5_wrapper.c index 9290893163d..6a3e444f480 100644 --- a/source3/client/smbspool_krb5_wrapper.c +++ b/source3/client/smbspool_krb5_wrapper.c @@ -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",