| Summary: |
Socket-activated services with TCPWrapName ignore setenv in /etc/hosts.allow |
| Product: |
[openSUSE] openSUSE 12.1
|
Reporter: |
Peter Conrad <conrad-novell.com> |
| Component: |
Basesystem | Assignee: |
Frederic Crozat <fcrozat> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
E-mail List <qa-bugs> |
| Severity: |
Normal
|
|
|
| Priority: |
P5 - None
|
CC: |
pgajdos
|
| Version: |
Final | |
|
| Target Milestone: |
--- | |
|
| Hardware: |
All | |
|
| OS: |
All | |
|
| Whiteboard: |
|
|
Found By:
|
---
|
Services Priority:
|
|
|
Business Priority:
|
|
Blocker:
|
---
|
|
Marketing QA Status:
|
---
|
IT Deployment:
|
---
|
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.