This commit is number 3 of 4.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 29 Oct 2001 07:28:32 +0000 (07:28 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 29 Oct 2001 07:28:32 +0000 (07:28 +0000)
commite7634f81c5116ff4addfb7e495f54b6bb78e8f77
treed6b9d59d7c72318bda6c3741f263fe506628192a
parent8f607810eb24ed1157bbd2e896c2c167bc34d986
This commit is number 3 of 4.

In particular this commit focuses on:

Changing the Get_Pwnam code so that it can work in a const-enforced
environment.

While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.

----

These changes allow for 'const' in 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
13 files changed:
source/auth/auth_rhosts.c
source/auth/auth_unix.c
source/lib/substitute.c
source/lib/username.c
source/passdb/smbpassgroup.c
source/rpc_server/srv_samr_nt.c
source/smbd/auth_rhosts.c
source/smbd/auth_unix.c
source/smbd/chgpasswd.c
source/smbd/lanman.c
source/smbd/password.c
source/smbd/service.c
source/smbd/uid.c