s3-printing: use euid for vlp job tracking
authorDavid Disseldorp <ddiss@samba.org>
Thu, 21 Jun 2012 13:49:55 +0000 (15:49 +0200)
committerDavid Disseldorp <ddiss@samba.org>
Mon, 25 Jun 2012 12:42:16 +0000 (14:42 +0200)
vlp can be called by print_run_command as root with euids set
appropriately, vlp should use this to track the job owner.

source3/printing/tests/vlp.c

index 66860e5ada31efc59c73934bb382d7bd2b9df62c..648fca106d0bfac981e7fea5c70ddebc79346352 100644 (file)
@@ -236,7 +236,8 @@ static int print_command(int argc, char **argv)
 
        slprintf(job.jobname, sizeof(job.jobname) - 1, "%s", argv[2]);
 
-       if (!(pw = getpwuid(getuid()))) {
+       if (!(pw = getpwuid(geteuid()))) {
+               printf("getpwuid failed\n");
                return 1;
        }