Page MenuHomeFreeBSD

D13801.id37659.diff
No OneTemporary

D13801.id37659.diff

Index: usr.sbin/pw/pw_user.c
===================================================================
--- usr.sbin/pw/pw_user.c
+++ usr.sbin/pw/pw_user.c
@@ -641,6 +641,13 @@
/* Userids and groups can not have a leading '-'. */
if (*ch == '-')
reject = 1;
+ /*
+ * Reject the absurd user names "." and ".." to avoid
+ * bogus entries like (from "pw useraddd .."):
+ * ..:*:1002:1002:User &:/home/..:/bin/sh
+ */
+ if (strcmp(".", name) == 0 || strcmp("..", name) == 0)
+ errx(EX_DATAERR, "invalid user %s %s", showtype, name);
}
if (!reject) {
while (*ch) {

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 4, 5:28 AM (7 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38195849
Default Alt Text
D13801.id37659.diff (584 B)

Event Timeline