summaryrefslogtreecommitdiff
path: root/common/gdm-common.h
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2007-11-30 22:13:21 +0000
committerRay Strode <halfline@src.gnome.org>2007-11-30 22:13:21 +0000
commit4e85b11eb11c630bd02a980ee18b2477341dd78e (patch)
treecad03289336c118a5cb2393a0b7ca2d33955af80 /common/gdm-common.h
parent1508d0e332386e052e118e855239a603cb56bf49 (diff)
downloadgdm-4e85b11eb11c630bd02a980ee18b2477341dd78e.tar.gz
Ensure second and subsequent auth cookies are random. Spotted by George
2007-11-30 Ray Strode <rstrode@redhat.com> Ensure second and subsequent auth cookies are random. Spotted by George Lebl. * common/gdm-common.[ch] (gdm_generate_random_bytes): open /dev/urandom and read size bytes from it. (_fd_is_character_device): check if fd points to char device (_read_bytes): the usual loop until all bytes are read helper function for read(). * daemon/gdm-display-access-file.c (generate_random_bytes): remove function (gdm_display_access_file_add_display): use gdm_generate_random_bytes instead of _generate_random_bytes svn path=/trunk/; revision=5534
Diffstat (limited to 'common/gdm-common.h')
-rw-r--r--common/gdm-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/gdm-common.h b/common/gdm-common.h
index d281b9ab..a1aea54e 100644
--- a/common/gdm-common.h
+++ b/common/gdm-common.h
@@ -41,6 +41,8 @@ gboolean gdm_string_hex_decode (const GString *source,
int *end_return,
GString *dest,
int insert_at);
+char *gdm_generate_random_bytes (gsize size,
+ GError **error);
G_END_DECLS