3571e53040
patches for easier mirroring, to eliminate a special copy, to make www.freebsd.org/security a full copy of security.freebsd.org and be eventually be the same. For now files are just sitting there. The symlinks are missing. Discussed on: www (repository location) Discussed with: simon (so)
40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
Index: finger.c
|
|
===================================================================
|
|
RCS file: /home/ncvs/src/usr.bin/finger/finger.c,v
|
|
retrieving revision 1.15.2.3
|
|
retrieving revision 1.21
|
|
diff -u -r1.15.2.3 -r1.21
|
|
--- finger.c 2000/09/15 21:51:00 1.15.2.3
|
|
+++ finger.c 2000/10/05 15:56:13 1.21
|
|
@@ -293,6 +293,16 @@
|
|
goto net;
|
|
|
|
/*
|
|
+ * Mark any arguments beginning with '/' as invalid so that we
|
|
+ * don't accidently confuse them with expansions from finger.conf
|
|
+ */
|
|
+ for (p = argv, ip = used; *p; ++p, ++ip)
|
|
+ if (**p == '/') {
|
|
+ *ip = 1;
|
|
+ warnx("%s: no such user", *p);
|
|
+ }
|
|
+
|
|
+ /*
|
|
* Traverse the finger alias configuration file of the form
|
|
* alias:(user|alias), ignoring comment lines beginning '#'.
|
|
*/
|
|
@@ -323,11 +333,11 @@
|
|
* gathering the traditional finger information.
|
|
*/
|
|
if (mflag)
|
|
- for (p = argv; *p; ++p) {
|
|
- if (**p != '/' || !show_text("", *p, "")) {
|
|
+ for (p = argv, ip = used; *p; ++p, ++ip) {
|
|
+ if (**p != '/' || *ip == 1 || !show_text("", *p, "")) {
|
|
if (((pw = getpwnam(*p)) != NULL) && !hide(pw))
|
|
enter_person(pw);
|
|
- else
|
|
+ else if (!*ip)
|
|
warnx("%s: no such user", *p);
|
|
}
|
|
}
|