diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-20 02:15:26 +0300 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-20 02:15:26 +0300 |
commit | a7d6c8bab919e1a537f8b7db7b8676484e60f550 (patch) | |
tree | fd5d442775f7551b76d22563816d30b4fc6a6029 /include | |
parent | cf7cf622046b0e1a2817e1da4aa8bc6f513b0153 (diff) |
adduser/addgroup: check username for invalid chars
(by Tito <farmatito AT tiscali.it>). +129 bytes when enabled.
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index d059ac9de..19b3bba5f 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -637,7 +637,11 @@ const char* get_cached_groupname(gid_t gid); void clear_username_cache(void); /* internally usernames are saved in fixed-sized char[] buffers */ enum { USERNAME_MAX_SIZE = 16 - sizeof(int) }; - +#if ENABLE_FEATURE_CHECK_NAMES +void die_if_bad_username(const char* name); +#else +#define die_if_bad_username(name) ((void)(name)) +#endif int execable_file(const char *name); char *find_execable(const char *filename); |