From: Michael R Sweet Date: Thu, 24 Jan 2019 17:46:23 +0000 (-0500) Subject: Remove remaining references to subscriptions and samba. X-Git-Tag: v2.3b8~124 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=commitdiff_plain;h=6648f8c125a435c68d392013d68afb627a0e4a4e Remove remaining references to subscriptions and samba. --- diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c index f8c7e157b..509625204 100644 --- a/cgi-bin/admin.c +++ b/cgi-bin/admin.c @@ -41,7 +41,6 @@ static void do_am_printer(http_t *http, int modify); static void do_config_server(http_t *http); static void do_delete_class(http_t *http); static void do_delete_printer(http_t *http); -static void do_export(http_t *http); static void do_list_printers(http_t *http); static void do_menu(http_t *http); static void do_set_allowed_users(http_t *http); @@ -164,8 +163,6 @@ main(void) do_set_options(http, 0); else if (!strcmp(op, "config-server")) do_config_server(http); - else if (!strcmp(op, "export-samba")) - do_export(http); else { /* @@ -1938,141 +1935,6 @@ do_delete_printer(http_t *http) /* I - HTTP connection */ } -/* - * 'do_export()' - Export printers to Samba. - */ - -static void -do_export(http_t *http) /* I - HTTP connection */ -{ - int i, j; /* Looping vars */ - ipp_t *request, /* IPP request */ - *response; /* IPP response */ - const char *username, /* Samba username */ - *password, /* Samba password */ - *export_all; /* Export all printers? */ - int export_count, /* Number of printers to export */ - printer_count; /* Number of available printers */ - const char *name, /* What name to pull */ - *dest; /* Current destination */ - char ppd[1024]; /* PPD file */ - - - /* - * Get form data... - */ - - username = cgiGetVariable("USERNAME"); - password = cgiGetVariable("PASSWORD"); - export_all = cgiGetVariable("EXPORT_ALL"); - export_count = cgiGetSize("EXPORT_NAME"); - - /* - * Get list of available printers... - */ - - cgiSetSize("PRINTER_NAME", 0); - cgiSetSize("PRINTER_EXPORT", 0); - - request = ippNewRequest(CUPS_GET_PRINTERS); - - ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_ENUM, - "printer-type", 0); - - ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_ENUM, - "printer-type-mask", CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE); - - ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, - "requested-attributes", NULL, "printer-name"); - - if ((response = cupsDoRequest(http, request, "/")) != NULL) - { - cgiSetIPPVars(response, NULL, NULL, NULL, 0); - ippDelete(response); - - if (!export_all) - { - printer_count = cgiGetSize("PRINTER_NAME"); - - for (i = 0; i < printer_count; i ++) - { - dest = cgiGetArray("PRINTER_NAME", i); - - for (j = 0; j < export_count; j ++) - if (!_cups_strcasecmp(dest, cgiGetArray("EXPORT_NAME", j))) - break; - - cgiSetArray("PRINTER_EXPORT", i, j < export_count ? "Y" : ""); - } - } - } - - /* - * Export or get the printers to export... - */ - - if (username && *username && password && *password && - (export_all || export_count > 0)) - { - /* - * Do export... - */ - - fputs("DEBUG: Export printers...\n", stderr); - - if (export_all) - { - name = "PRINTER_NAME"; - export_count = cgiGetSize("PRINTER_NAME"); - } - else - name = "EXPORT_NAME"; - - for (i = 0; i < export_count; i ++) - { - dest = cgiGetArray(name, i); - - if (!cupsAdminCreateWindowsPPD(http, dest, ppd, sizeof(ppd))) - break; - - j = cupsAdminExportSamba(dest, ppd, "localhost", username, password, - stderr); - - unlink(ppd); - - if (!j) - break; - } - - if (i < export_count) - cgiSetVariable("ERROR", cupsLastErrorString()); - else - { - cgiStartHTML(cgiText(_("Export Printers to Samba"))); - cgiCopyTemplateLang("samba-exported.tmpl"); - cgiEndHTML(); - return; - } - } - else if (username && !*username) - cgiSetVariable("ERROR", - cgiText(_("A Samba username is required to export " - "printer drivers"))); - else if (username && (!password || !*password)) - cgiSetVariable("ERROR", - cgiText(_("A Samba password is required to export " - "printer drivers"))); - - /* - * Show form... - */ - - cgiStartHTML(cgiText(_("Export Printers to Samba"))); - cgiCopyTemplateLang("samba-export.tmpl"); - cgiEndHTML(); -} - - /* * 'do_list_printers()' - List available printers. */ @@ -2384,55 +2246,6 @@ do_menu(http_t *http) /* I - HTTP connection */ cupsFreeOptions(num_settings, settings); - /* - * See if Samba and the Windows drivers are installed... - */ - - if ((datadir = getenv("CUPS_DATADIR")) == NULL) - datadir = CUPS_DATADIR; - - snprintf(filename, sizeof(filename), "%s/drivers/pscript5.dll", datadir); - if (!access(filename, R_OK)) - { - /* - * Found Windows 2000 driver file, see if we have smbclient and - * rpcclient... - */ - - if (cupsFileFind("smbclient", getenv("PATH"), 1, filename, - sizeof(filename)) && - cupsFileFind("rpcclient", getenv("PATH"), 1, filename, - sizeof(filename))) - cgiSetVariable("HAVE_SAMBA", "Y"); - else - { - if (!cupsFileFind("smbclient", getenv("PATH"), 1, filename, - sizeof(filename))) - fputs("ERROR: smbclient not found!\n", stderr); - - if (!cupsFileFind("rpcclient", getenv("PATH"), 1, filename, - sizeof(filename))) - fputs("ERROR: rpcclient not found!\n", stderr); - } - } - else - perror(filename); - - /* - * Subscriptions... - */ - - request = ippNewRequest(IPP_GET_SUBSCRIPTIONS); - - ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", - NULL, "ipp://localhost/"); - - if ((response = cupsDoRequest(http, request, "/")) != NULL) - { - cgiSetIPPVars(response, NULL, NULL, NULL, 0); - ippDelete(response); - } - /* * Finally, show the main menu template... */ diff --git a/templates/admin.tmpl b/templates/admin.tmpl index a5660e2e0..596696e68 100644 --- a/templates/admin.tmpl +++ b/templates/admin.tmpl @@ -6,7 +6,6 @@
- {have_samba?
:}

