summaryrefslogtreecommitdiff
path: root/udev_utils.h
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-03-27 00:15:07 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:54:59 -0700
commit18614ab25d4208749a3d85ced33acc6679c60fce (patch)
tree4c91a9edc1bb542e9028216046f665c8fde16c60 /udev_utils.h
parent61b1b7069f7a640e1952dce3c6de97034ef7c4fe (diff)
[PATCH] remove untrusted chars read from sysfs-values or returned by PROGRAM
Better remove characters that are useless in a device node name. It may be a security risk to pass any character read from e.g. a sysfs attribute to a shell script we execute later. Prevent the modification of the libsysfs attribute value cache. Clear PROGRAM result if the execution encountered an error.
Diffstat (limited to 'udev_utils.h')
-rw-r--r--udev_utils.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/udev_utils.h b/udev_utils.h
index b45500dcff..5ebc9e5bb6 100644
--- a/udev_utils.h
+++ b/udev_utils.h
@@ -39,7 +39,8 @@ extern int unlink_secure(const char *filename);
extern int file_map(const char *filename, char **buf, size_t *bufsize);
extern void file_unmap(char *buf, size_t bufsize);
extern size_t buf_get_line(const char *buf, size_t buflen, size_t cur);
-extern void no_trailing_slash(char *path);
+extern void remove_trailing_char(char *path, char c);
+extern void replace_untrusted_chars(char *string);
extern int name_list_add(struct list_head *name_list, const char *name, int sort);
extern int add_matching_files(struct list_head *name_list, const char *dirname, const char *suffix);