New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-root backends should use CUPS_DEFAULT_GROUP #1521

Closed
michaelrsweet opened this Issue Mar 29, 2006 · 3 comments

Comments

Projects
None yet
1 participant
@michaelrsweet
Collaborator

michaelrsweet commented Mar 29, 2006

Version: 1.2b2
CUPS.org User: twaugh.redhat

In CUPS 1.2rc1 I see that the parallel backend no longer runs as
root. The defaults seem to be user lp and group nobody (although
'CUPS_DEFAULT_GROUP' is "lp" in my config.h).

This means that the parallel backend doesn't have permission to open
this device for reading:

crw-rw---- 1 root lp 6, 0 Mar 29 08:52 /dev/lp0

Shouldn't CUPS_DEFAULT_GROUP be used instead of "nobody" here?:

scheduler/conf.c:
340 /*
341 * Find the default group (nobody)...
342 */
343
344 group = getgrnam("nobody");
345 endgrent();

@michaelrsweet

This comment has been minimized.

Collaborator

michaelrsweet commented Mar 29, 2006

CUPS.org User: mike

Reset to priority 2; this is just a default setting issue (adding "Group lp" fixes things with the current release candidate)

@michaelrsweet

This comment has been minimized.

Collaborator

michaelrsweet commented Mar 29, 2006

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet

This comment has been minimized.

Collaborator

michaelrsweet commented Mar 29, 2006

"str1521.patch":

Index: conf.c

--- conf.c (revision 5348)
+++ conf.c (working copy)
@@ -338,22 +338,34 @@
endpwent();

/*

  • * Find the default group (nobody)...
    • Find the default group...
      */
  • group = getgrnam("nobody");
  • group = getgrnam(CUPS_DEFAULT_GROUP);
    endgrent();
  • if (group != NULL)
  • if (group)
    Group = group->gr_gid;
    else
    {
    /*
  • * Use the (historical) NFS nobody group ID (-2 as a 16-bit twos-
  • * complement number...)
    • Fallback to group "nobody"...
      */
  • Group = 65534;
  • group = getgrnam("nobody");
  • endgrent();
  • if (group)
  •  Group = group->gr_gid;
    
  • else
  • {
  • /*
    
  •  \* Use the (historical) NFS nobody group ID (-2 as a 16-bit twos-
    
  •  \* complement number...)
    
  •  */
    
  •  Group = 65534;
    
  • }
    }

/*

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment