]> andersk Git - openssh.git/blobdiff - sftp-int.c
- markus@cvs.openbsd.org 2001/11/07 22:53:21
[openssh.git] / sftp-int.c
index aa3a8a02fdb9027cd0d26f8e486056fa8dc921e9..841e562e1de21bc7a433ae8d4f6cc4b6ecae83f8 100644 (file)
@@ -26,7 +26,7 @@
 /* XXX: recursive operations */
 
 #include "includes.h"
-RCSID("$OpenBSD: sftp-int.c,v 1.37 2001/06/23 15:12:20 itojun Exp $");
+RCSID("$OpenBSD: sftp-int.c,v 1.40 2001/08/14 09:23:02 markus Exp $");
 
 #include "buffer.h"
 #include "xmalloc.h"
@@ -78,6 +78,7 @@ struct CMD {
 };
 
 const struct CMD cmds[] = {
+       { "bye",        I_QUIT },
        { "cd",         I_CHDIR },
        { "chdir",      I_CHDIR },
        { "chgrp",      I_CHGRP },
@@ -163,10 +164,10 @@ local_do_shell(const char *args)
                /* XXX: child has pipe fds to ssh subproc open - issue? */
                if (args) {
                        debug3("Executing %s -c \"%s\"", shell, args);
-                       execl(shell, shell, "-c", args, NULL);
+                       execl(shell, shell, "-c", args, (char *)NULL);
                } else {
                        debug3("Executing %s", shell);
-                       execl(shell, shell, NULL);
+                       execl(shell, shell, (char *)NULL);
                }
                fprintf(stderr, "Couldn't execute \"%s\": %s\n", shell,
                    strerror(errno));
@@ -204,7 +205,8 @@ path_append(char *p1, char *p2)
 
        ret = xmalloc(len);
        strlcpy(ret, p1, len);
-       strlcat(ret, "/", len);
+       if (strcmp(p1, "/") != 0) 
+               strlcat(ret, "/", len);
        strlcat(ret, p2, len);
 
        return(ret);
This page took 0.027207 seconds and 4 git commands to generate.