diff options
author | hannal@us.ibm.com <hannal@us.ibm.com> | 2004-01-19 19:42:42 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:13:17 -0700 |
commit | 74c73ef994f3ea8d013c33fe7be73e0c0c86977b (patch) | |
tree | b8bc8217dccaacf15a34c69ef11a7a17484d3106 /udev_config.c | |
parent | b2a21a35476b4780ef1fc68c60216117ab66fa2b (diff) | |
download | systemd-74c73ef994f3ea8d013c33fe7be73e0c0c86977b.tar.gz |
[PATCH] set default owner/group in db.
This patch fixes a bug where the udev database stored empty strings
for Owner and Group if they were default. This patch stores the default
value into the database if not set otherwise. See example output:
crw------- 1 root root 4, 65 Jan 16 11:13 ttyS1
P: /class/tty/ttyS1
N: ttyS1
S:
O: root
G: root
This is a bit of a hack. However, until udev supports setting the
o/g values they will be root/root anyway so the database might as
well reflect the truth instead of empty strings.
Diffstat (limited to 'udev_config.c')
-rw-r--r-- | udev_config.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/udev_config.c b/udev_config.c index 44b5767b85..d262f2af07 100644 --- a/udev_config.c +++ b/udev_config.c @@ -46,6 +46,8 @@ char udev_permissions_filename[PATH_MAX+NAME_MAX]; char udev_rules_filename[PATH_MAX+NAME_MAX]; char udev_config_filename[PATH_MAX+NAME_MAX]; char default_mode_str[NAME_MAX]; +char default_owner_str[OWNER_SIZE]; +char default_group_str[GROUP_SIZE]; static void init_variables(void) @@ -117,6 +119,8 @@ static int parse_config_file(void) set_var("udev_rules", udev_rules_filename); set_var("udev_permissions", udev_permissions_filename); set_var("default_mode", default_mode_str); + set_var("default_owner", default_owner_str); + set_var("default_group", default_group_str); } dbg_parse("%s:%d:%Zd: error parsing '%s'", udev_config_filename, lineno, temp - line, temp); |