("Can not print on Debian/CUPS due to error |Xprt_64:lpr: unable to print file: server-error-not-accepting-jobs|"): Xprt did not setup the list of supplementary group ids, causing print failure when the the calling user must be a member in a specific group to be allowed to print.
This commit is contained in:
parent
75d96afcc4
commit
0498d818fe
|
@ -1170,7 +1170,14 @@ SendFileToCommand(
|
|||
|
||||
if((pPasswd = getpwnam(userName)))
|
||||
{
|
||||
setuid((uid_t)pPasswd->pw_uid);
|
||||
if (setgid((gid_t)pPasswd->pw_gid) != 0)
|
||||
perror("SendFileToCommand: setgid() failure.");
|
||||
|
||||
if (initgroups(userName, (gid_t)pPasswd->pw_gid) != 0)
|
||||
perror("SendFileToCommand: initgroups() failure.");
|
||||
|
||||
if (setuid((uid_t)pPasswd->pw_uid) != 0)
|
||||
perror("SendFileToCommand: setuid() failure.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user