search for: mod_flag

Displaying 5 results from an estimated 5 matches for "mod_flag".

Did you mean: cmd_flag
2005 Oct 11
5
scp bug: newly created dirs do not inherit sgid bit
...attached. Regards, Petr Skovron -------------- next part -------------- --- scp.c.orig 2005-10-11 16:50:17.000000000 +0200 +++ scp.c 2005-10-11 16:57:25.000000000 +0200 @@ -876,8 +876,12 @@ run_err("%s: set times: %s", vect[0], strerror(errno)); } - if (mod_flag) + if (mod_flag) { + if (stat(vect[0], &stb)==0) + mode= (mode & S_IRWXU) | + (stb.st_mode & ~S_IRWXU); (void) chmod(vect[0], mode); + } if (vect[0]) xfree(vect[0]); continue;
2001 Feb 19
0
[PATCH]: Broken scp -p option
...= xstrdup(np); sink(1, vect); - if (vect[0]) - xfree(vect[0]); if (setimes) { setimes = 0; - if (utimes(np, tv) < 0) + if (utimes(vect[0], tv) < 0) run_err("%s: set times: %s", - np, strerror(errno)); + vect[0], strerror(errno)); } if (mod_flag) - (void) chmod(np, mode); + (void) chmod(vect[0], mode); + if (vect[0]) + xfree(vect[0]); continue; } omode = mode; Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc. mailto:vinschen at redhat.com
2000 Aug 18
0
[PATCH] Support symlinks in scp of openssh 2
...L') { /* * Check for the case "rcp remote:foo\* local:bar". @@ -816,5 +840,5 @@ sink(argc, argv) np = targ; curfile = cp; - exists = stat(np, &stb) == 0; + exists = (buf[0] == 'L' ? lstat : stat)(np, &stb) == 0; if (buf[0] == 'D') { int mod_flag = pflag; @@ -845,9 +869,14 @@ sink(argc, argv) continue; } - omode = mode; - mode |= S_IWRITE; - if ((ofd = open(np, O_WRONLY | O_CREAT | O_TRUNC, mode)) < 0) { -bad: run_err("%s: %s", np, strerror(errno)); - continue; + if (buf[0] == 'L') + ofd = omode = -1; +...
2001 May 17
6
scp: Problem when source and destination are identical
If the source and destination file are identical, the receiving scp truncates the file. On the sending end, read() returns 0, and garbage is sent instead of actual data, and the receiving end puts it into the file, which at least confuses the users. -- Florian Weimer Florian.Weimer at RUS.Uni-Stuttgart.DE University of Stuttgart http://cert.uni-stuttgart.de/
2017 Aug 04
4
Filter files received on scp server
Hey, So, I would be looking at type A. Forgive me if my understanding of how OpenSSH operates is not reflective of reality. I am assuming that, the file transfer is happening somewhat logically, with a name being known, content written, blah blah. >From reading scp.c, it appears that, the client end at least knows the file name so I must assume the server end must be given it. I am hoping to