Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169997818
D13801.id37659.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
584 B
Referenced Files
None
Subscribers
None
D13801.id37659.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13801: Reject the absurd user and group names "." and "..".
Attached
Detach File
Event Timeline
Log In to Comment