зеркало из https://github.com/Azure/sonic-openssh.git
- stevesk@cvs.openbsd.org 2001/02/04 15:21:19
[sftp-server.c] SSH2_FILEXFER_ATTR_UIDGID support; ok markus@
This commit is contained in:
Родитель
ef4eea9bad
Коммит
8e74393416
|
@ -6,6 +6,9 @@
|
||||||
- stevesk@cvs.openbsd.org 2001/02/04 08:32:27
|
- stevesk@cvs.openbsd.org 2001/02/04 08:32:27
|
||||||
[many files; did this manually to our top-level source dir]
|
[many files; did this manually to our top-level source dir]
|
||||||
unexpand and remove end-of-line whitespace; ok markus@
|
unexpand and remove end-of-line whitespace; ok markus@
|
||||||
|
- stevesk@cvs.openbsd.org 2001/02/04 15:21:19
|
||||||
|
[sftp-server.c]
|
||||||
|
SSH2_FILEXFER_ATTR_UIDGID support; ok markus@
|
||||||
|
|
||||||
20010104
|
20010104
|
||||||
- (bal) I think this is the last of the bsd-*.h that don't belong.
|
- (bal) I think this is the last of the bsd-*.h that don't belong.
|
||||||
|
@ -40,7 +43,7 @@
|
||||||
- (djm) Makefile.in fixes
|
- (djm) Makefile.in fixes
|
||||||
- (stevesk) add mysignal() wrapper and use it for the protocol 2
|
- (stevesk) add mysignal() wrapper and use it for the protocol 2
|
||||||
SIGCHLD handler.
|
SIGCHLD handler.
|
||||||
- (djm) Use setvbuf() instead of setlinebuf(). Suggest from stevek@
|
- (djm) Use setvbuf() instead of setlinebuf(). Suggest from stevesk@
|
||||||
|
|
||||||
20010103
|
20010103
|
||||||
- (bal) Cygwin clean up by Corinna Vinschen <vinschen@redhat.com>
|
- (bal) Cygwin clean up by Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sftp-server.c,v 1.15 2001/02/04 11:11:54 djm Exp $");
|
RCSID("$OpenBSD: sftp-server.c,v 1.18 2001/02/04 22:21:19 stevesk Exp $");
|
||||||
|
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "bufaux.h"
|
#include "bufaux.h"
|
||||||
|
@ -561,6 +561,11 @@ process_setstat(void)
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
status = errno_to_portable(errno);
|
status = errno_to_portable(errno);
|
||||||
}
|
}
|
||||||
|
if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
|
||||||
|
ret = chown(name, a->uid, a->gid);
|
||||||
|
if (ret == -1)
|
||||||
|
status = errno_to_portable(errno);
|
||||||
|
}
|
||||||
send_status(id, status);
|
send_status(id, status);
|
||||||
xfree(name);
|
xfree(name);
|
||||||
}
|
}
|
||||||
|
@ -601,6 +606,11 @@ process_fsetstat(void)
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
status = errno_to_portable(errno);
|
status = errno_to_portable(errno);
|
||||||
}
|
}
|
||||||
|
if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
|
||||||
|
ret = fchown(fd, a->uid, a->gid);
|
||||||
|
if (ret == -1)
|
||||||
|
status = errno_to_portable(errno);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
send_status(id, status);
|
send_status(id, status);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче