Bugzilla – Attachment 1093 Details for
Bug 1172
[PATCH] Restrict public key authentication to scp access only
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch session.c
session.c.patch (text/plain), 875 bytes, created by
Tom Williams
on 2006-03-09 06:59:32 AEDT
(
hide
)
Description:
Patch session.c
Filename:
MIME Type:
Creator:
Tom Williams
Created:
2006-03-09 06:59:32 AEDT
Size:
875 bytes
patch
obsolete
>--- session.c.orig 2006-02-07 17:18:55.000000000 -0600 >+++ session.c 2006-03-08 11:49:41.000000000 -0600 >@@ -651,10 +651,26 @@ do_pre_login(Session *s) > void > do_exec(Session *s, const char *command) > { >+ /* implement 'scp-only' for public keys */ > if (forced_command) { >- original_command = command; >- command = forced_command; >- debug("Forced command '%.900s'", command); >+ if (strncmp(forced_command,"scp-only",8) == 0) { >+ if (!command) { >+ fatal("scp-only but trying to get shell"); >+ } >+ if (strncmp(command,"scp ",4) == 0) { >+ char *p; >+ for (p = command; *p && *p != ';'; p++) ; >+ *p = '\0'; >+ } >+ else { >+ fatal("scp-only but trying to run command: %.900s",command); >+ } >+ } >+ else { >+ original_command = command; >+ command = forced_command; >+ debug("Forced command '%.900s'", command); >+ } > } > > #ifdef SSH_AUDIT_EVENTS
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 1172
:
1093
|
1094