special permissions for bash scripts

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

special permissions for bash scripts

Postby msi » Sat Dec 06, 2003 9:16 am

hello,

i tried to hide my installed samba. so i hided the binaries:

/ {
...
/usr/sbin/nmbd h
/usr/sbin/smbd h
....
}

and in order to let /etc/init.d/samba start these processes:

/etc/init.d/samba {
/usr/sbin/nmbd rx
/usr/sbin/smbd rx
}

but it still can't see the two binaries. Why??
Maybe because it's bash script and only interpreted?
what can i do to solve this problem?

Markus
msi
 
Posts: 29
Joined: Fri Sep 13, 2002 2:37 pm

Postby cmouse » Mon Dec 08, 2003 11:46 am

Sorry but you can't give perms to a script. If you want to allow your samba to start at boot time, arrange so that the binaries boot up before you execute gradm -E. This way the binaries are hidden once the system is ready to rock.
cmouse
 
Posts: 98
Joined: Tue Dec 17, 2002 10:58 am

Postby devastor » Mon Dec 08, 2003 2:06 pm

Well, i wouldn't say that.
You just need to make sure that the privileges you give to the script will
be inherited to /bin/bash and all other programs that are run by the script.

so something like

/etc/init.d/samba {
/usr/sbin/nmbd rx
/usr/sbin/smbd rx
/bin/bash rxi
/sbin/start-stop-daemon rxi
...
}
devastor
 
Posts: 41
Joined: Fri Oct 11, 2002 5:07 pm

Postby msi » Tue Dec 09, 2003 1:12 pm

a thats the crux. thank you!
msi
 
Posts: 29
Joined: Fri Sep 13, 2002 2:37 pm


Return to grsecurity support