summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-10-29 07:35:11 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-10-29 07:35:11 +0000
commitd9d7f023d8d11943ca0375e1573e6ec9921889bc (patch)
tree05cc98ee549f6d8d52711172c6fdcd3564d7ef55 /source3/nsswitch
parent2038649e51f48a489aeec49947e1b791f0b3df43 (diff)
downloadsamba-d9d7f023d8d11943ca0375e1573e6ec9921889bc.tar.gz
samba-d9d7f023d8d11943ca0375e1573e6ec9921889bc.tar.bz2
samba-d9d7f023d8d11943ca0375e1573e6ec9921889bc.zip
This commit is number 4 of 4.
In particular this commit focuses on: Actually adding the 'const' to the passdb interface, and the flow-on changes. Also kill off the 'disp_info' stuff, as its no longer used. While these changes have been mildly tested, and are pretty small, any assistance in this is appreciated. ---- These changes introduces a large dose of 'const' to the Samba tree. There are a number of good reasons to do this: - I want to allow the SAM_ACCOUNT structure to move from wasteful pstrings and fstrings to allocated strings. We can't do that if people are modifying these outputs, as they may well make assumptions about getting pstrings and fstrings - I want --with-pam_smbpass to compile with a slightly sane volume of warnings, currently its pretty bad, even in 2.2 where is compiles at all. - Tridge assures me that he no longer opposes 'const religion' based on the ability to #define const the problem away. - Changed Get_Pwnam(x,y) into two variants (so that the const parameter can work correctly): - Get_Pwnam(const x) and Get_Pwnam_Modify(x). - Reworked smbd/chgpasswd.c to work with these mods, passing around a 'struct passwd' rather than the modified username --- This finishes this line of commits off, your tree should now compile again :-) Andrew Bartlett (This used to be commit c95f5aeb9327347674589ae313b75bee3bf8e317)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wb_client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c
index bc76771f9d..9b720e5ea4 100644
--- a/source3/nsswitch/wb_client.c
+++ b/source3/nsswitch/wb_client.c
@@ -249,7 +249,7 @@ BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid)
/* Fetch the list of groups a user is a member of from winbindd. This is
used by winbind_initgroups and winbind_getgroups. */
-static int wb_getgroups(char *user, gid_t **groups)
+static int wb_getgroups(const char *user, gid_t **groups)
{
struct winbindd_request request;
struct winbindd_response response;
@@ -357,7 +357,7 @@ int winbind_initgroups(char *user, gid_t gid)
time consuming. If size is zero, list is not modified and the total
number of groups for the user is returned. */
-int winbind_getgroups(char *user, int size, gid_t *list)
+int winbind_getgroups(const char *user, int size, gid_t *list)
{
gid_t *groups = NULL;
int result, i;
@@ -433,7 +433,7 @@ BOOL winbind_gidtoname(fstring name, gid_t gid)
/* Utility function. Convert a name to a uid_t if possible. */
-BOOL winbind_nametouid(uid_t *puid, char *name)
+BOOL winbind_nametouid(uid_t *puid, const char *name)
{
DOM_SID sid;
enum SID_NAME_USE name_type;
@@ -450,7 +450,7 @@ BOOL winbind_nametouid(uid_t *puid, char *name)
/* Utility function. Convert a name to a gid_t if possible. */
-BOOL winbind_nametogid(gid_t *pgid, char *gname)
+BOOL winbind_nametogid(gid_t *pgid, const char *gname)
{
DOM_SID g_sid;
enum SID_NAME_USE name_type;