Displaying 5 results from an estimated 5 matches for "filemodemask".
2000 Aug 18
0
[PATCH] Support symlinks in scp of openssh 2
...h (stb.st_mode & S_IFMT) {
+ case S_IFLNK:
+ /* readlink later */
+ break;
case S_IFREG:
+ if (fd < 0 && (fd = open(name, O_RDONLY, 0)) < 0)
+ goto syserr;
break;
case S_IFDIR:
@@ -586,6 +606,7 @@ syserr: run_err("%s: %s", name, strerr
}
#define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
- (void) sprintf(buf, "C%04o %lu %s\n",
- (unsigned int) (stb.st_mode & FILEMODEMASK),
+ (void) sprintf(buf, "%c%04o %lu %s\n",
+ ((stb.st_mode & S_IFMT) == S_IFLNK) ? 'L' : 'C',
+ (unsi...
2002 Jul 13
0
[PATCH]: scp program improved
...dx) {
+ for (indx = 0; indx < argc; ++indx) {
name = argv[indx];
statbytes = 0;
len = strlen(name);
@@ -536,14 +581,19 @@
if (response() < 0)
goto next;
}
+ if (resume_mode)
+ c = 'R';
+ else
+ c = 'C';
+
#define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
#ifdef HAVE_LONG_LONG_INT
- snprintf(buf, sizeof buf, "C%04o %lld %s\n",
+ snprintf(buf, sizeof buf, "%c%04o %lld %s\n", c,
(u_int) (stb.st_mode & FILEMODEMASK),
(long long)stb.st_size, last);
#else
/* XXX: Handl...
2008 Feb 04
2
[Bug 1436] New: scp -p does not preserve sticky bit (01000)
...Reproduction:
Create a directory dir with permissions 1777. Then use
scp -rp dir user at otherhost:
The resulting directory on the otherhost will have permissions of 0777
instead of 1777. From the security point of view this may considered a
serious problem.
Location of the problem:
in scp.c the FILEMODEMASK does not include the sticky bit (S_ISVTX).
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
2006 Mar 17
3
[Bug 1173] scp reports lost connection for very large files
...it is reported (see line below) as merely 1.8G or so
(1845525336).
Sending file modes: C0644 1845525336 onedrain_opsncc_pg_dump.out
Further investigation points to scp.c line 607
snprintf(buf, sizeof buf, "C%04o %lld %s\n",
(u_int) (stb.st_mode & FILEMODEMASK),
(long long)stb.st_size, last);
if (verbose_mode) {
fprintf(stderr, "Sending file modes: %s", buf);
}
Value in stb.st_size is correct (10435459928), however after snprintf()
variable buf holds incorrect value (1...
2015 May 22
5
[Bug 2404] New: scp skips file/directory on permissions error
https://bugzilla.mindrot.org/show_bug.cgi?id=2404
Bug ID: 2404
Summary: scp skips file/directory on permissions error
Product: Portable OpenSSH
Version: 6.7p1
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P5
Component: scp
Assignee: unassigned-bugs at mindrot.org