]> granicus.if.org Git - sudo/commitdiff
added ocmnd declaration
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 16 Jan 1995 21:36:02 +0000 (21:36 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 16 Jan 1995 21:36:02 +0000 (21:36 +0000)
adjusted for find_path()'s new parameters

sudo.c

diff --git a/sudo.c b/sudo.c
index e1d274d43a94f15f81659a88e9e6e3031dc55820..9f2ced04a3b56b5203056a9fc6482960fb1a2bed 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -134,9 +134,10 @@ static void clean_env              __P((char **));
  */
 int Argc;
 char **Argv;
-char *cmnd;
-char *user;
-char *epasswd;
+char *cmnd = NULL;
+char *ocmnd = NULL;
+char *user = NULL;
+char *epasswd = NULL;
 char host[MAXHOSTNAMELEN + 1];
 struct interface *interfaces;
 int num_interfaces;
@@ -539,8 +540,10 @@ static void load_cmnd()
 
     (void) strcpy(path, Argv[1]);
 
-    cmnd = find_path(path);    /* get the absolute path */
-    if (cmnd == NULL) {
+    /*
+     * Resolved the path (cmnd == resolved, ocmnd == unresolved).
+     */
+    if (find_path(path, &cmnd, &ocmnd) == FALSE) {
        (void) fprintf(stderr, "%s: %s: command not found\n", Argv[0], Argv[1]);
        exit(1);
     }