Classes

diff --git a/templates/da/admin.tmpl b/templates/da/admin.tmpl index 06fd23589..4b26c250c 100644 --- a/templates/da/admin.tmpl +++ b/templates/da/admin.tmpl @@ -6,7 +6,6 @@
- {have_samba?
:}

Klasser

diff --git a/templates/da/samba-export.tmpl b/templates/da/samba-export.tmpl deleted file mode 100644 index ad7890830..000000000 --- a/templates/da/samba-export.tmpl +++ /dev/null @@ -1,55 +0,0 @@ - - -
- - - -

Eksportér printere til Samba

- -{error?

Kan ikke eksportere printere til Samba\:

-
{error}
-

Se error_log-filen for mere information.

: -

Siden giver dig mulighed for at eksportere printere til Samba så -Windows-klienter kan få adgang til dem gennem Andre -computere- eller Netværkssteder-ikonerne på deres -skrivebord. Du skal først have installere Windows PostScript-printerdriverne -som beskrevet i man-siden til cupsaddsmb(8).

} - - - - - - - - - - - - - - - - - - -
Printere: -
- -
Samba-brugernavn: (kræves)
Samba-adgangskode: (kræves)
- -
diff --git a/templates/da/samba-exported.tmpl b/templates/da/samba-exported.tmpl deleted file mode 100644 index 6779bde2a..000000000 --- a/templates/da/samba-exported.tmpl +++ /dev/null @@ -1 +0,0 @@ -

Printere eksporteret til samba.

diff --git a/templates/de/admin.tmpl b/templates/de/admin.tmpl index ebf193ea2..e8c1e18c9 100644 --- a/templates/de/admin.tmpl +++ b/templates/de/admin.tmpl @@ -6,7 +6,6 @@
- {have_samba?
:}

Klassen

diff --git a/templates/de/samba-export.tmpl b/templates/de/samba-export.tmpl deleted file mode 100644 index 1850aef2c..000000000 --- a/templates/de/samba-export.tmpl +++ /dev/null @@ -1,56 +0,0 @@ - - -
- - - -

Drucker für Samba freigeben

- -{error?

Drucker können nicht für Samba freigegeben werden\:

-
{error}
-

Bitte prüfen Sie das Fehlerprotokoll für weitere Informationen.

: -

Diese Seite erlaubt es Ihnen Drucker für Samba freizugeben -damit Windows-Rechner auf diese über das Netzwerk- -bzw. Netzwerkumgebung-Symbol z.B. auf dem Desktop -zugreifen können. Davor muss allerdings der PostScript- -Druckertreiber für Windows, wie in der man page cupsaddsmb(8) beschrieben, installiert -worden sein.

} - - - - - - - - - - - - - - - - - - -
Drucker: -
- -
Samba-Benutzername: (erforderlich)
Samba-Passwort: (erforderlich)
- -
diff --git a/templates/de/samba-exported.tmpl b/templates/de/samba-exported.tmpl deleted file mode 100644 index 8a49c30f7..000000000 --- a/templates/de/samba-exported.tmpl +++ /dev/null @@ -1 +0,0 @@ -

