Bugzilla – Attachment 1715 Details for
Bug 1668
Add override option to ssh-keygen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
The patch with changed override to overwrite
openssh-5.3p1-keygen.patch (text/plain), 2.66 KB, created by
jchadima
on 2009-10-30 20:00:59 AEDT
(
hide
)
Description:
The patch with changed override to overwrite
Filename:
MIME Type:
Creator:
jchadima
Created:
2009-10-30 20:00:59 AEDT
Size:
2.66 KB
patch
obsolete
>diff -up openssh-5.3p1/ssh-keygen.0.keygen openssh-5.3p1/ssh-keygen.0 >--- openssh-5.3p1/ssh-keygen.0.keygen 2009-09-26 08:31:16.000000000 +0200 >+++ openssh-5.3p1/ssh-keygen.0 2009-10-29 16:50:29.000000000 +0100 >@@ -4,7 +4,7 @@ NAME > ssh-keygen - authentication key generation, management and conversion > > SYNOPSIS >- ssh-keygen [-q] [-b bits] -t type [-N new_passphrase] [-C comment] >+ ssh-keygen [-q] [-o] [-b bits] -t type [-N new_passphrase] [-C comment] > [-f output_keyfile] > ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile] > ssh-keygen -i [-f input_keyfile] >@@ -151,6 +151,8 @@ DESCRIPTION > > -q Silence ssh-keygen. Used by /etc/rc when creating a new key. > >+ -o Overwrite the key without prompting user. >+ > -R hostname > Removes all keys belonging to hostname from a known_hosts file. > This option is useful to delete hashed hosts (see the -H option >diff -up openssh-5.3p1/ssh-keygen.1.keygen openssh-5.3p1/ssh-keygen.1 >--- openssh-5.3p1/ssh-keygen.1.keygen 2008-11-03 09:15:20.000000000 +0100 >+++ openssh-5.3p1/ssh-keygen.1 2009-10-29 16:50:29.000000000 +0100 >@@ -47,6 +47,7 @@ > .Nm ssh-keygen > .Bk -words > .Op Fl q >+.Op Fl o > .Op Fl b Ar bits > .Fl t Ar type > .Op Fl N Ar new_passphrase >@@ -285,6 +286,8 @@ Silence > Used by > .Pa /etc/rc > when creating a new key. >+.It Fl o >+Overwrite the key without prompting user. > .It Fl R Ar hostname > Removes all keys belonging to > .Ar hostname >diff -up openssh-5.3p1/ssh-keygen.c.keygen openssh-5.3p1/ssh-keygen.c >--- openssh-5.3p1/ssh-keygen.c.keygen 2009-10-29 16:50:28.000000000 +0100 >+++ openssh-5.3p1/ssh-keygen.c 2009-10-29 16:51:33.000000000 +0100 >@@ -77,6 +77,7 @@ int change_passphrase = 0; > int change_comment = 0; > > int quiet = 0; >+int overwrite = 0; > > int log_level = SYSLOG_LEVEL_INFO; > >@@ -1143,7 +1144,7 @@ main(int argc, char **argv) > } > > while ((opt = getopt(argc, argv, >- "degiqpclnBHvxXyF:b:f:t:U:D:P:N:C:r:g:R:T:G:M:S:a:W:")) != -1) { >+ "degiqopclnBHvxXyF:b:f:t:U:D:P:N:C:r:g:R:T:G:M:S:a:W:")) != -1) { > switch (opt) { > case 'b': > bits = (u_int32_t)strtonum(optarg, 768, 32768, &errstr); >@@ -1199,6 +1200,9 @@ main(int argc, char **argv) > case 'q': > quiet = 1; > break; >+ case 'o': >+ overwrite = 1; >+ break; > case 'e': > case 'x': > /* export key */ >@@ -1426,7 +1430,7 @@ main(int argc, char **argv) > printf("Created directory '%s'.\n", dotsshdir); > } > /* If the file already exists, ask the user to confirm. */ >- if (stat(identity_file, &st) >= 0) { >+ if (!overwrite && stat(identity_file, &st) >= 0) { > char yesno[3]; > printf("%s already exists.\n", identity_file); > printf("Overwrite (y/n)? ");
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 1668
:
1714
| 1715 |
1916