[Bug 741023] New: Socket-activated services with TCPWrapName ignore setenv in /etc/hosts.allow
https://bugzilla.novell.com/show_bug.cgi?id=741023 https://bugzilla.novell.com/show_bug.cgi?id=741023#c0 Summary: Socket-activated services with TCPWrapName ignore setenv in /etc/hosts.allow Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: All OS/Version: All Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: conrad-novell.com@quisquis.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.14 (KHTML, like Gecko) Chrome/18.0.972.0 Safari/535.14 SUSE/18.0.972.0 The manpage systemd.exec implies that specifying a TCPWrapName uses /etc/hosts.{allow,deny} in the same way as tcpd(8). However, this is not the case: when /etc/hosts.allow is used for setting environment variables, these variables are not handed over to the executed program by systemd. ---Example env.socket--- [Unit] Description=Network socket for incoming env connections [Install] WantedBy=sockets.target [Socket] ListenStream=13131 Accept=true ---/Example--- ---Example env@.service--- [Unit] Description=test daemon After=local-fs.target [Service] Environment=PATH=/bin:/usr/bin:/sbin:/usr/sbin WorkingDirectory=/tmp #ExecStart=@/usr/sbin/tcpd /usr/bin/env ExecStart=/usr/bin/env StandardInput=socket StandardOutput=inherit StandardError=syslog TCPWrapName=env ---/Example--- ---Example /etc/hosts.allow--- env : 127.0.0.1 : setenv TEST working ---/Example--- Reproducible: Always Steps to Reproduce: 1. Create env.socket, env@.service and /etc/hosts.allow as above 2. netcat 127.0.0.1 13131 Actual Results: The output does not contain "TEST=working" Expected Results: The expected result can be seen by activating the out-commented ExecStart line in env@.service: the output contains the line TEST=working As can be seen by the example, explicitly running /usr/sbin/tcpd in ExecStart is an (ugly) workaround for the problem. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=741023
https://bugzilla.novell.com/show_bug.cgi?id=741023#c
zj jia
https://bugzilla.novell.com/show_bug.cgi?id=741023
https://bugzilla.novell.com/show_bug.cgi?id=741023#c2
--- Comment #2 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=741023
https://bugzilla.novell.com/show_bug.cgi?id=741023#c3
--- Comment #3 from Peter Conrad
https://bugzilla.novell.com/show_bug.cgi?id=741023
https://bugzilla.novell.com/show_bug.cgi?id=741023#c4
--- Comment #4 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=741023
https://bugzilla.novell.com/show_bug.cgi?id=741023#c5
Frederic Crozat
participants (1)
-
bugzilla_noreply@novell.com