This commit is number 2 of 4.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 29 Oct 2001 07:24:49 +0000 (07:24 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 29 Oct 2001 07:24:49 +0000 (07:24 +0000)
commit8f607810eb24ed1157bbd2e896c2c167bc34d986
tree16c0471e9c5fff54114b4510c0b413bef8cf01f4
parenta8971a5448cf6d203b379c3ed01e331d5263c9ee
This commit is number 2 of 4.

In particular this commit focuses on:

The guts of the moving about inside passdb.

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

----

These changes allow for the introduction of  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

passdb/

- Kill off disp_info stuff, it isn't used any more - Kill off
support for writing to the old smbpasswd format, it isn't relevent
to Samba 3.0

- Move around and modify the pdb_...() helper functions, adding
one that sets the last changed  time to 'now' and that sets the
must change time appropriately.

- Remove the ugly forced update of the LCT- value in
pdb_smbpasswd.  - Remove the implicit modification of the ACB
flags when both NT and LM passwords are set.

- Removed substation in pdb_getsampwnam output, as a single
password change will render them  inoperable in any case (they
will be substituted and stored)

- Added a default RID to the init_sam_from_pw() function, based on
our rid algorithm.

- Added checks that an smbpasswd stored user has a uid-based RID.

- Fail to store tdb based users without a RID

lib/
    - Change the substituion code to use global_myname if there is
      no connection (and therefore no called name) at the present time.
source/include/smb.h
source/lib/substitute.c
source/passdb/passdb.c
source/passdb/pdb_smbpasswd.c
source/passdb/pdb_tdb.c