|
From: <he...@us...> - 2013-05-11 07:28:19
|
Revision: 179
http://sourceforge.net/p/pdbsql/code/179
Author: herwinw
Date: 2013-05-11 07:28:13 +0000 (Sat, 11 May 2013)
Log Message:
-----------
Removed compatibility ifdefs for samba 3.4
This version is not supposed to run on samba 3.4, so we probably shouldn't bother keeping them in the codebase.
Modified Paths:
--------------
branches/pdbsql_36/pdb_multi.c
branches/pdbsql_36/pdb_mysql.c
branches/pdbsql_36/pdb_pgsql.c
branches/pdbsql_36/pdb_sql.c
Modified: branches/pdbsql_36/pdb_multi.c
===================================================================
--- branches/pdbsql_36/pdb_multi.c 2013-05-10 21:20:29 UTC (rev 178)
+++ branches/pdbsql_36/pdb_multi.c 2013-05-11 07:28:13 UTC (rev 179)
@@ -197,30 +197,6 @@
}
#endif
-#if PASSDB_INTERFACE_VERSION < 19
-/* Tries uid_to_rid on every backend until one succeeds, returns true on success */
-static bool multisam_uid_to_rid(struct pdb_methods *methods, uid_t uid,
- uint32 *rid)
-{
- short i;
- struct multisam_data *data;
- bool rv;
-
- if (!methods) return false;
- data = (struct multisam_data *)methods->private_data;
- if (!data) return false;
-
- for (i = 0; i < data->num_backends; i++) {
- rv = data->methods[i]->uid_to_rid(data->methods[i], uid, rid);
- if (rv == true) {
- return true;
- }
- }
-
- return false;
-}
-#endif
-
/* Tries gid_to_sid on every backend until one succeeds, returns true on success */
static bool multisam_gid_to_sid(struct pdb_methods *methods, gid_t gid,
struct dom_sid *sid)
@@ -290,15 +266,9 @@
/* Get a new free rid if necessary */
-#if PASSDB_INTERFACE_VERSION < 19
- if (data->methods[0]->rid_algorithm(data->methods[0])) {
- multisam_new_rid(methods, rid, 0);
- }
-#else
if (data->methods[0]->capabilities(data->methods[0])) {
multisam_new_rid(methods, rid, 0);
}
-#endif
return data->methods[0]->create_user(data->methods[0], tmp_ctx, name, acb_info, rid);
}
@@ -741,19 +711,13 @@
}
#endif
-#if PASSDB_INTERFACE_VERSION < 19
-/* The rid algorithm of the first backend is used. */
-static bool multisam_rid_algorithm (struct pdb_methods *methods)
-{
- return true;
-}
-#else
/* The capabilities of the first backend is used. */
+/* FIXME This should combine the capabilities from all the backends */
static uint32_t multisam_capabilities (struct pdb_methods *methods)
{
return PDB_CAP_STORE_RIDS | PDB_CAP_ADS;
}
-#endif
+
/* This function is a fallback for errors */
static bool multisam_dummy_new_rid (struct pdb_methods *methods, uint32 *rid)
{
@@ -800,18 +764,11 @@
(*pdb_method)->update_sam_account = multisam_update_sam_account;
(*pdb_method)->delete_sam_account = multisam_delete_sam_account;
(*pdb_method)->rename_sam_account = multisam_rename_sam_account;
-#if PASSDB_INTERFACE_VERSION < 19
- (*pdb_method)->rid_algorithm = multisam_rid_algorithm;
-#else
(*pdb_method)->capabilities = multisam_capabilities;
-#endif
(*pdb_method)->new_rid = multisam_dummy_new_rid;
(*pdb_method)->create_user = multisam_create_user;
(*pdb_method)->delete_user = multisam_delete_user;
-#if PASSDB_INTERFACE_VERSION < 19
- (*pdb_method)->uid_to_rid = multisam_uid_to_rid;
-#endif
(*pdb_method)->gid_to_sid = multisam_gid_to_sid;
(*pdb_method)->sid_to_id = multisam_sid_to_id;
Modified: branches/pdbsql_36/pdb_mysql.c
===================================================================
--- branches/pdbsql_36/pdb_mysql.c 2013-05-10 21:20:29 UTC (rev 178)
+++ branches/pdbsql_36/pdb_mysql.c 2013-05-11 07:28:13 UTC (rev 179)
@@ -407,15 +407,10 @@
return mysqlsam_replace_sam_account(methods, newpwd, 1);
}
-#if PASSDB_INTERFACE_VERSION < 19
-static bool mysqlsam_rid_algorithm (struct pdb_methods *pdb_methods) {
- return true;
-}
-#else
static uint32_t mysqlsam_capabilities (struct pdb_methods *pdb_methods) {
return PDB_CAP_STORE_RIDS | PDB_CAP_ADS;
}
-#endif
+
static bool mysqlsam_new_rid (struct pdb_methods *pdb_methods, uint32 *rid) {
return false;
}
@@ -545,11 +540,7 @@
(*pdb_method)->add_sam_account = mysqlsam_add_sam_account;
(*pdb_method)->update_sam_account = mysqlsam_update_sam_account;
(*pdb_method)->delete_sam_account = mysqlsam_delete_sam_account;
-#if PASSDB_INTERFACE_VERSION < 19
- (*pdb_method)->rid_algorithm = mysqlsam_rid_algorithm;
-#else
(*pdb_method)->capabilities = mysqlsam_capabilities;
-#endif
(*pdb_method)->new_rid = mysqlsam_new_rid;
data = talloc(*pdb_method, struct pdb_mysql_data);
Modified: branches/pdbsql_36/pdb_pgsql.c
===================================================================
--- branches/pdbsql_36/pdb_pgsql.c 2013-05-10 21:20:29 UTC (rev 178)
+++ branches/pdbsql_36/pdb_pgsql.c 2013-05-11 07:28:13 UTC (rev 179)
@@ -444,17 +444,10 @@
return pgsqlsam_replace_sam_account(methods, newpwd, 1);
}
-#if PASSDB_INTERFACE_VERSION < 19
-static bool pgsqlsam_rid_algorithm(struct pdb_methods *pdb_methods)
-{
- return true;
-}
-#else
static uint32_t pgsqlsam_capabilities(struct pdb_methods *pdb_methods)
{
return PDB_CAP_ADS;
}
-#endif
/* Iterate through search results, if a new entry is available: store in
* entry and return true. Otherwise: return false
@@ -598,11 +591,7 @@
(*pdb_method)->add_sam_account = pgsqlsam_add_sam_account;
(*pdb_method)->update_sam_account = pgsqlsam_update_sam_account;
(*pdb_method)->delete_sam_account = pgsqlsam_delete_sam_account;
-#if PASSDB_INTERFACE_VERSION < 19
- (*pdb_method)->rid_algorithm = pgsqlsam_rid_algorithm;
-#else
(*pdb_method)->capabilities = pgsqlsam_capabilities;
-#endif
data = talloc(*pdb_method, struct pdb_pgsql_data);
(*pdb_method)->private_data = data;
Modified: branches/pdbsql_36/pdb_sql.c
===================================================================
--- branches/pdbsql_36/pdb_sql.c 2013-05-10 21:20:29 UTC (rev 178)
+++ branches/pdbsql_36/pdb_sql.c 2013-05-11 07:28:13 UTC (rev 179)
@@ -556,11 +556,7 @@
pwhist = pdb_get_pw_history(newpwd, &pw_history_len);
-#if PASSDB_INTERFACE_VERSION < 19
- pdb_get_account_policy(AP_PASSWORD_HISTORY, &max_history_len);
-#else
pdb_get_account_policy(PDB_POLICY_PASSWORD_HISTORY, &pw_history_len);
-#endif
some_field_affected = 1;
for (i = 0; i < max_history_len && i < pw_history_len; i++) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|