search for: do_cmd

Displaying 20 results from an estimated 34 matches for "do_cmd".

2016 Oct 29
0
-e escape rule
Kevin, I agree with what you are saying on some level, but I don't think the code does what you think it does. rsync -e "foo\\ bar" will be executed by the shell and yield a cmd string in the do_cmd function of "foo\ bar". This will be split incorrectly into an argv of ["foo\", "bar"]. I'm not sure in what reality this makes any sense. All I'm proposing is that the do_cmd split function interprets the -e as a string that would normally be executed on the c...
2004 Oct 13
0
[Bug 1924] New: unable to rsync between a PC with cygwin and a unix machine using rsh
...escribed above. I think that rsh implementations on Sun & HP are less strict therefore the problem does not appear. But it should appear on Linux machine that uses the same implementation as Cygwin. I did a change in the main.c to get rid of the problem. My change resides completely in the do_cmd function Hoping this can help. Don't hesitate to contact me if you want additionnal information kind regards Patrick PS: Here is the my code change. -------------------------------------------------------------------------- /* Start the remote shell. cmd may be NULL to use the default. */ s...
2016 Oct 29
3
-e escape rule
On Fri, Oct 28, 2016 at 5:39 AM, Samuel Williams < space.ship.traveller at gmail.com> wrote: > Rsync passed the backslashes through without dealing with them. > Yeah, it only does space-splitting and that's all it will ever do. It still looks to me like there is a bug in the original escaping, since any command receiving that string is receiving a backslash that is not supposed
2016 Oct 20
5
-e escape rule
...connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.2] I think the problem here is the "ConnectTimeout\\\=60", in particular how the equals symbol is escaped. I'm looking in the function: static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, int remote_argc, int *f_in_p, int *f_out_p) This function splits based purely on whitespace: args[argc++] = t; while (*f != ' ' || in_quote) { // consume token... I feel that this function should also handle...
2004 Aug 31
1
[PATCH] supporting a remote scp path option in scp
...xecute for the secured connection. ("ssh" or -S) */ char *ssh_program = _PATH_SSH_PROGRAM; +/* This is the program to execute for the remote scp. ("scp" or -e) */ +char *scp_remote_program = _PATH_SCP_REMOTE_PROGRAM; + /* This is used to store the pid of ssh_program */ pid_t do_cmd_pid = -1; @@ -198,8 +201,8 @@ int errs, remin, remout; int pflag, iamremote, iamrecursive, targetshouldbedirectory; -#define CMDNEEDS 64 -char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ +char *rscpcmd; /* must hold scp_remote_program + "-r...
2008 Aug 18
8
DO NOT REPLY [Bug 5701] New: deadlock on local rsyncing, bisected to commit f303b749f2843433c9acd8218a4b9096d0d1bb8d
...files () from /proc/22367/exe #6 0x00007fa36508e29c in do_recv () from /proc/22367/exe #7 0x00007fa36508ed82 in start_server () from /proc/22367/exe #8 0x00007fa36508fc55 in child_main () from /proc/22367/exe #9 0x00007fa3650a943e in local_child () from /proc/22367/exe #10 0x00007fa36508cb45 in do_cmd () from /proc/22367/exe #11 0x00007fa36508f53f in main () from /proc/22367/exe $ gstack 22368 #0 0x0000000000a24ad3 in __select_nocancel () from /lib64/libc.so.6 #1 0x00007fa36509b660 in read_timeout () from /proc/22368/exe #2 0x00007fa36509bb86 in read_loop () from /proc/22368/exe #3 0x00007f...
2003 Apr 05
1
Samba 2.2.8 SEGV in rpcclient getdriver on Solaris 7
...f00, 0x1f, 0xffbed760, 0x36, 0x0), at 0x778d4 [2] rpcstr_pull(0xffbecfe0, 0x0, 0x0, 0x0, 0x1, 0x100), at 0x797ac [3] display_print_driver_3(0x1, 0x0, 0x1c79e8, 0xff23d8fc, 0x0, 0x3), at 0x33de4 [4] cmd_spoolss_getdriver(0x15de40, 0xffbed848, 0x2, 0x1c2f48, 0x12c48c, 0x0), at 0x340cc [5] do_cmd(0x1c5b30, 0x12c590, 0x1c5b78, 0xf108c, 0x81010100, 0xff00), at 0x2efb0 [6] process_cmd(0xffbee044, 0x0, 0x0, 0x15a5c8, 0x12c590, 0x15de40), at 0x2f148 [7] main(0x12c218, 0x12c238, 0xffbef948, 0xf13ac, 0x0, 0x159878), at 0x2f9fc (dbx) Regards Nick
2011 Mar 05
19
[RFC apcsmart V3 00/18] apcsmart driver updates
...ivers/apcsmart.c: adjust upsdrv_shutdown() drivers/apcsmart.c: update in-driver help information drivers/apcsmart.c: update version and authors drivers/apcsmart: remove CMD_IGN_CHARS drivers/apcsmart.c: don't overuse UPSDELAY drivers/apcsmart.c: add ser_flush_in() in setver_enum() and do_cmd() drivers/apcsmart: use STAT_INSTCMD_{HANDLED,FAILED} for sdcmd_*() drivers/apcsmart.c | 588 ++++++++++++++++++++++++++++++++++++++++------------ drivers/apcsmart.h | 82 ++++--- drivers/dstate.c | 5 + drivers/dstate.h | 1 + 4 files changed, 510 insertions(+), 166 deletions(-)...
2003 Mar 08
1
[patch] rsync over existing I/O connections (new feature)
...6 15:29:27 2003 @@ -665,6 +665,8 @@ extern int whole_file; extern int write_batch; extern int read_batch; + extern int force_f_in; + extern int force_f_out; int rc; /* Don't clobber argv[] so that ps(1) can still show the right @@ -770,9 +772,14 @@ list_only = 1; } - pid = do_cmd(shell_cmd,shell_machine,shell_user,shell_path,&f_in,&f_out); + if (force_f_in != -1) { + ret = client_run(force_f_in, force_f_out, -1, argc, argv); + } + else { + pid = do_cmd(shell_cmd,shell_machine,shell_user,shell_path,&f_in,&f_out); - ret = client_run(f_in, f_out, pid, ar...
2011 Jul 17
11
[Bug 8308] New: rsync: exclude.c:532: change_local_filter_dir: Assertion `dir_depth < 4096/2+1' failed
...(f_in=0, f_out=1, argc=1, argv=0xfffd6e30) at main.c:953 #5 0x08066738 in child_main (argc=2, argv=0xfffd6e30) at main.c:960 #6 0x0807c92e in local_child (argc=2, argv=0xfffd6e30, f_in=0xfffd8ed0, f_out=0xfffd8ecc, child_main=0x8066710 <child_main>) at pipe.c:156 #7 0x080633e9 in do_cmd (cmd=0x0, machine=0x0, user=0x0, remote_argv=0x80b39b4, remote_argc=0, f_in_p=0xfffd8ed0, f_out_p=0xfffd8ecc) at main.c:469 #8 0x08065f4b in main (argc=Cannot access memory at address 0x0 ) at main.c:1275 (gdb) p dir_depth $5 = 3695 (gdb) up #1 0x080544c3 in do_delete_pass () at generat...
2004 May 29
1
[patch] Filename conversion
...R_MALLOC , "error allocating core memory buffers" }, diff -rupNP rsync-2.6.2/main.c rsync-2.6.2-fnameconv.clean/main.c --- rsync-2.6.2/main.c 2004-02-10 05:54:47.000000000 +0200 +++ rsync-2.6.2-fnameconv.clean/main.c 2004-05-29 21:17:09.000000000 +0300 @@ -217,7 +217,7 @@ static pid_t do_cmd(char *cmd, char *mac int *f_in, int *f_out) { int i, argc = 0; - char *args[100]; + char *args[MAX_ARGS]; pid_t ret; char *tok, *dir = NULL; int dash_l_set = 0; @@ -232,8 +232,13 @@ static pid_t do_cmd(char *cmd, char *mac if (!cmd) goto oom; - for (tok = strtok(cmd, &quot...
2001 Oct 16
6
program-prefix does not work
...fprintf(stderr, "Executing: %s\n", bp); *************** *** 417,423 **** if (remin == -1) { len = strlen(targ) + CMDNEEDS + 20; bp = xmalloc(len); ! (void) snprintf(bp, len, "%s -t %s", cmd, targ); host = cleanhostname(thost); if (do_cmd(host, tuser, bp, &remin, &remout, argc) < 0) --- 425,432 ---- if (remin == -1) { len = strlen(targ) + CMDNEEDS + 20; bp = xmalloc(len); ! if (snprintf(bp, len, "%s -t %s", cmd, targ) < 0) ! fprintf(stderr, "command truncat...
2016 Oct 20
0
-e escape rule
...tes received so far) [sender] > rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.2] > > I think the problem here is the "ConnectTimeout\\\=60", in particular > how the equals symbol is escaped. > > I'm looking in the function: > > static pid_t do_cmd(char *cmd, char *machine, char *user, char > **remote_argv, int remote_argc, > int *f_in_p, int *f_out_p) > > This function splits based purely on whitespace: > > args[argc++] = t; > while (*f != ' ' || in_quote) { > // consume token... > &gt...
2023 Feb 16
0
[Bug 3541] New: remote-to-remote case doesn't look at sshport
...h to file> <me>@<remote ip>:<dest dir> It looks like at https://github.com/openssh/openssh-portable/blob/master/scp.c#L1160 you need to set sport to sshport if sshport is valid (and sport is invalid? Not completely on top of that) I'm not sure why that case is not calling do_cmd/do_cmd2 (which do correctly consider sshport) -- You are receiving this mail because: You are watching the assignee of the bug.
2006 May 15
0
[PATCH 5/12] bug fix: openssh-4.3p2 scp bugs
...;kjhall at us.ibm.com> --- scp.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -uprN openssh-4.3p2/scp.c openssh-4.3p2-kylie/scp.c --- openssh-4.3p2/scp.c 2006-01-31 05:11:38.000000000 -0600 +++ openssh-4.3p2-kylie/scp.c 2006-05-08 15:15:04.016516104 -0500 @@ -181,7 +181,8 @@ do_cmd(char *host, char *remuser, char * * Reserve two descriptors so that the real pipes won't get * descriptors 0 and 1 because that will screw up dup2 below. */ - pipe(reserved); + if (pipe(reserved) < 0) + fatal("pipe: %s", strerror(errno)); /* Create a socket pair for c...
2011 Aug 17
1
openssh-unix-dev Digest, Vol 100, Issue 3
...} > - xasprintf(&bp, "%s -f -- %s", cmd, src); > + xasprintf(&bp, "%s -f %s%s", cmd, > + *src == '-' ? "-- " : "", src); > if (do_cmd(host, suser, bp, &remin, &remout) < 0) > exit(1); > (void) xfree(bp); > host = cleanhostname(thost); > - xasprintf(&bp, "%s -t -- %s", cmd, targ); > +...
2001 May 12
4
Erase the source file open; specify a tempfile name option
...t. I'd be glad to if this gets accepted. Enjoy, ..wayne.. ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- Index: scp.c @@ -105,6 +105,7 @@ /* Returns width of the terminal (for progress meter calculations). */ int getttywidth(void); + int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc); /* Struct for addargs */ @@ -206,9 +207,11 @@ uid_t userid; int errs, remin, remout; int pflag, iamremote, iamrecursive, targetshouldbedirectory; +int eraseflag; +char *tmpfn = ""; -#define CMDNEEDS 64 -char cmd...
2016 Oct 29
2
-e escape rule
> Yeah, it only does space-splitting and that's all it will ever do. It still looks to me like there is a bug in the original escaping, since any command receiving that string is receiving a backslash that is not supposed to be there. It should only be escaping the string enough to get it to rsync, not trying to guess what rsync is going to do with it after it gets it. I'm not
2008 Dec 15
1
rsync architecture
...call send_files : sender.c } else { call recv_filter_list : exlude.c call recv_file_list : flist.c call do_recv : main.c call recv_files : receiver.c call generate files : generator.c } 3. Client call do_cmd : main.c call client_run : main.c if(sender) { call send_filter_list : exclude.c call send_file_list : flist.c call send_files : sender.c } else { call send_filter_list : exclude.c call recv_file_list...
2016 Oct 21
2
-e escape rule
...t;> rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.2] >> >> I think the problem here is the "ConnectTimeout\\\=60", in particular >> how the equals symbol is escaped. >> >> I'm looking in the function: >> >> static pid_t do_cmd(char *cmd, char *machine, char *user, char >> **remote_argv, int remote_argc, >> int *f_in_p, int *f_out_p) >> >> This function splits based purely on whitespace: >> >> args[argc++] = t; >> while (*f != ' ' || in_quote) { >>...