4f2fe36
--- Linux-PAM-0.99.6.2/modules/pam_selinux/pam_selinux.8.xml.drop-multiple	2006-06-18 10:26:59.000000000 +0200
4f2fe36
+++ Linux-PAM-0.99.6.2/modules/pam_selinux/pam_selinux.8.xml	2006-11-10 17:47:16.000000000 +0100
4f2fe36
@@ -25,9 +25,6 @@
4f2fe36
 	debug
4f2fe36
       </arg>
4f2fe36
       <arg choice="opt">
4f2fe36
-	multiple
4f2fe36
-      </arg>
4f2fe36
-      <arg choice="opt">
4f2fe36
 	open
4f2fe36
       </arg>
4f2fe36
       <arg choice="opt">
4f2fe36
@@ -93,18 +90,6 @@
4f2fe36
       </varlistentry>
4f2fe36
       <varlistentry>
4f2fe36
         <term>
4f2fe36
-          <option>multiple</option>
4f2fe36
-        </term>
4f2fe36
-        <listitem>
4f2fe36
-          <para>
4f2fe36
-            Tells pam_selinux.so to allow the user to  select  the
4f2fe36
-            security context  they  will  login  with, if the user has
4f2fe36
-            more than one role.
4f2fe36
-          </para>
4f2fe36
-        </listitem>
4f2fe36
-      </varlistentry>
4f2fe36
-      <varlistentry>
4f2fe36
-        <term>
4f2fe36
           <option>open</option>
4f2fe36
         </term>
4f2fe36
         <listitem>
4f2fe36
--- Linux-PAM-0.99.6.2/modules/pam_selinux/pam_selinux.c.drop-multiple	2006-11-10 17:44:33.000000000 +0100
4f2fe36
+++ Linux-PAM-0.99.6.2/modules/pam_selinux/pam_selinux.c	2006-11-10 17:44:33.000000000 +0100
4f2fe36
@@ -89,56 +89,6 @@
4f2fe36
 }
4f2fe36
 
4f2fe36
 static security_context_t
4f2fe36
-select_context (pam_handle_t *pamh, security_context_t* contextlist,
4f2fe36
-		int debug)
4f2fe36
-{
4f2fe36
-  char *responses;
4f2fe36
-  char *text=calloc(PATH_MAX,1);
4f2fe36
-
4f2fe36
-  if (text == NULL)
4f2fe36
-    return (security_context_t) strdup(contextlist[0]);
4f2fe36
-
4f2fe36
-  snprintf(text, PATH_MAX,
4f2fe36
-	   _("Your default context is %s. \n"), contextlist[0]);
4f2fe36
-  send_text(pamh,text,debug);
4f2fe36
-  free(text);
4f2fe36
-  query_response(pamh,_("Do you want to choose a different one? [n]"),
4f2fe36
-		 &responses,debug);
4f2fe36
-  if (responses && ((responses[0] == 'y') ||
4f2fe36
-		    (responses[0] == 'Y')))
4f2fe36
-    {
4f2fe36
-      int choice=0;
4f2fe36
-      int i;
4f2fe36
-      const char *prompt=_("Enter number of choice: ");
4f2fe36
-      int len=strlen(prompt);
4f2fe36
-      char buf[PATH_MAX];
4f2fe36
-
4f2fe36
-      _pam_drop(responses);
4f2fe36
-      for (i = 0; contextlist[i]; i++) {
4f2fe36
-	len+=strlen(contextlist[i]) + 10;
4f2fe36
-      }
4f2fe36
-      text=calloc(len,1);
4f2fe36
-      for (i = 0; contextlist[i]; i++) {
4f2fe36
-	snprintf(buf, PATH_MAX,
4f2fe36
-		 "[%d] %s\n", i+1, contextlist[i]);
4f2fe36
-	strncat(text,buf,len);
4f2fe36
-      }
4f2fe36
-      strcat(text,prompt);
4f2fe36
-      while ((choice < 1) || (choice > i)) {
4f2fe36
-	query_response(pamh,text,&responses,debug);
4f2fe36
-	choice = strtol (responses, NULL, 10);
4f2fe36
-	_pam_drop(responses);
4f2fe36
-      }
4f2fe36
-      free(text);
4f2fe36
-      return (security_context_t) strdup(contextlist[choice-1]);
4f2fe36
-    }
4f2fe36
-  else if (responses)
4f2fe36
-    _pam_drop(responses);
4f2fe36
-
4f2fe36
-  return (security_context_t) strdup(contextlist[0]);
4f2fe36
-}
4f2fe36
-
4f2fe36
-static security_context_t
4f2fe36
 manual_context (pam_handle_t *pamh, const char *user, int debug)
4f2fe36
 {
4f2fe36
   security_context_t newcon;
4f2fe36
@@ -322,7 +272,7 @@
4f2fe36
 		    int argc, const char **argv)
4f2fe36
 {
4f2fe36
   int i, debug = 0, ttys=1, has_tty=isatty(0);
4f2fe36
-  int verbose=0, multiple=0, close_session=0;
4f2fe36
+  int verbose=0, close_session=0;
4f2fe36
   int ret = 0;
4f2fe36
   security_context_t* contextlist = NULL;
4f2fe36
   int num_contexts = 0;
4f2fe36
@@ -342,9 +292,6 @@
4f2fe36
     if (strcmp(argv[i], "verbose") == 0) {
4f2fe36
       verbose = 1;
4f2fe36
     }
4f2fe36
-    if (strcmp(argv[i], "multiple") == 0) {
4f2fe36
-      multiple = 1;
4f2fe36
-    }
4f2fe36
     if (strcmp(argv[i], "close") == 0) {
4f2fe36
       close_session = 1;
4f2fe36
     }
4f2fe36
@@ -377,13 +324,8 @@
4f2fe36
 	  free(level);
4f2fe36
   }
4f2fe36
   if (num_contexts > 0) {
4f2fe36
-    if (multiple && (num_contexts > 1) && has_tty) {
4f2fe36
-      user_context = select_context(pamh,contextlist, debug);
4f2fe36
-      freeconary(contextlist);
4f2fe36
-    } else {
4f2fe36
-      user_context = (security_context_t) strdup(contextlist[0]);
4f2fe36
-      freeconary(contextlist);
4f2fe36
-    }
4f2fe36
+    user_context = (security_context_t) strdup(contextlist[0]);
4f2fe36
+    freeconary(contextlist);
4f2fe36
   } else {
4f2fe36
     if (has_tty) {
4f2fe36
       user_context = manual_context(pamh,username,debug);