summarylogtreecommitdiffstats
path: root/mdp-name.patch
blob: b5d67a3750b47590fe17efa084f37925316f52d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
--- src/cmd.c.orig	2022-05-14 08:54:26.000000000 -0700
+++ src/cmd.c	2022-08-28 16:10:00.165490597 -0700
@@ -69,7 +69,7 @@
 void
 cmd_usage_core(void)
 {
-	printf("usage: mdp [-Vh] [-c config] command [command args ...]\n");
+	printf("usage: mdp-pass [-Vh] [-c config] command [command args ...]\n");
 }
 
 
@@ -78,14 +78,14 @@
 {
 	cmd_usage_core();
 	printf("\n");
-	printf("The mdp commands are:\n");
+	printf("The mdp-pass commands are:\n");
 	printf("   add        Add new random passwords at the end of your file.\n");
 	printf("   edit       Edit your passwords.\n");
 	printf("   generate   Generate random passwords.\n");
 	printf("   get        Get passwords by keywords or regexes.\n");
 	printf("   prompt     Interactive prompt session.\n");
 	printf("\n");
-	printf("'mdp <command> -h' returns this command's usage.\n");
+	printf("'mdp-pass <command> -h' returns this command's usage.\n");
 }
 
 
@@ -107,7 +107,7 @@
 			exit(EXIT_FAILURE);
 			break;
 		case 'V':
-			printf("mdp-%s\n", MDP_VERSION);
+			printf("mdp-pass %s\n", MDP_VERSION);
 			exit(EXIT_SUCCESS);
 			break;
 		case 'd':
@@ -118,19 +118,19 @@
 			break;
 		case 'e':
 			errx(EXIT_FAILURE, "this flag is deprecated, use "
-					"'mdp edit' instead");
+					"'mdp-pass edit' instead");
 			break;
 		case 'g':
 			errx(EXIT_FAILURE, "this flag is deprecated, use "
-					"'mdp gen' instead");
+					"'mdp-pass gen' instead");
 			break;
 		case 'r':
 			errx(EXIT_FAILURE, "this flag is deprecated, use "
-					"'mdp get -r' instead");
+					"'mdp-pass get -r' instead");
 			break;
 		case 'q':
 			errx(EXIT_FAILURE, "this flag is deprecated, use "
-					"'mdp prompt' instead");
+					"'mdp-pass prompt' instead");
 			break;
 		default:
 			exit(EXIT_FAILURE);
@@ -152,14 +152,14 @@
 
 
 /*
- * 'mdp add' - usage and parse
+ * 'mdp-pass add' - usage and parse
  */
 
 static void
 cmd_usage_add(void)
 {
-	printf("usage: mdp a[dd] [-h] [-p profile] [-n count] [-l length]\n");
-	printf("                 [-k key_id] [keywords ...]\n");
+	printf("usage: mdp-pass a[dd] [-h] [-p profile] [-n count] [-l length]\n");
+	printf("                      [-k key_id] [keywords ...]\n");
 }
 
 void
@@ -206,13 +206,13 @@
 
 
 /*
- * mdp edit usage and parse
+ * mdp-pass edit usage and parse
  */
 
 static void
 cmd_usage_edit(void)
 {
-	printf("usage: mdp edit [-h] [-k key_id]\n");
+	printf("usage: mdp-pass edit [-h] [-k key_id]\n");
 }
 
 
@@ -246,14 +246,14 @@
 
 
 /*
- * mdp generate usage and parse
+ * mdp-pass generate usage and parse
  */
 
 static void
 cmd_usage_generate(void)
 {
-	printf("usage: mdp gen[erate] [-h] [-p profile] [-n count] "
-			"[-l length]\n");
+	printf("usage: mdp-pass gen[erate] [-h] [-p profile] [-n count] "
+			     "[-l length]\n");
 }
 
 void
@@ -292,13 +292,13 @@
 
 
 /*
- * mdp get usage and parse
+ * mdp-pass get usage and parse
  */
 
 static void
 cmd_usage_get(void)
 {
-	printf("usage: mdp get [-hrE] keyword ...\n");
+	printf("usage: mdp-pass get [-hrE] keyword ...\n");
 }
 
 void
@@ -336,13 +336,13 @@
 
 
 /*
- * mdp prompt usage and parse
+ * mdp-pass prompt usage and parse
  */
 
 static void
 cmd_usage_prompt(void)
 {
-	printf("usage: mdp prompt [-hE]\n");
+	printf("usage: mdp-pass prompt [-hE]\n");
 }
 
 void
--- src/main.c.orig	2022-05-14 08:54:26.000000000 -0700
+++ src/main.c	2022-08-28 16:07:28.186086141 -0700
@@ -222,7 +222,7 @@
 		cmd_parse_prompt(argc, argv);
 		mdp_prompt();
 	} else {
-		errx(EXIT_FAILURE, "unknown command '%s' (try mdp -h)", argv[0]);
+		errx(EXIT_FAILURE, "unknown command '%s' (try mdp-pass -h)", argv[0]);
 	}
 
 	debug("normal shutdown");
--- mdp.1.orig	2022-05-14 08:54:26.000000000 -0700
+++ mdp.1	2022-08-28 16:18:50.730988668 -0700
@@ -14,14 +14,14 @@
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
 .Dd $Mdocdate: January 24 2014 $
-.Dt MDP 1
+.Dt MDP-PASS 1
 .Os
 .Sh NAME
-.Nm mdp
+.Nm mdp-pass
 .Nd password safe
 .\" SYNOPSIS
 .Sh SYNOPSIS
-.Nm mdp
+.Nm mdp-pass
 .Bk -words
 .Op Fl Vh
 .Op Fl c Ar config
