Skip to content
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

STR #1699 not completely resolved #1714

Closed
michaelrsweet opened this issue May 22, 2006 · 4 comments
Closed

STR #1699 not completely resolved #1714

michaelrsweet opened this issue May 22, 2006 · 4 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2.0
CUPS.org User: twwlogin

I backported the patch for STR #1699 to cups-1.2.0 on Solaris 10/x86 and still see a problem. Comment #6 indicates how to duplicate the problem. Set "LogLevel debug2" in cupsd.conf and browse to http://[server]:631/admin. CUPS will crash with the following backtrace:
[1] strlen(0x80a0f23, 0x802c8e4, 0x802c890, 0x0), at 0xfeba4acc
[2] vsnprintf(0x80cd420, 0x2000, 0x80a0efc, 0x802c8e4), at 0xfebfd1bb
=>[3] cupsdLogMessage(level = 9, message = 0x80a0efc "pipe_command: command="%s", options="%s"", ... = 0x80fc158, ...), line 213 in "log.c"
[4] pipe_command(con = 0x8101998, infile = 15, outfile = 0x8104dd0, command = 0x80fc158 "/opt/TWWfsw/cups12/lib/cgi-bin/admin.cgi", options = (nil), root = 0), line 3510 in "client.c"
[5] cupsdSendCommand(con = 0x8101998, command = 0x80fc158 "/opt/TWWfsw/cups12/lib/cgi-bin/admin.cgi", options = (nil), root = 0), line 1899 in "client.c"
[6] cupsdReadClient(con = 0x8101998), line 1190 in "client.c"
[7] main(argc = 2, argv = 0x8047710), line 901 in "main.c"

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: twwlogin

After applying the patch for scheduler/client.c, CUPS now generates the following backtrace:
[1] strlen(0x809e4d5, 0x8039fdc, 0x8039f90, 0x0), at 0xfeba4acc
[2] vsnprintf(0x80cd458, 0x2000, 0x809e4a4, 0x8039fdc), at 0xfebfd1bb
=>[3] cupsdLogMessage(level = 9, message = 0x809e4a4 "cupsdIsAuthorized: con->uri="%s", con->best=%p(%s)", ... = 0x8115a22, ...), line 213 in "log.c"
[4] cupsdIsAuthorized(con = 0x81129f8, owner = (nil)), line 1500 in "auth.c"
[5] cupsdCheckPolicy(p = 0x80c6280, con = 0x81129f8, owner = (nil)), line 217 in "policy.c"
[6] get_printers(con = 0x81129f8, type = 0), line 5770 in "ipp.c"
[7] cupsdProcessIPPRequest(con = 0x81129f8), line 523 in "ipp.c"
[8] cupsdReadClient(con = 0x81129f8), line 1854 in "client.c"
[9] main(argc = 2, argv = 0x8047710), line 901 in "main.c"

This is because con->best->location = 0x00 and scheduler/auth.c, ~line 1500, has:
cupsdLogMessage(CUPSD_LOG_DEBUG2,
"cupsdIsAuthorized: con->uri="%s", con->best=%p(%s)",
con->uri, con->best, con->best ? con->best->location : "");

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: twwlogin

Uploaded str1714.patch to resolve more issues from str1699.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

Thanks for the patch!

@michaelrsweet
Copy link
Collaborator Author

"str1714.patch":

Index: scheduler/client.c

--- scheduler/client.c.orig 2006-05-12 17:50:07.780299000 -0500
+++ scheduler/client.c 2006-05-21 23:16:55.549733000 -0500
@@ -1376,7 +1376,8 @@
cupsdLogMessage(CUPSD_LOG_DEBUG2,
"cupsdReadClient: %d command="%s", "
"options = "%s"",

  •                 con->http.fd, con->command, con->options);
    
  •                 con->http.fd, con->command,
    
  •                 con->options ? con->options : "(null)");
    
      if (con->http.version <= HTTP_1_0)
    con->http.keep_alive = HTTP_KEEPALIVE_OFF;
    

    @@ -3507,7 +3508,7 @@

    cupsdLogMessage(CUPSD_LOG_DEBUG2,
    "pipe_command: command="%s", options="%s"",

  •              command, options);
    
  •              command, options ? options : "(null)");
    

    argv[0] = command;
    query_string = NULL;

    Index: scheduler/auth.c

    --- scheduler/auth.c.orig 2006-05-21 23:21:58.800123000 -0500
    +++ scheduler/auth.c 2006-05-21 23:22:38.096259000 -0500
    @@ -1497,7 +1497,8 @@

    cupsdLogMessage(CUPSD_LOG_DEBUG2,
    "cupsdIsAuthorized: con->uri="%s", con->best=%p(%s)",

  •              con->uri, con->best, con->best ? con->best->location : "");
    
  •              con->uri, con->best, con->best ? con->best->location ?
    
  •              con->best->location : "(null)" : "");
    

    if (owner)
    cupsdLogMessage(CUPSD_LOG_DEBUG2,
    "cupsdIsAuthorized: owner="%s"", owner);

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

No branches or pull requests

1 participant