diff options
author | George Lebl <jirka@5z.com> | 2003-09-26 20:39:25 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2003-09-26 20:39:25 +0000 |
commit | 508b254e93e86f61a206ce6910bcf526563219c0 (patch) | |
tree | 42fa675cf41f26ece14d6bd2ad157e7bc7823e40 | |
parent | 7e0298ffec4a49050ea8556503a159db4ab12cb9 (diff) | |
download | gdm-508b254e93e86f61a206ce6910bcf526563219c0.tar.gz |
in a further fit of anality, stat the file even before handing it to the
Fri Sep 26 13:38:55 2003 George Lebl <jirka@5z.com>
* daemon/slave.c: in a further fit of anality, stat the file
even before handing it to the greeter and don't allow other
then regular files.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | daemon/slave.c | 7 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Fri Sep 26 13:38:55 2003 George Lebl <jirka@5z.com> + + * daemon/slave.c: in a further fit of anality, stat the file + even before handing it to the greeter and don't allow other + then regular files. + Fri Sep 26 10:44:18 2003 George Lebl <jirka@5z.com> * daemon/slave.c: to be even analer about filenames of user pics, diff --git a/daemon/slave.c b/daemon/slave.c index 0cbcb0cc..1f87c4ea 100644 --- a/daemon/slave.c +++ b/daemon/slave.c @@ -1939,6 +1939,13 @@ run_pictures (void) /* if in trusted dir, just use it */ if (is_in_trusted_pic_dir (picfile)) { + struct stat s; + + if (stat (picfile, &s) != 0 || + ! S_ISREG (s.st_mode)) { + g_free (picfile); + picfile = g_strdup (""); + } NEVER_FAILS_seteuid (0); NEVER_FAILS_setegid (GdmGroupId); |