diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-10-04 22:25:28 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2007-10-04 22:25:28 +0000 |
commit | e2bf2da75482d853c5da54e4dc6b89d0596e68fa (patch) | |
tree | 03776231997a2ef2ab8900ae922e1f6422715466 /common/gdm-common.h | |
parent | 14333ef1ffc4d2c5b162d2631c52ab71d88a2641 (diff) | |
download | gdm-e2bf2da75482d853c5da54e4dc6b89d0596e68fa.tar.gz |
Remove some more obsolete code. Move common code with unknown copyright
2007-10-04 William Jon McCann <mccann@jhu.edu>
* common/Makefile.am:
* common/gdm-common-unknown-origin.c: (gdm_sigchld_block_push),
(gdm_sigchld_block_pop), (gdm_sigterm_block_push),
(gdm_sigterm_block_pop), (gdm_sigusr2_block_push),
(gdm_sigusr2_block_pop), (gdm_safe_fopen_w), (ve_clearenv):
* common/gdm-common-unknown-origin.h:
* common/gdm-common.c:
* common/gdm-common.h:
* config/Makefile.am:
* config/XKeepsCrashing:
* config/default.desktop.in:
* config/extract-shell.sh:
* config/gdmprefetchlist.in:
* config/gettextfoo.h:
* config/locale.alias:
* config/ssh.desktop.in.in:
* configure.ac:
* daemon/Makefile.am:
* daemon/choose.c:
* daemon/choose.h:
* daemon/gdm-xdmcp-display-factory.c:
(gdm_xdmcp_handle_indirect_query), (gdm_xdmcp_handle_manage),
(gdm_xdmcp_handle_managed_forward):
* daemon/main.c: (delete_pid):
* utils/Makefile.am:
* utils/gdm-dmx-reconnect-proxy.c:
Remove some more obsolete code. Move common
code with unknown copyright status into separate file.
Try to identify more copy with unknown copyright status.
svn path=/branches/mccann-gobject/; revision=5340
Diffstat (limited to 'common/gdm-common.h')
-rw-r--r-- | common/gdm-common.h | 80 |
1 files changed, 12 insertions, 68 deletions
diff --git a/common/gdm-common.h b/common/gdm-common.h index 1a62641a..bb250a79 100644 --- a/common/gdm-common.h +++ b/common/gdm-common.h @@ -1,7 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * - * (c) 2000 Eazel, Inc. - * (c) 2001,2002 George Lebl * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu> * * This library is free software; you can redistribute it and/or @@ -24,78 +22,24 @@ #define _GDM_COMMON_H #include <glib.h> -#include <glib/gstdio.h> -#include <time.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/wait.h> -G_BEGIN_DECLS - -#define VE_IGNORE_EINTR(expr) \ - do { \ - errno = 0; \ - expr; \ - } while G_UNLIKELY (errno == EINTR); - -#define NEVER_FAILS_seteuid(uid) \ - { int r = 0; \ - if (geteuid () != uid) \ - r = seteuid (uid); \ - if G_UNLIKELY (r != 0) \ - g_error ("GDM file %s: line %d (%s): Cannot run seteuid to %d: %s", \ - __FILE__, \ - __LINE__, \ - G_GNUC_PRETTY_FUNCTION, \ - (int)uid, \ - strerror (errno)); } -#define NEVER_FAILS_setegid(gid) \ - { int r = 0; \ - if (getegid () != gid) \ - r = setegid (gid); \ - if G_UNLIKELY (r != 0) \ - g_error ("GDM file %s: line %d (%s): Cannot run setegid to %d: %s", \ - __FILE__, \ - __LINE__, \ - G_GNUC_PRETTY_FUNCTION, \ - (int)gid, \ - strerror (errno)); } - -/* first goes to euid-root and then sets the egid and euid, to make sure - * this succeeds */ -#define NEVER_FAILS_root_set_euid_egid(uid,gid) \ - { NEVER_FAILS_seteuid (0); \ - NEVER_FAILS_setegid (gid); \ - if (uid != 0) { NEVER_FAILS_seteuid (uid); } } +#include "gdm-common-unknown-origin.h" - -/* like fopen with "w" but unlinks and uses O_EXCL */ -FILE * gdm_safe_fopen_w (const char *file, - mode_t perm); - -/* This is for race free forks */ -void gdm_sigchld_block_push (void); -void gdm_sigchld_block_pop (void); -void gdm_sigterm_block_push (void); -void gdm_sigterm_block_pop (void); -void gdm_sigusr2_block_push (void); -void gdm_sigusr2_block_pop (void); - -void ve_clearenv (void); +G_BEGIN_DECLS gboolean gdm_generate_random_bytes (GString *str, int n_bytes); -gboolean gdm_string_hex_encode (const GString *source, - int start, - GString *dest, - int insert_at); -gboolean gdm_string_hex_decode (const GString *source, - int start, - int *end_return, - GString *dest, - int insert_at); -gboolean gdm_generate_cookie (GString *result); +gboolean gdm_string_hex_encode (const GString *source, + int start, + GString *dest, + int insert_at); +gboolean gdm_string_hex_decode (const GString *source, + int start, + int *end_return, + GString *dest, + int insert_at); +gboolean gdm_generate_cookie (GString *result); G_END_DECLS |