[BusyBox] RE:Busybox_unstable adduser patch2

Robert Griebl griebl at gmx.de
Wed Jul 17 04:13:05 UTC 2002


On Wednesday 17 July 2002 12:03, Tito wrote:
> Hi Robert,
>
> void passwd_wrapper(const char *login)
> {
> 	static const char prog[] = "passwd";
> 	execlp(prog, prog, login, NULL);
>
> 		How can the error_msg_and_die func intercept an error from execlp
>                 we don't need to tell to it in some way?
>
> 	error_msg_and_die("Failed to execute 'passwd', you must set the password
> for '%s' manually", logi }
>
>                 and why die as at this point the whole job is already done
> and we are providing the default password "x".
>                 A simple error_msg wouldn't be enough ?
>
Just read the exec* man page ... exec _replaces_ the current process with the 
specified one and if it succeeds it never returns - and if it returns, it is 
an error for sure ...

cu
Robert




More information about the busybox mailing list