|
From: <he...@us...> - 2008-08-12 18:06:46
|
Revision: 161
http://pdbsql.svn.sourceforge.net/pdbsql/?rev=161&view=rev
Author: herwinw
Date: 2008-08-12 18:06:55 +0000 (Tue, 12 Aug 2008)
Log Message:
-----------
Removed all // comments from pdb_multi.c (according to samba coding guidelines it's bad)
Modified Paths:
--------------
branches/pdbsql_32-test/pdb_multi.c
Modified: branches/pdbsql_32-test/pdb_multi.c
===================================================================
--- branches/pdbsql_32-test/pdb_multi.c 2008-08-12 17:58:14 UTC (rev 160)
+++ branches/pdbsql_32-test/pdb_multi.c 2008-08-12 18:06:55 UTC (rev 161)
@@ -513,68 +513,70 @@
}
#endif
+#if 0
/* Creates user list in every backend */
-//static NTSTATUS multisam_setsampwent(struct pdb_methods *methods, bool update, uint32 acb_mask)
-//{
-// short i;
-// struct multisam_data *data;
-// NTSTATUS ret;
-//
-// SET_DATA(data, methods);
-//
-// DEBUG(1, ("Setsampwent executing..\n"));
-//
-// for (i = 0; i < data->num_backends; i++) {
-// ret = data->methods[i]->setsampwent(data->methods[i], update, acb_mask);
-// if (!NT_STATUS_IS_OK(ret)) {
-// return ret;
-// }
-// }
-//
-// return NT_STATUS_OK;
-//}
+static NTSTATUS multisam_setsampwent(struct pdb_methods *methods, bool update, uint32 acb_mask)
+{
+ short i;
+ struct multisam_data *data;
+ NTSTATUS ret;
+ SET_DATA(data, methods);
+
+ DEBUG(1, ("Setsampwent executing..\n"));
+
+ for (i = 0; i < data->num_backends; i++) {
+ ret = data->methods[i]->setsampwent(data->methods[i], update, acb_mask);
+ if (!NT_STATUS_IS_OK(ret)) {
+ return ret;
+ }
+ }
+
+ return NT_STATUS_OK;
+}
+
/***************************************************************
End enumeration of the passwd list.
****************************************************************/
/* Runs endsampwent on every backend */
-//static void multisam_endsampwent(struct pdb_methods *methods)
-//{
-// short i;
-// struct multisam_data *data;
-//
-// if (!methods) return;
-// data = (struct multisam_data *)methods->private_data;
-// if (!data) return;
-//
-// DEBUG(1, ("Freeing pwent results on multisam backends\n"));
-//
-// for (i = 0; i < data->num_backends; i++) {
-// data->methods[i]->endsampwent(data->methods[i]);
-// }
-//}
+static void multisam_endsampwent(struct pdb_methods *methods)
+{
+ short i;
+ struct multisam_data *data;
+ if (!methods) return;
+ data = (struct multisam_data *)methods->private_data;
+ if (!data) return;
+
+ DEBUG(1, ("Freeing pwent results on multisam backends\n"));
+
+ for (i = 0; i < data->num_backends; i++) {
+ data->methods[i]->endsampwent(data->methods[i]);
+ }
+}
+
/*****************************************************************
Get one struct samu from the list (next in line)
*****************************************************************/
/* Reads every user from backend 0, then 1.. etc (returns one) */
-//static NTSTATUS multisam_getsampwent(struct pdb_methods *methods, struct samu * user)
-//{
-// short i;
-// struct multisam_data *data;
-// NTSTATUS ret;
-//
-// SET_DATA(data, methods);
-//
-// for (i = 0; i < data->num_backends; i++) {
-// ret = data->methods[i]->getsampwent(data->methods[i], user);
-// if (NT_STATUS_IS_OK(ret)) {
-// return ret;
-// }
-// }
-//
-// return NT_STATUS_INVALID_PARAMETER;
-//}
+static NTSTATUS multisam_getsampwent(struct pdb_methods *methods, struct samu * user)
+{
+ short i;
+ struct multisam_data *data;
+ NTSTATUS ret;
+
+ SET_DATA(data, methods);
+
+ for (i = 0; i < data->num_backends; i++) {
+ ret = data->methods[i]->getsampwent(data->methods[i], user);
+ if (NT_STATUS_IS_OK(ret)) {
+ return ret;
+ }
+ }
+
+ return NT_STATUS_INVALID_PARAMETER;
+}
+#endif
/******************************************************************
Lookup a name in the SAM database
@@ -771,9 +773,9 @@
(*pdb_method)->name = "multisam";
/* Mandatory implementation */
-// (*pdb_method)->setsampwent = multisam_setsampwent;
-// (*pdb_method)->endsampwent = multisam_endsampwent;
-// (*pdb_method)->getsampwent = multisam_getsampwent;
+ /* (*pdb_method)->setsampwent = multisam_setsampwent; */
+ /* (*pdb_method)->endsampwent = multisam_endsampwent; */
+ /* (*pdb_method)->getsampwent = multisam_getsampwent; */
(*pdb_method)->search_users = multisam_search_users;
(*pdb_method)->getsampwnam = multisam_getsampwnam;
(*pdb_method)->getsampwsid = multisam_getsampwsid;
@@ -817,7 +819,7 @@
(*pdb_method)->get_account_policy = multisam_get_account_policy;
(*pdb_method)->set_account_policy = multisam_set_account_policy;
(*pdb_method)->get_seq_num = multisam_get_seq_num;
-// (*pdb_method)->search_users = multisam_search_users;
+ (*pdb_method)->search_users = multisam_search_users;
(*pdb_method)->search_groups = multisam_search_groups;
(*pdb_method)->search_aliases = multisam_search_aliases;
#endif
@@ -828,7 +830,6 @@
}
data->location = talloc_strdup(data, location);
- //data->names = str_list_make_talloc(data, data->location, NULL);
data->names = str_list_make(data, data->location, NULL);
data->num_backends = str_list_count((const char **)data->names);
data->locations = talloc_array(data, char *, data->num_backends);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|