[Fusionforge-commits] FusionForge branch Branch_5_3 updated. v5.3-rc4-509-gda510ee

Roland Mas lolando at libremir.placard.fr.eu.org
Tue Jul 7 18:35:27 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_3 has been updated
       via  da510ee47447fef73552f840cb6d2f7945da285b (commit)
       via  ea93121a027bb5e9b104f5a50fcba54a74daeeb1 (commit)
      from  e547f70f145ed7632d4f6e99dadff7e8bd38c151 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=da510ee47447fef73552f840cb6d2f7945da285b

commit da510ee47447fef73552f840cb6d2f7945da285b
Author: Roland Mas <roland at gnurandal.com>
Date:   Tue Jul 7 18:29:13 2015 +0200

    Added helper script to force refresh of NSS tables

diff --git a/src/utils/refresh_nss.php b/src/utils/refresh_nss.php
new file mode 100644
index 0000000..1bb9a9d
--- /dev/null
+++ b/src/utils/refresh_nss.php
@@ -0,0 +1,44 @@
+#! /usr/bin/php
+<?php
+/**
+ * Copyright 2010 Roland Mas
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+require (dirname(__FILE__).'/../common/include/env.inc.php');
+require_once $gfcommon.'include/pre.php';
+
+$err='';
+
+// Plugins subsystem
+require_once 'common/include/Plugin.class.php';
+require_once 'common/include/PluginManager.class.php';
+
+setup_plugin_manager () ;
+session_set_admin () ;
+
+$res = db_query_params ('SELECT user_id FROM users WHERE status=$1 ORDER BY user_id',
+			array ('A'));
+
+while ($arr = db_fetch_array($res)) {
+    $u = user_get_object($arr['user_id']);
+	echo "Refreshing NSS for user ".$u->getUnixName()."\n" ;
+
+    $SYS->sysCheckCreateUser($u->getID());
+}
+
+?>

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=ea93121a027bb5e9b104f5a50fcba54a74daeeb1

commit ea93121a027bb5e9b104f5a50fcba54a74daeeb1
Author: Roland Mas <roland at gnurandal.com>
Date:   Tue Jul 7 13:31:53 2015 +0200

    AuthLDAP: user should be able to login even if not present in the database

diff --git a/src/plugins/authldap/www/post-login.php b/src/plugins/authldap/www/post-login.php
index 5d4bda3..3cff138 100644
--- a/src/plugins/authldap/www/post-login.php
+++ b/src/plugins/authldap/www/post-login.php
@@ -72,7 +72,12 @@ if ($login) {
 		exit_form_double_submit();
 	}
 	$test = $plugin->checkLDAPCredentials(strtolower($form_loginname),$form_pw);
-	if ($test == FORGE_AUTH_AUTHORITATIVE_ACCEPT && user_get_object_by_name($form_loginname)->getStatus() == 'A') {
+    $u = user_get_object_by_name($form_loginname);
+    $user_is_okay = false;
+    if ($u == NULL or $u->getStatus() == 'A') {
+            $user_is_okay=true;
+    }
+	if ($test == FORGE_AUTH_AUTHORITATIVE_ACCEPT && $user_is_okay) {
 		if ($plugin->isSufficient()) {
 			$plugin->startSession($form_loginname);
 		}

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/authldap/www/post-login.php            |  7 ++++++-
 src/utils/{normalize_roles.php => refresh_nss.php} | 14 ++++++--------
 2 files changed, 12 insertions(+), 9 deletions(-)
 copy src/utils/{normalize_roles.php => refresh_nss.php} (78%)
 mode change 100755 => 100644


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list