[Openvas-commits] r11656 - in trunk/openvas-administrator: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Sep 22 13:25:12 CEST 2011


Author: mattm
Date: 2011-09-22 13:25:12 +0200 (Thu, 22 Sep 2011)
New Revision: 11656

Modified:
   trunk/openvas-administrator/ChangeLog
   trunk/openvas-administrator/src/oap.c
   trunk/openvas-administrator/src/openvasad.c
Log:
	* src/oap.c (oap_xml_handle_end_element): Add observer role to GET_USERS.

	* src/openvasad.c (main): Add observer to roles in help.

Modified: trunk/openvas-administrator/ChangeLog
===================================================================
--- trunk/openvas-administrator/ChangeLog	2011-09-22 11:16:32 UTC (rev 11655)
+++ trunk/openvas-administrator/ChangeLog	2011-09-22 11:25:12 UTC (rev 11656)
@@ -1,3 +1,9 @@
+2011-09-22  Matthew Mundell <matthew.mundell at greenbone.net>
+
+	* src/oap.c (oap_xml_handle_end_element): Add observer role to GET_USERS.
+
+	* src/openvasad.c (main): Add observer to roles in help.
+
 2011-08-08  Matthew Mundell <matthew.mundell at greenbone.net>
 
 	* src/oap.c (oap_xml_handle_end_element): Add authdn error case to
@@ -814,7 +820,7 @@
 2010-01-29  Matthew Mundell <matthew.mundell at greenbone.net>
 
 	Make OAP SYNC_FEED simply start the sync, instead of waiting for the
-	sync to finish.  Extent OAP DESCRIBE_FEED with more details of feeds
+	sync to finish.  Extend OAP DESCRIBE_FEED with more details of feeds
 	that are sync'ing.
 
 	* src/admin.c (openvas_admin_add_user): Free uuid with free.

Modified: trunk/openvas-administrator/src/oap.c
===================================================================
--- trunk/openvas-administrator/src/oap.c	2011-09-22 11:16:32 UTC (rev 11655)
+++ trunk/openvas-administrator/src/oap.c	2011-09-22 11:25:12 UTC (rev 11656)
@@ -1878,7 +1878,7 @@
       {
         assert (current_credentials.username);
 
-        // Get base 64 encoded content of the auth configuration file.
+        /* Get base 64 encoded content of the auth configuration file. */
         gchar *config_file = g_build_filename (OPENVAS_USERS_DIR,
                                                ".auth.conf",
                                                NULL);
@@ -2007,9 +2007,13 @@
                                      "<role>%s</role>"
                                      "<hosts allow=\"%i\">%s</hosts>" "</user>",
                                      (gchar *) user->data,
-                                     openvas_is_user_admin (user->
-                                                            data) ? "Admin" :
-                                     "User", allow, hosts ? hosts : "");
+                                     openvas_is_user_admin (user->data)
+                                       ? "Admin"
+                                       : (openvas_is_user_observer (user->data)
+                                          ? "Observer"
+                                          : "User"),
+                                     allow,
+                                     hosts ? hosts : "");
             g_free (hosts);
             g_free (user->data);
             user = g_slist_next (user);

Modified: trunk/openvas-administrator/src/openvasad.c
===================================================================
--- trunk/openvas-administrator/src/openvasad.c	2011-09-22 11:16:32 UTC (rev 11655)
+++ trunk/openvas-administrator/src/openvasad.c	2011-09-22 11:25:12 UTC (rev 11656)
@@ -501,7 +501,7 @@
     {"password", 'w', 0, G_OPTION_ARG_STRING, &password,
      "Password for the new user", "<password>"},
     {"role", 'r', 0, G_OPTION_ARG_STRING, &role,
-     "Role when creating or modifying a user (User or Admin)", "<role>"},
+     "Role when creating or modifying a user (User, Admin or Observer)", "<role>"},
     {"account", 't', 0, G_OPTION_ARG_STRING, &account,
      "Username and password for new user (overrides -n and -w)",
      "<username:password>"},



More information about the Openvas-commits mailing list