Die Drucker wurden erfolgreich für Samba freigegeben.

diff --git a/templates/es/admin.tmpl b/templates/es/admin.tmpl index 2be1ed0af..b455bc737 100644 --- a/templates/es/admin.tmpl +++ b/templates/es/admin.tmpl @@ -6,7 +6,6 @@
- {have_samba?
:}

Clases

diff --git a/templates/es/samba-export.tmpl b/templates/es/samba-export.tmpl deleted file mode 100644 index 946e3128e..000000000 --- a/templates/es/samba-export.tmpl +++ /dev/null @@ -1,55 +0,0 @@ - - -
- - - -

Exportar impresoras a Samba

- -{error?

No se han podido exportar las impresoras a Samba\:

-
{error}
-

Consulte el archivo error_log para más información.

: -

Esta página le permite exportar las impresoras a Samba para que -los clientes Windows puedan acceder a ellas por los iconos de su -escritorio Entorno de red o Sitios de red. Debe haber instalado -previamente el controlador de impresora PostScript de Windows -como se describe en la página del manual -cupsaddsmb(8).

} - - - - - - - - - - - - - - - - - - -
Impresoras: -
- -
Nombre de usuario Samba: (necesario)
Contraseña Samba: (necesaria)
- -
diff --git a/templates/es/samba-exported.tmpl b/templates/es/samba-exported.tmpl deleted file mode 100644 index a54925d3c..000000000 --- a/templates/es/samba-exported.tmpl +++ /dev/null @@ -1 +0,0 @@ -

Se han exportado las impresoras a samba con éxito.

diff --git a/templates/fr/admin.tmpl b/templates/fr/admin.tmpl index 8ad563ae6..d52b0f24b 100644 --- a/templates/fr/admin.tmpl +++ b/templates/fr/admin.tmpl @@ -6,7 +6,6 @@
- {have_samba?
:}

Classes

diff --git a/templates/fr/samba-export.tmpl b/templates/fr/samba-export.tmpl deleted file mode 100644 index fa16d3037..000000000 --- a/templates/fr/samba-export.tmpl +++ /dev/null @@ -1,52 +0,0 @@ - - -
- - - -

Exporter les Imprimantes vers Samba

- -{error?

Impossible d'exporter les imprimantes vers Samba \:

-
{error}
-

Consulter le fichier error_log pour plus d'informations.

: -

Cette page vous permet d'exporter des imprimantes vers Samba de sorte que des clients Windows puissent y accéder via l'ic&oacirc;ne Voisinage réseau ou -Favoris réseau du bureau. Vous devez au préalable installer les pilotes Windows d'imprimante PostScript : cf. la page man cupsaddsmb(8).

} - - - - - - - - - - - - - - - - - - -
Imprimantes \: -
- -
Utilisateur Samba \: (required)
Mot de passe Samba \: (requis)
- -
diff --git a/templates/fr/samba-exported.tmpl b/templates/fr/samba-exported.tmpl deleted file mode 100644 index d4ad778da..000000000 --- a/templates/fr/samba-exported.tmpl +++ /dev/null @@ -1 +0,0 @@ -

Les imprimantes ont été exportées vers Samba avec succès.

diff --git a/templates/ja/admin.tmpl b/templates/ja/admin.tmpl index e115e6e91..1fd958cbb 100644 --- a/templates/ja/admin.tmpl +++ b/templates/ja/admin.tmpl @@ -6,7 +6,6 @@
- {have_samba?
:}

クラス

diff --git a/templates/ja/samba-export.tmpl b/templates/ja/samba-export.tmpl deleted file mode 100644 index f2d3a9e4b..000000000 --- a/templates/ja/samba-export.tmpl +++ /dev/null @@ -1,55 +0,0 @@ - - -
- - - -

プリンターを Samba にエクスポート

- -{error?

プリンターを Samba にエクスポートできません\:

-
{error}
-

より詳細な情報については error_log ファイルを参照してください。

: -

このページは、Windows クライアントがデスクトップ上の -マイネットワーク や ネットワークの場所 -アイコン経由でアクセスできるよう、プリンターの Samba -へのエクスポートを許可します。cupsaddsmb(8) man ページに書かれているように、 -事前に Windows PostScript ドライバーをインストールしておく必要があります。

} - - - - - - - - - - - - - - - - - - -
プリンター: -
- -
Samba のユーザー名: (必須)
Samba のパスワード: (必須)
- -
diff --git a/templates/ja/samba-exported.tmpl b/templates/ja/samba-exported.tmpl deleted file mode 100644 index f67ddd928..000000000 --- a/templates/ja/samba-exported.tmpl +++ /dev/null @@ -1 +0,0 @@ -

