* Fedora Bug #163760: sbr/context_read.c (context_read): Ensure that the
authorJosh Bressers <josh@bress.net>
Wed, 14 Dec 2005 01:48:24 +0000 (01:48 +0000)
committerJosh Bressers <josh@bress.net>
Wed, 14 Dec 2005 01:48:24 +0000 (01:48 +0000)
context is only read once.

ChangeLog
sbr/context_read.c

index bcea34a..3ade10b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-13  Michael Forrest <mef@computer.org>
+
+       * Fedora Bug #163760: sbr/context_read.c (context_read): Ensure that
+       the context is only read once.
+
 2005-12-12  Josh Bressers <josh@bress.net>
 
        * uip/sendsbr.c (annoaux): Fix the call to annotate() fixing a bug
index 6a1eea1..32051c5 100644 (file)
@@ -39,6 +39,13 @@ context_read (void)
     register   FILE            *ib;            /* profile and context file pointer */
 
     /*
+     *  If this routine _is_ called again (despite the wanings in the
+     *  comments above), return immediately.
+     */
+    if ( m_defs != 0 )
+        return;
+
+    /*
      * Find user's home directory.  Try the HOME environment variable first,
      * the home directory field in the password file if that's not found.
      */