chiark
/
gitweb
/
~mdw
/
become
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
98661ef
)
Empty path components are equivalent to `.'.
author
mdw
<mdw>
Wed, 28 Jul 1999 09:31:01 +0000
(09:31 +0000)
committer
mdw
<mdw>
Wed, 28 Jul 1999 09:31:01 +0000
(09:31 +0000)
src/become.c
patch
|
blob
|
blame
|
history
diff --git
a/src/become.c
b/src/become.c
index 9c1a4e19c0cdbd4df245574c048ca5fd3eb44b0b..6236855441d23020e778bdd2d53f9689d6f212c5 100644
(file)
--- a/
src/become.c
+++ b/
src/become.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: become.c,v 1.2
0 1999/05/04 16:17:1
1 mdw Exp $
+ * $Id: become.c,v 1.2
1 1999/07/28 09:31:0
1 mdw Exp $
*
* Main code for `become'
*
*
* Main code for `become'
*
@@
-29,6
+29,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: become.c,v $
/*----- 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.
* 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.]
*/
* 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 */
sprintf(rq.cmd, "%s/%s", p, binary);
if (stat(rq.cmd, &st) == 0 && /* Check it exists */
st.st_mode & 0111 && /* Check it's executable */