676599b36a
This prevents injection of ':' and '\n' into output functions which use the NSS files database syntax. Critical fields (user/group names and file system paths) are checked strictly. For backwards compatibility, the GECOS field is rewritten instead. The getent program is adjusted to use the put*ent functions in libc, instead of local copies. This changes the behavior of getent if user names start with '-' or '+'.
15 lines
444 B
C
15 lines
444 B
C
#ifndef _NSS_H
|
|
#include <nss/nss.h>
|
|
|
|
#define NSS_INVALID_FIELD_CHARACTERS ":\n"
|
|
extern const char __nss_invalid_field_characters[] attribute_hidden;
|
|
|
|
_Bool __nss_valid_field (const char *value)
|
|
attribute_hidden internal_function;
|
|
_Bool __nss_valid_list_field (char **list)
|
|
attribute_hidden internal_function;
|
|
const char *__nss_rewrite_field (const char *value, char **to_be_freed)
|
|
attribute_hidden internal_function;
|
|
|
|
#endif /* _NSS_H */
|