Bugzilla – Attachment 1569 Details for
Bug 1527
ForceCommand internal-sftp needs a way to enable logging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix forcecommand internal-sftp
sftp-forcecommand.diff (text/plain), 1.58 KB, created by
Damien Miller
on 2008-09-24 03:07:14 AEST
(
hide
)
Description:
fix forcecommand internal-sftp
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2008-09-24 03:07:14 AEST
Size:
1.58 KB
patch
obsolete
>Index: session.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/session.c,v >retrieving revision 1.241 >retrieving revision 1.242 >diff -u -p -r1.241 -r1.242 >--- session.c 16 Jun 2008 13:22:53 -0000 1.241 >+++ session.c 21 Aug 2008 04:09:57 -0000 1.242 >@@ -1,4 +1,4 @@ >-/* $OpenBSD: session.c,v 1.241 2008/06/16 13:22:53 dtucker Exp $ */ >+/* $OpenBSD: session.c,v 1.242 2008/08/21 04:09:57 djm Exp $ */ > /* > * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland > * All rights reserved >@@ -87,6 +87,12 @@ > #include <kafs.h> > #endif > >+#define IS_INTERNAL_SFTP(c) \ >+ (!strncmp(c, INTERNAL_SFTP_NAME, sizeof(INTERNAL_SFTP_NAME) - 1) && \ >+ (c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\0' || \ >+ c[sizeof(INTERNAL_SFTP_NAME) - 1] == ' ' || \ >+ c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\t')) >+ > /* func */ > > Session *session_new(void); >@@ -701,7 +707,7 @@ do_exec(Session *s, const char *command) > if (options.adm_forced_command) { > original_command = command; > command = options.adm_forced_command; >- if (strcmp(INTERNAL_SFTP_NAME, command) == 0) >+ if (IS_INTERNAL_SFTP(command)) > s->is_subsystem = SUBSYSTEM_INT_SFTP; > else if (s->is_subsystem) > s->is_subsystem = SUBSYSTEM_EXT; >@@ -709,7 +715,7 @@ do_exec(Session *s, const char *command) > } else if (forced_command) { > original_command = command; > command = forced_command; >- if (strcmp(INTERNAL_SFTP_NAME, command) == 0) >+ if (IS_INTERNAL_SFTP(command)) > s->is_subsystem = SUBSYSTEM_INT_SFTP; > else if (s->is_subsystem) > s->is_subsystem = SUBSYSTEM_EXT;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1527
: 1569