@@ -43,12 +43,12 @@
 Print version.
 .It Fl h
 Print general usage. For command-specific usage, this flag should
-be placed after the command name, for example 'mdp edit -h'.
+be placed after the command name, for example 'mdp-pass edit -h'.
 .El
 .\" COMMANDS
 .Sh COMMANDS
-.\" mdp add
-.Nm mdp
+.\" mdp-pass add
+.Nm mdp-pass
 .Bk -words
 .Ar add
 .Op Fl h
@@ -67,9 +67,9 @@
 The options for the 'add' command are the same as the 'edit' and the 'generate'
 command.
 .Ed
-.\" mdp edit
+.\" mdp-pass edit
 .Pp
-.Nm mdp
+.Nm mdp-pass
 .Bk -words
 .Ar edit
 .Op Fl h
@@ -88,9 +88,9 @@
 to specify a key id in case it wasn't defined in the configuration file.
 .El
 .Ed
-.\" mdp generate
+.\" mdp-pass generate
 .Pp
-.Nm mdp
+.Nm mdp-pass
 .Bk -words
 .Ar generate
 .Op Fl h
@@ -100,7 +100,7 @@
 .Ek
 .Bd -ragged -offset indent
 Generate password(s) according to the configuration or command-line
-arguments.  Without profile specified, mdp uses the top-level
+arguments.  Without profile specified, mdp-pass uses the top-level
 definitions for the character set, password length and count (see
 CONFIGURATION below). All the flags specified on the command-line
 will override the ones specified in the profile or top-level
@@ -120,9 +120,9 @@
 and profile).
 .El
 .Ed
-.\" mdp get
+.\" mdp-pass get
 .Pp
-.Nm mdp
+.Nm mdp-pass
 .Bk -words
 .Ar get
 .Op Fl hEr
@@ -145,9 +145,9 @@
 on screen and in terminal history/buffer.
 .El
 .Ed
-.\" mdp prompt
+.\" mdp-pass prompt
 .Pp
-.Nm mdp
+.Nm mdp-pass
 .Bk -words
 .Ar prompt
 .Op Fl hE
@@ -159,7 +159,7 @@
 requested). Since it uses the default pager, multiple searches can
 be conducted using the '/' key. Any other key will exit the pager,
 it will also exit after a configurable timer. The search keywords
-will be interpreted as regexes if the -E option is used (see mdp
+will be interpreted as regexes if the -E option is used (see mdp-pass
 get).
 .Ed
 .\" QUICK WALKTHROUGH
@@ -170,15 +170,15 @@
 .It 3. Either define EDITOR env variable or add editor to the config file.
 .It 4. Pick a password from randomly generated ones, for example:
 .Bd -literal -offset indent
-mdp gen
+mdp-pass gen
 .Ed
-.It 5. Run "mdp edit" and add a line such as:
+.It 5. Run "mdp-pass edit" and add a line such as:
 .Bd -literal -offset indent
 twitter sponge@bob.com yHVHPnqXyx6qUuki
 .Ed
 .It 6. This is how the Twitter password is requested:
 .Bd -literal -offset indent
-mdp get twitter
+mdp-pass get twitter
 .Ed
 .El
 .\" CONFIGURATION
@@ -227,11 +227,11 @@
 prompt or if it cannot communicate with the parent process.
 .Pp
 .It Ic set password_count Ar count
-Define how many password to show with using 'mdp gen'. Default: 4 or as defined
+Define how many password to show with using 'mdp-pass gen'. Default: 4 or as defined
 in the profile.
 .Pp
 .It Ic set password_file Ar filepath
-Sets the location of the password file. mdp will refuse to use a password file
+Sets the location of the password file. mdp-pass will refuse to use a password file
 with permissions other than 0600 or in a folder with permissions other than
 0700.  The default value for password_file is ~/.mdp/passwords.
 .Pp
@@ -247,7 +247,7 @@
 .El
 .\" PASSWORD FILE
 .Sh PASSWORD FILE
-The password file should be structured to allow mdp to query it,
+The password file should be structured to allow mdp-pass to query it,
 since it works similarly to grep, one line per password is ideal.
 For example:
 .Bd -literal -offset indent
@@ -259,7 +259,7 @@
 with anything except for new-line (\\n), allowing services to be
 found by names:
 .Bd -literal -offset indent
-mdp serviceA
+mdp-pass serviceA
 .Ed
 .Pp
 Any convenient number of namespacing hints can be used to add
@@ -271,7 +271,7 @@
 irc       serviceC       password3
 .Ed
 .Pp
-Using '#' in the beginning of a line will avoid mdp from displaying
+Using '#' in the beginning of a line will avoid mdp-pass from displaying
 this line during searches.  This is particularly useful to add meta
 data to the password file or keep track of previous password without
 adding noise to the output. For example:
@@ -318,7 +318,7 @@
 disables the creation of the backup file.
 .It Pa $HOME/.mdp/lock
 This file is created while the password file is loaded in the editor.
-It avoids two copies of mdp to run at the same time for the same user.
+It avoids two copies of mdp-pass to run at the same time for the same user.
 .El
 .\" SEE ALSO
 .Sh SEE ALSO
@@ -331,7 +331,7 @@
 .El
 .\" AUTHORS
 .Sh AUTHORS
-mdp was written by Bertrand Janin <b@janin.com> and is distributed under an ISC
+mdp-pass was written by Bertrand Janin <b@janin.com> and is distributed under an ISC
 license (BSD, MIT and OSI compatible).
 .Pp
 A bunch of utility functions are borrowed from OpenBSD and OpenSSH, both