Hi there,

I'm facing a weird problem that seems to be related somehow to some permission problem I can't identify. I'm trying to use the Dante SOCKS server, that has three different users you may specify at its configuration file. They should be the sockd user (id 101), but if I use it, I get the following error while checking the configuration file (this error prevents the service from starting):

proxy ~ # /usr/sbin/sockd -V
Jan  2 16:45:31 (1136216731) sockd[0]: socks_seteuid(): old: 0, new: 101
Jan  2 16:45:31 (1136216731) sockd[0]: socks_reseteuid(): current: 101, new: 0
Jan  2 15:45:31 (1136216731) sockd[0]: socks_reseteuid(): getpwuid(0): Permission denied (errno = 13)
Jan  2 15:45:31 (1136216731) sockd[0]: sockdexit(): terminating


After googling around I found that getpwuid is a function that returns the information associated with an entry in /etc/passwd for the given uid, and socks_reseteuid seems to be the function used by Dante to switch from on user to another one. So it seems when Dante runs as user 101 (sockd) the call to getpwuid is failing due to a permission problem. I've checked users, permissions on /etc/passwd, and can't find any reason why this would be failing so any help would be greatly appreciated.

More info:
proxy ~ # id root
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
proxy ~ # id sockd
uid=101(sockd) gid=2(daemon) groups=2(daemon)
proxy ~ # ls -l /etc/passwd
-rw-r--r--  1 root root 1772 Dec 20 15:01 /etc/passwd
proxy ~ # cat /etc/passwd | grep root
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/bin/bash
proxy ~ # cat /etc/passwd | grep sockd
sockd:x:101:2:added by portage for dante:/etc/socks:/bin/false

Any ideas????

TIA, best regards
Jose

Reply via email to