[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: execve problem with back-shell



On Monday, 7 March 2011 01:52:21 Michael Smith wrote:
	
buildd@vernadsky:/build/buildd/openldap2.3-2.4.9/debian/build/servers/slap
> d WARNING: No dynamic config support for database shell.
> slapd starting
> syncrepl_entry: rid=123 LDAP_RES_SEARCH_ENTRY(LDAP_SYNC_ADD)
> syncrepl_entry: rid=123 inserted UUID f25a0996-d888-102f-9c2e-559808098a6b
> execv failed
> shell: fgets failed: Success (0)
> str2result () expecting "RESULT"
> ---------------------
> 
> ... over and over again.
> 
> strace says:
> 
> [pid 19068] execve("/usr/local/bin/backshell.sh",
> ["/usr/local/bin/backshell.sh"], ["SHELL=/bin/bash", "TERM=xterm",
> "USER=root", "LS_COLORS=no=00:fi=00:di=01;34:l"..., "SUDO_USER=mike",
> "SUDO_UID=1001", "USERNAME=root", "PATH=/usr/local/sbin:/usr/local/"...,
> "MAIL=/var/mail/root", "PWD=/home/mike", "LANG=en_US.UTF-8", "SHLVL=1",
> "SUDO_COMMAND=/bin/su", "HOME=/root", "LOGNAME=root", "LESSOPEN=|
> /usr/bin/lesspipe %s", "SUDO_GID=1001", "LESSCLOSE=/usr/bin/lesspipe %s
> %"..., "_=/usr/sbin/slapd"]) = -1 EACCES (Permission denied)
> 
> -------------
> 
> Doesn't look like it's even able to execute my little program, right?
> 
> So this may be more a question about the subtleties of execve (and possibly
> its interactions with sudo?) than about openldap, but if some kind soul
> can set me on the right path, I'd be most grateful. I've manpaged and
> googled everything I could think of, and drawn a blank.

What are the permissions of /usr/local/bin/backshell.sh ?

Regards,
Buchan