Bugzilla – Attachment 2687 Details for
Bug 2449
uid for expansion in ControlPath
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
uid for expansion in ControlPath
0001-uid-for-expansion-in-ControlPath.patch (text/plain), 1.96 KB, created by
Christian Hesse
on 2015-08-21 20:38:03 AEST
(
hide
)
Description:
uid for expansion in ControlPath
Filename:
MIME Type:
Creator:
Christian Hesse
Created:
2015-08-21 20:38:03 AEST
Size:
1.96 KB
patch
obsolete
>From fba97bb7908bc9178a1e2c476c2a1be142979b33 Mon Sep 17 00:00:00 2001 >From: Christian Hesse <mail@eworm.de> >Date: Mon, 3 Aug 2015 12:49:28 +0200 >Subject: [PATCH 1/1] uid for expansion in ControlPath > >Modern Linux systems create a private directory in /run/user/ for each >user, named by numeric user id (uid). This adds a new character sequence >'%i' for expansion in ControlPath to match this (and possibly other) >directory. > >Signed-off-by: Christian Hesse <mail@eworm.de> >--- > ssh.c | 5 ++++- > ssh_config.5 | 4 +++- > 2 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/ssh.c b/ssh.c >index 59c1f93..c4de144 100644 >--- a/ssh.c >+++ b/ssh.c >@@ -505,7 +505,8 @@ main(int ac, char **av) > { > int i, r, opt, exit_status, use_syslog, config_test = 0; > char *p, *cp, *line, *argv0, buf[PATH_MAX], *host_arg, *logfile; >- char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV]; >+ char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV], >+ uidstr[11]; > char cname[NI_MAXHOST]; > struct stat st; > struct passwd *pw; >@@ -1122,6 +1123,7 @@ main(int ac, char **av) > strlcpy(shorthost, thishost, sizeof(shorthost)); > shorthost[strcspn(thishost, ".")] = '\0'; > snprintf(portstr, sizeof(portstr), "%d", options.port); >+ snprintf(uidstr, sizeof(uidstr), "%d", pw->pw_uid); > > if ((md = ssh_digest_start(SSH_DIGEST_SHA1)) == NULL || > ssh_digest_update(md, thishost, strlen(thishost)) < 0 || >@@ -1164,6 +1166,7 @@ main(int ac, char **av) > "p", portstr, > "r", options.user, > "u", pw->pw_name, >+ "i", uidstr, > (char *)NULL); > free(cp); > } >diff --git a/ssh_config.5 b/ssh_config.5 >index a47f3ca..7d73f96 100644 >--- a/ssh_config.5 >+++ b/ssh_config.5 >@@ -538,7 +538,9 @@ the destination port, > .Ql %r > by the remote login username, > .Ql %u >-by the username of the user running >+by the username and >+.Ql %i >+by the numeric user id (uid) of the user running > .Xr ssh 1 , and > .Ql \&%C > by a hash of the concatenation: %l%h%p%r. >-- >2.5.0 >
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 2449
: 2687