プリンターは Samba に正しくエクスポートされました。

diff --git a/templates/pt_BR/admin.tmpl b/templates/pt_BR/admin.tmpl index 8ee2d4ba8..4f0fd03f0 100644 --- a/templates/pt_BR/admin.tmpl +++ b/templates/pt_BR/admin.tmpl @@ -6,7 +6,6 @@
- {have_samba?
:}

Classes

diff --git a/templates/pt_BR/samba-export.tmpl b/templates/pt_BR/samba-export.tmpl deleted file mode 100644 index d8badd927..000000000 --- a/templates/pt_BR/samba-export.tmpl +++ /dev/null @@ -1,54 +0,0 @@ - - -
- - - -

Exportar impressoras para o Samba

- -{error?

Não foi possível exportar impressoras para o Samba\:

-
{error}
-

>Consulte o arquivo error_log para mais informações.

: -

Essa página permite que você exporte impressoras para o Samba -para que clientes Windows possam acessá-las através dos ícones de -Ambiente de Rede ou Locais de Rede nas suas -áreas de trabalho. Você deve primeiro instalar os drivers de -impressora PostScript do Windows como descrito na página de manual do -cupsaddsmb(8).

} - - - - - - - - - - - - - - - - - - -
Impressoras: -
- -
Nome do usuário do Samba: (obrigatório)
Senha do Samba: (obrigatório)
- -
diff --git a/templates/pt_BR/samba-exported.tmpl b/templates/pt_BR/samba-exported.tmpl deleted file mode 100644 index c2ec3a576..000000000 --- a/templates/pt_BR/samba-exported.tmpl +++ /dev/null @@ -1 +0,0 @@ -

Impressoras exportadas para o samba com sucesso.

diff --git a/templates/ru/admin.tmpl b/templates/ru/admin.tmpl index 3d807ce20..1aafc6b0e 100644 --- a/templates/ru/admin.tmpl +++ b/templates/ru/admin.tmpl @@ -5,7 +5,6 @@
- {have_samba?
:}

Группы

diff --git a/templates/ru/samba-export.tmpl b/templates/ru/samba-export.tmpl deleted file mode 100644 index 39d025972..000000000 --- a/templates/ru/samba-export.tmpl +++ /dev/null @@ -1,53 +0,0 @@ - - -
- - - -

Экспорт принтеров в Samba

- -{error?

Невозможно экспортировать принтеры в Samba\:

-
{error}
-

Посмотрите файл error_log для более подробной информации.

: -

Эта страница позволяет добавить принтеры в Samba так, чтобы -клиенты Windows могли получить доступ к ним через значок Сетевое окружение или Сетевые подключения на их рабочем столе. Вы должны установить на Windows драйвер принтера PostScript -как описано на странице руководства cupsaddsmb(8).

} - - - - - - - - - - - - - - - - - - -
Принтеры: -
- -
Имя пользователя Samba: (обязательный параметр)
Пароль Samba: (обязательный параметр)
- -
diff --git a/templates/ru/samba-exported.tmpl b/templates/ru/samba-exported.tmpl deleted file mode 100644 index 179b2ad8a..000000000 --- a/templates/ru/samba-exported.tmpl +++ /dev/null @@ -1 +0,0 @@ -

Принтеры успешно экспортированы в Samba.

diff --git a/templates/samba-export.tmpl b/templates/samba-export.tmpl deleted file mode 100644 index da4b1caf1..000000000 --- a/templates/samba-export.tmpl +++ /dev/null @@ -1,55 +0,0 @@ - - -
- - - -

Export Printers to Samba

- -{error?

Unable to export printers to Samba\:

-
{error}
-

Consult the error_log file for more information.

: -

This page allows you to export printers to Samba so that -Windows clients can access them through the Network -Neighborhood or Network Places icons on their -desktop. You must previously install the Windows PostScript -printer drivers as described in the cupsaddsmb(8) man page.

} - - - - - - - - - - - - - - - - - - -
Printers: -
- -
Samba Username: (required)
Samba Password: (required)
- -
diff --git a/templates/samba-exported.tmpl b/templates/samba-exported.tmpl deleted file mode 100644 index 6fa8eb4a6..000000000 --- a/templates/samba-exported.tmpl +++ /dev/null @@ -1 +0,0 @@ -

Printers exported to samba successfully.