From: mdw Date: Wed, 28 Jul 1999 09:31:01 +0000 (+0000) Subject: Empty path components are equivalent to `.'. X-Git-Url: https://git.distorted.org.uk/~mdw/become/commitdiff_plain/eb961767891195fec6ea7ecfef7804b830b5af72?hp=98661ef50e6e3b53b778060888deda6b88ad88d1 Empty path components are equivalent to `.'. --- diff --git a/src/become.c b/src/become.c index 9c1a4e1..6236855 100644 --- a/src/become.c +++ b/src/become.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: become.c,v 1.20 1999/05/04 16:17:11 mdw Exp $ + * $Id: become.c,v 1.21 1999/07/28 09:31:01 mdw Exp $ * * Main code for `become' * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: become.c,v $ + * 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. @@ -1403,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 */