You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
------------------/etc/cups/cupsd.conf----------------
ServerName model.home.net
------------------bash---------------------------
anonymous@model:$ hostname
model
anonymous@model:$ dnsdomainname
home.net
anonyous@model:$ host model
model.home.net has address 192.168.1.111
-------------/etc/cups/cupsd.conf-------------
| <Location /admin> is:
| Order Deny,Allow
| Deny From All
| Allow From 127.0.0.1
+----------------------------------------------
--------------test.c------------
main() {
if (getdomainname(buff, BSIZE) == 0) {
printf("%s\n", buff);
}
}
-----------------------bash------------
anonymous@model:/work/tmp$ ./a.out
(none)
----------------t.c------------------
main() {
if (gethostname(buff, BSIZE) == 0) {
printf("%s\n", buff);
}
}
anonymous@model:~/work/tmp$ ./a.out
model
It is NOT possible (due to the above "Deny From All" ACL) to access locations (and thus do administrative tasks) on model's local printers, since {admin_uri} substitution on page provide FQDN of "model.home.net" for those printers. CUPSD assumes those printers are remote to it because gethostname() on model returns none-FQDN. Consequently CUPSD puts complete URI for those printers and this break the above ACL.
Still, the quoted above ACL is security-correct and thus is the default for Debian installations - it should not be adjusted to contain host's local interfaces (like 192.168.1.111 in case of "model" above).
So, I'd like to request that: "When {*_uri} substitution gets none-FQDN hostname from gethostname(), it should proceede with resolver functions to get FQDN of the server host.". Such implementation is suggested in hostname command manpage.
Version: 1.2-feature
CUPS.org User: rafal
with the following configuration:
------------------/etc/cups/cupsd.conf----------------
ServerName model.home.net
------------------bash---------------------------
anonymous@model:
$ hostname$ dnsdomainnamemodel
anonymous@model:
home.net
anonyous@model:
$ host model/work/tmp$ ./a.outmodel.home.net has address 192.168.1.111
-------------/etc/cups/cupsd.conf-------------
| <Location /admin> is:
| Order Deny,Allow
| Deny From All
| Allow From 127.0.0.1
+----------------------------------------------
--------------test.c------------
main() {
if (getdomainname(buff, BSIZE) == 0) {
printf("%s\n", buff);
}
}
-----------------------bash------------
anonymous@model:
(none)
----------------t.c------------------
main() {
if (gethostname(buff, BSIZE) == 0) {
printf("%s\n", buff);
}
}
anonymous@model:~/work/tmp$ ./a.out
model
It is NOT possible (due to the above "Deny From All" ACL) to access locations (and thus do administrative tasks) on model's local printers, since {admin_uri} substitution on page provide FQDN of "model.home.net" for those printers. CUPSD assumes those printers are remote to it because gethostname() on model returns none-FQDN. Consequently CUPSD puts complete URI for those printers and this break the above ACL.
Still, the quoted above ACL is security-correct and thus is the default for Debian installations - it should not be adjusted to contain host's local interfaces (like 192.168.1.111 in case of "model" above).
So, I'd like to request that: "When {*_uri} substitution gets none-FQDN hostname from gethostname(), it should proceede with resolver functions to get FQDN of the server host.". Such implementation is suggested in
hostname
command manpage.Some more elaborated diagnostic and reasoning may be found on CUPS newsgroup thread containing message:
http://www.cups.org/newsgroups.php?gcups.bugs+v:2651
The text was updated successfully, but these errors were encountered: