X-Git-Url: https://git.distorted.org.uk/~mdw/become/blobdiff_plain/59f147b0d9bfb46577cd6f8813589ccdf8bc2a2c..7ffed72c7b7224153d2e3d78c1eeb0a62f9ffdcd:/src/become.c diff --git a/src/become.c b/src/become.c index 23f69dd..6236855 100644 --- a/src/become.c +++ b/src/become.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: become.c,v 1.19 1998/06/29 13:10:41 mdw Exp $ + * $Id: become.c,v 1.21 1999/07/28 09:31:01 mdw Exp $ * * Main code for `become' * @@ -29,7 +29,14 @@ /*----- Revision history --------------------------------------------------* * * $Log: become.c,v $ - * Revision 1.19 1998/06/29 13:10:41 mdw + * Revision 1.21 1999/07/28 09:31:01 mdw + * Empty path components are equivalent to `.'. + * + * Revision 1.20 1999/05/04 16:17:11 mdw + * Change to header file name for parser. See log for `parse.h' for + * details. + * + * Revision 1.19 1998/06/29 13:10:41 mdw * Add some commentary regarding an issue in `sudo' which affects `become'; * I'm not fixing it yet because I don't think it's important. * @@ -148,7 +155,7 @@ extern char **environ; #include "lexer.h" #include "mdwopt.h" #include "name.h" -#include "parser.h" +#include "parse.h" #include "rule.h" #include "sym.h" #include "utils.h" @@ -1399,6 +1406,7 @@ done_options: * Bugtraq, as a complaint against sudo.] */ + if (!*p) p = "."; sprintf(rq.cmd, "%s/%s", p, binary); if (stat(rq.cmd, &st) == 0 && /* Check it exists */ st.st_mode & 0111 && /* Check it's executable */