search for: get_attrib

Displaying 11 results from an estimated 11 matches for "get_attrib".

2002 Nov 05
0
[PATCH] Add readonly mode to scp, sftp_server
...*** 52,57 **** --- 52,60 ---- /* Version of client */ int version; + /* deny client write operations */ + int readonly = 0; + /* portable attibutes, etc. */ typedef struct Stat Stat; *************** *** 390,395 **** --- 393,404 ---- pflags = get_int(); /* portable flags */ a = get_attrib(); flags = flags_from_portable(pflags); + if (((flags & O_ACCMODE) == O_RDWR) || + ((flags & O_ACCMODE) == O_WRONLY)) { + status = SSH2_FX_PERMISSION_DENIED; + send_status(id, status); + return; + } mode = (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) ? a->perm : 066...
2001 May 24
1
chroot sftp-server [PATCH]
I'm working on setting up a semi-trusted sftp service, and to get it working, I need chroot capability. I've taken the /./ wuftpd magic token code from contrib/chroot.diff and put it into the sftp server. The main problem is that privileges have been dropped by the time the subsystem is exec'ed, so my patch requires that sftp-server be setuid root. Not ideal, I know, but I drop all
2001 Jun 20
1
SFTP Logging Redux.
...f (pflags & SSH2_FXF_APPEND) + *psflags = 'a'; + psflags++; + if (pflags & SSH2_FXF_CREAT) + *psflags = 'c'; + psflags++; + if (pflags & SSH2_FXF_TRUNC) + *psflags = 't'; + psflags++; + if (pflags & SSH2_FXF_EXCL) + *psflags = 'e'; +} + Attrib * get_attrib(void) { @@ -370,6 +398,7 @@ version = buffer_get_int(&iqueue); TRACE("client version %d", version); + log("(%d/%d/%s) Client version %d", ppid, cuid, CUNAME, version); buffer_init(&msg); buffer_put_char(&msg, SSH2_FXP_VERSION); buffer_put_int(&msg, S...
2001 Feb 21
1
sftp-server and chown
...systems might have different access policies (e.g. different umasks). Therefore following patch (relative to OpenSSH 2.5.1p1) is suggested. Cheers. Andy. *** sftp-server.c.orig Tue Feb 13 03:40:56 2001 --- sftp-server.c Wed Feb 21 15:12:07 2001 *************** *** 554,560 **** a = get_attrib(); TRACE("setstat id %d name %s", id, name); if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) { ! ret = chmod(name, a->perm & 0777); if (ret == -1) status = errno_to_portable(errno); } --- 554,572 --...
2009 Sep 07
1
Usage of OCaml/R binding.
...ay" > external of_int_array : int array -> sexp = "sexp_of_int_array" > external of_float_array : float array -> sexp = "sexp_of_float_array" > external of_string_array : string array -> sexp = "sexp_of_string_array" > external get_attrib : sexp -> string -> sexp = "r_get_attrib" > val dim : sexp -> int array > val dimnames : sexp -> string array > end > # -- Guillaume Yziquel http://yziquel.homelinux.org/
2009 Sep 07
1
Usage of OCaml/R binding.
...ay" > external of_int_array : int array -> sexp = "sexp_of_int_array" > external of_float_array : float array -> sexp = "sexp_of_float_array" > external of_string_array : string array -> sexp = "sexp_of_string_array" > external get_attrib : sexp -> string -> sexp = "r_get_attrib" > val dim : sexp -> int array > val dimnames : sexp -> string array > end > # -- Guillaume Yziquel http://yziquel.homelinux.org/
2004 Oct 25
1
Bug in sftp's chmod
Hi, I've discovered that on OpenSSH_3.6.1p1 (the latest SSH available on OSX, but I've also tried a couple of different linux distributions), when you 'sftp' to it, and try to 'chmod' some file or directory, only last three octal digits do actually matter. Example: sftp sshtest at localhost Connecting to localhost... sshtest at localhost's password: sftp> ls -l
2006 May 15
1
[PATCH 8/12] openssh-4.3p2 return code check bugs
...-551,6 +563,7 @@ process_fstat(void) status = SSH2_FX_OK; } } +out: if (status != SSH2_FX_OK) send_status(id, status); } @@ -614,6 +627,10 @@ process_fsetstat(void) id = get_int(); handle = get_handle(); + if (handle < 0) { + status = SSH2_FX_FAILURE; + goto out; + } a = get_attrib(); TRACE("fsetstat id %u handle %d", id, handle); fd = handle_to_fd(handle); @@ -654,6 +671,7 @@ process_fsetstat(void) status = errno_to_portable(errno); } } +out: send_status(id, status); } @@ -697,6 +715,11 @@ process_readdir(void) id = get_int(); handle = get_...
2013 Jun 04
1
[PATCH] add restricted mode to sftp-server
Hello. These patches add a new mode of operation for the sftp server. It is located between the ordinary, unrestricted mode and read-only mode. It allows you to add files to the server, but only if these files do not exist on the server before. Changes to existing files - are prohibited. Please review them, maybe these patches will be useful not only to me. Thank you. -------------- next part
2002 Mar 15
4
PATCH: sftp-server logging.
...lags = 'a'; + psflags++; + if (pflags & SSH2_FXF_CREAT) + *psflags = 'c'; + psflags++; + if (pflags & SSH2_FXF_TRUNC) + *psflags = 't'; + psflags++; + if (pflags & SSH2_FXF_EXCL) + *psflags = 'e'; + return; + } + #endif + static Attrib * get_attrib(void) { *************** *** 370,375 **** --- 423,431 ---- version = buffer_get_int(&iqueue); TRACE("client version %d", version); + #ifdef SFTP_LOGGING + log("(%d/%d/%s) Client version %d.", ppid, cuid, CUNAME, version); + #endif buffer_init(&msg); buff...
2007 Apr 10
6
[PATCH 0/6] openssh V_4_6: minor fixes/cleanups
This patch series consists of minor fixes and cleanups I made during update to openssh V_4_6 branch. openssh/auth-pam.c | 9 ++++----- openssh/auth2.c | 2 -- openssh/readconf.c | 7 ++++--- openssh/servconf.c | 14 ++++++++------ openssh/sftp-server.c | 9 ++++++--- openssh/sshd.c | 2 +- 6 files changed, 23 insertions(+), 20 deletions(-) -- ldv