static void
do_search(char *query) /* I - Search string */
{
-
+ (void)query;
}
}
.cups-header form {
display: block;
- padding: 15px 30px !important;
+ margin: 0px 30px;
+ padding: 15px 0px !important;
+}
+.cups-header span.label {
+ color: #ccc;
+ display: block;
+ font-style: italic;
+ margin: 0px 30px;
+ padding: 15px 0px !important;
}
.cups-body {
int type; /* Authentication type */
const char *authorization; /* Pointer into Authorization string */
char *ptr, /* Pointer into string */
+ bearer[2048], /* CUPS_BEARER cookie string */
username[HTTP_MAX_VALUE],
/* Username string */
password[HTTP_MAX_VALUE];
authorization = httpGetField(con->http, HTTP_FIELD_AUTHORIZATION);
+ if (!*authorization && type == CUPSD_AUTH_BEARER && httpGetCookieValue(con->http, "CUPS_BEARER", bearer, sizeof(bearer)))
+ authorization = "Bearer COOKIE";
+
username[0] = '\0';
password[0] = '\0';
int pamerr; /* PAM error code */
struct pam_conv pamdata; /* PAM conversation data */
cupsd_authdata_t data; /* Authentication data */
-
+ struct passwd *userinfo; /* User information */
cupsCopyString(data.username, username, sizeof(data.username));
cupsCopyString(data.password, password, sizeof(data.password));
}
pam_end(pamh, PAM_SUCCESS);
+
+ /*
+ * Copy GECOS information, if available, to get the user's real name...
+ */
+
+ if ((userinfo = getpwnam(username)) != NULL && userinfo->pw_gecos)
+ cupsCopyString(con->realname, userinfo->pw_gecos, sizeof(con->realname));
#else
cupsdLogClient(con, CUPSD_LOG_ERROR, "No authentication support is available.");
return;
while (isspace(*authorization & 255))
authorization ++;
+ if (!strcmp(authorization, "COOKIE"))
+ authorization = bearer; // Use the cookie value for authorization
+
// Decode and validate the JWT...
if ((jwt = cupsJWTImportString(authorization, CUPS_JWS_FORMAT_COMPACT)) == NULL)
{
/* Output token for username */
gss_name_t client_name; /* Client name */
-# ifdef __APPLE__
+# ifdef __APPLE__DISABLED // Remove DISABLED if ever this code is used for macOS installer
/*
* If the weak-linked GSSAPI/Kerberos library is not present, don't try
* to use it...
cupsdLogClient(con, CUPSD_LOG_WARN, "GSSAPI/Kerberos authentication failed because the Kerberos framework is not present.");
return;
}
-# endif /* __APPLE__ */
+# endif /* __APPLE__DISABLED */
/*
* Find the start of the Kerberos input token...
*/
cupsCopyString(con->username, username, sizeof(con->username));
+
+ if (!con->realname[0])
+ cupsCopyString(con->realname, username, sizeof(con->realname));
+
cupsCopyString(con->password, password, sizeof(con->password));
}
lang[1024], /* LANG environment variable */
path_info[1024], /* PATH_INFO environment variable */
remote_addr[1024], /* REMOTE_ADDR environment variable */
+ remote_email[1024], /* REMOTE_EMAIL environment variable */
remote_host[1024], /* REMOTE_HOST environment variable */
+ remote_name[1024], /* REMOTE_NAME ("real name") environment variable */
remote_user[1024], /* REMOTE_USER environment variable */
script_filename[1024], /* SCRIPT_FILENAME environment variable */
script_name[1024], /* SCRIPT_NAME environment variable */
if (path_info[0])
envp[envc ++] = path_info;
+ if (con->email[0])
+ {
+ snprintf(remote_email, sizeof(remote_email), "REMOTE_EMAIL=%s", con->email);
+ envp[envc ++] = remote_email;
+ }
+
+ if (con->realname[0])
+ {
+ snprintf(remote_name, sizeof(remote_name), "REMOTE_NAME=%s", con->realname);
+ envp[envc ++] = remote_name;
+ }
+
if (con->username[0])
{
snprintf(remote_user, sizeof(remote_user), "REMOTE_USER=%s", con->username);
-
envp[envc ++] = remote_user;
}
CFStringRef dict_key; /* Key in factory profile dictionary */
+# ifdef __APPLE__DISABLED // Remove DISABLED if ever this code is used for macOS installer
/*
* Make sure ColorSync is available...
*/
if (&ColorSyncRegisterDevice == NULL)
return;
+# endif // __APPLE__DISABLED
/*
* Try opening the PPD file for this printer...
}
}
--></SCRIPT>
- <title>{title} - CUPS @CUPS_VERSION@</title>
+ <title>{title} - {ENV:CUPS_VERSION}</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<ul>
<li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
- <li><a href="/">Hjem</a></li>
+ <li><a {SECTION=home?class="active" :}href="/">Hjem</a></li>
<li><a {SECTION=admin?class="active" :}href="/admin">Administration</a></li>
<li><a {SECTION=classes?class="active" :}href="/classes/">Klasser</a></li>
<li><a {SECTION=help?class="active" :}href="/help/">Hjælp</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">Jobs</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">Printere</a></li>
+ <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
+ <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
<div class="cups-body">
}
}
--></SCRIPT>
- <title>{title} - CUPS @CUPS_VERSION@</title>
+ <title>{title} - {ENV:CUPS_VERSION}</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<ul>
<li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
- <li><a href="/">Startseite</a></li>
+ <li><a {SECTION=home?class="active" :}href="/">Startseite</a></li>
<li><a {SECTION=admin?class="active" :}href="/admin">Verwaltung</a></li>
<li><a {SECTION=classes?class="active" :}href="/classes/">Klassen</a></li>
<li><a {SECTION=help?class="active" :}href="/help/">Hilfe</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">Aufträge</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">Drucker</a></li>
+ <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
+ <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
<div class="cups-body">
}
}
--></SCRIPT>
- <title>{title} - CUPS @CUPS_VERSION@</title>
+ <title>{title} - {ENV:CUPS_VERSION}</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<ul>
<li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
- <li><a href="/">Inicio</a></li>
+ <li><a {SECTION=home?class="active" :}href="/">Inicio</a></li>
<li><a {SECTION=admin?class="active" :}href="/admin">Administración</a></li>
<li><a {SECTION=classes?class="active" :}href="/classes/">Clases</a></li>
<li><a {SECTION=help?class="active" :}href="/help/">Ayuda</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">Trabajos</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">Impresoras</a></li>
+ <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
+ <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
<div class="cups-body">
}
}
--></SCRIPT>
- <title>{title} - CUPS @CUPS_VERSION@</title>
+ <title>{title} - {ENV:CUPS_VERSION}</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<ul>
<li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
- <li><a href="/">Home</a></li>
+ <li><a {SECTION=home?class="active" :}href="/">Home</a></li>
<li><a {SECTION=admin?class="active" :}href="/admin">Administration</a></li>
<li><a {SECTION=classes?class="active" :}href="/classes/">Classes</a></li>
<li><a {SECTION=help?class="active" :}href="/help/">Aide</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">Tâches</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">Imprimantes</a></li>
+ <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
+ <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
<div class="cups-body">
<li><a {SECTION=help?class="active" :}href="/help/">Help</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">Jobs</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">Printers</a></li>
- {?ENV:CUPS_OAUTH_SERVER=?{?ENV:REMOTE_USER}:{?ENV:CUPS_OAUTH_USERNAME} <li class="right"><form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form></li>}
+ <li class="right">{?ENV:REMOTE_USER=?<i>Guest</i>:{ENV:REMOTE_USER}}
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
<li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
}
}
--></SCRIPT>
- <title>{title} - CUPS @CUPS_VERSION@</title>
+ <title>{title} - {ENV:CUPS_VERSION}</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<ul>
<li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
- <li><a href="/">ホーム</a></li>
+ <li><a {SECTION=home?class="active" :}href="/">ホーム</a></li>
<li><a {SECTION=admin?class="active" :}href="/admin">管理</a></li>
<li><a {SECTION=classes?class="active" :}href="/classes/">クラス</a></li>
<li><a {SECTION=help?class="active" :}href="/help/">ヘルプ</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">ジョブ</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">プリンター</a></li>
+ <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
+ <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
<div class="cups-body">
}
}
--></SCRIPT>
- <title>{title} - CUPS @CUPS_VERSION@</title>
+ <title>{title} - {ENV:CUPS_VERSION}</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<ul>
<li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
- <li><a href="/">Start</a></li>
+ <li><a {SECTION=home?class="active" :}href="/">Start</a></li>
<li><a {SECTION=admin?class="active" :}href="/admin">Administracja</a></li>
<li><a {SECTION=classes?class="active" :}href="/classes/">Klasy</a></li>
<li><a {SECTION=help?class="active" :}href="/help/">Pomoc</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">Kolejka</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">Drukarki</a></li>
+ <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
+ <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
<div class="cups-body">
}
}
--></SCRIPT>
- <title>{title} - CUPS @CUPS_VERSION@</title>
+ <title>{title} - {ENV:CUPS_VERSION}</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<ul>
<li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
- <li><a href="/">Início</a></li>
+ <li><a {SECTION=home?class="active" :}href="/">Início</a></li>
<li><a {SECTION=admin?class="active" :}href="/admin">Administração</a></li>
<li><a {SECTION=classes?class="active" :}href="/classes/">Classes</a></li>
<li><a {SECTION=help?class="active" :}href="/help/">Ajuda</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">Trabalhos</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">Impressoras</a></li>
+ <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
+ <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
<div class="cups-body">
}
}
--></SCRIPT>
- <title>{title} - CUPS @CUPS_VERSION@</title>
+ <title>{title} - {ENV:CUPS_VERSION}</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<ul>
<li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
- <li><a href="/">Начало</a></li>
+ <li><a {SECTION=home?class="active" :}href="/">Начало</a></li>
<li><a {SECTION=admin?class="active" :}href="/admin">Администрирование</a></li>
<li><a {SECTION=classes?class="active" :}href="/classes/">Группы</a></li>
<li><a {SECTION=help?class="active" :}href="/help/">Справка</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">Задания</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">Принтеры</a></li>
+ <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
+ <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
<div class="cups-body">
}
}
--></SCRIPT>
- <title>{title} - CUPS @CUPS_VERSION@</title>
+ <title>{title} - {ENV:CUPS_VERSION}</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<ul>
<li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
- <li><a href="/">Hem</a></li>
+ <li><a {SECTION=home?class="active" :}href="/">Hem</a></li>
<li><a {SECTION=admin?class="active" :}href="/admin">Administration</a></li>
<li><a {SECTION=classes?class="active" :}href="/classes/">Klasser</a></li>
<li><a {SECTION=help?class="active" :}href="/help/">Hjälp</a></li>
<li><a {SECTION=jobs?class="active" :}href="/jobs/">Jobb</a></li>
<li><a {SECTION=printers?class="active" :}href="/printers/">Skrivare</a></li>
+ <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+ {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+ </li>
+ <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
</ul>
</div>
<div class="cups-body">
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
- LastUpgradeCheck = 1540;
+ LastUpgradeCheck = 1600;
ORGANIZATIONNAME = "Apple Inc.";
TargetAttributes = {
270695FD1CADF3E200FFE5FB = {
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INSTALL_PATH = /usr/sbin;
- MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INSTALL_PATH = /usr/sbin;
- MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;