We run dicomprint an a linux box and want to add a menu point
in the menus of the windowmanager - allowing a normal
user to restart the tcpsrv process.
The sudo works in principle, the service ist stopped and started again,
but when the shell, that was called to run the /etc/init.d/dcmprint
script dies, the tcpsrv process dies also.
Verified with an appended sleep in the start script - as long as the
shell exists the process is fine and the ports are open - shell gone,
tcpsrv gone.
/etc/init.d/dcmprint runs fine on system start and when called from
root in an xterm or on console or putty or whatsoever,
but not with sudo.
Any idea?
Best regards
Gerold
tcpsrv dies when started via sudo ...
Moderator: Moderator Team
-
- Posts: 3
- Joined: Thu, 2007-03-15, 10:27
- Location: Froendenberg, NRW, Germany
- Contact:
-
- Posts: 3
- Joined: Thu, 2007-03-15, 10:27
- Location: Froendenberg, NRW, Germany
- Contact:
-
- OFFIS DICOM Team
- Posts: 1444
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Does the /etc/init.d start script (which is not part of DCMPRINT) start the server process in the background? If not, then one tcpsrv process instance will run in the context of the script.
That said, in general we do not recommend to run tcpsrv with root privileges. It is preferrable to install the tool with s-bit set (mode 4755) and owner root. In this case any user can start tcpsrv, but after opening the listen socket (which requires root privileges if < 1024) the tool reverts to the effective user ID by calling setuid(getuid()), which limits the possible damage the tool can cause in case things go wrong badly.
That said, in general we do not recommend to run tcpsrv with root privileges. It is preferrable to install the tool with s-bit set (mode 4755) and owner root. In this case any user can start tcpsrv, but after opening the listen socket (which requires root privileges if < 1024) the tool reverts to the effective user ID by calling setuid(getuid()), which limits the possible damage the tool can cause in case things go wrong badly.
Who is online
Users browsing this forum: No registered users and 1 guest