Comment 4 for bug 9107

Revision history for this message
Matt Zimmerman (mdz) wrote :

According to the comments upstream, the command-line parameter should not be
used for authentication info, instead preferring the environment variable (which
is at least marginally less visible). According to the smbspool manpage:

       smbspool tries to get the URI from argv[0]. If argv[0] contains the
       name of the program then it looks in the DEVICE_URI environment vari‐
       able.

The code in smbspool looks like this:

  if (strncmp(argv[0], "smb://", 6) == 0)
    strncpy(uri, argv[0], sizeof(uri) - 1);
  else if (getenv("DEVICE_URI") != NULL)
    strncpy(uri, getenv("DEVICE_URI"), sizeof(uri) - 1);

Please try the attached patch instead of the change you made before.