1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

74 Commits

Author SHA1 Message Date
Simo Sorce
59a02ecae1 minor fixes
(This used to be commit 57e639bbdd115b51362caf7e3db4ba34ccdeddc2)
2001-09-27 02:05:30 +00:00
Andrew Bartlett
1ef468f805 Fix the uninitialised variable, but more importantly fix the SEGFAULT.
Merge for 2.2.2

Should TDB cope with TDB pointers itself?

Andrew Bartlett
(This used to be commit 27f0510a0b458792293d5ce2957f61383569f62f)
2001-09-26 11:44:25 +00:00
Andrew Bartlett
f12ebc00a8 Fix up TDB_SAM with repect to case sensitvity. (need to use unix_strlower)
Also attempt to make some of the syntax clearer, its confusing enought for the
compiler... (it thinks that there is use of an unitilaised variable)

In fact there is, see next patch...
(This used to be commit 540abc8125f1b821bd362dc0d8c19a107382479f)
2001-09-26 11:36:37 +00:00
Jeremy Allison
6ddcd8a3bc Fixup passdb stuff to add new nisplus and ldap backends.
Jeremy.
(This used to be commit 611bf806d569b70edabbc04a2f5408142370a550)
2001-09-25 20:21:21 +00:00
Andrew Bartlett
00842ae253 Don't segfault when deleting accounts not in /etc/passwd. The RID we want is
the one in the sampass anyway.

Andrew Bartlett
(This used to be commit 29b7434293d7778376486b241f9458a71fa843a6)
2001-09-25 14:40:25 +00:00
Simo Sorce
76c8d7a579 memory leak fixes ..
(This used to be commit 7f07004571ad1b8d1ce787f6788b4c4d8685db37)
2001-09-25 09:58:36 +00:00
Simo Sorce
4561e8a8ea move to SAFE_FREE()
(This used to be commit 64d35e94fe6f7e56353b286162f670c8595a90e6)
2001-09-17 05:04:17 +00:00
Gerald Carter
a3203a7b16 merges from 2.2
(This used to be commit b619458dde158c37a4420a28a7e1e1f70e7a18d1)
2001-09-14 15:33:09 +00:00
Andrew Tridgell
9a9ac2739b got rid of USE_TDB_MMAP_FLAG as its not needed any more
(This used to be commit c26e0d3f27a05ecc8bd2390f9aab7f9451524e47)
2001-09-06 22:08:19 +00:00
Simo Sorce
137fb61490 changed the data format in the tdb, as the time fields were not
managed correctly.
this mean you need to rebuild your passdb.tdb file.
(This used to be commit 57b8d3bb84e261e55febdde88e45684455f0a294)
2001-08-31 01:29:53 +00:00
Jeremy Allison
996719cce2 Added "use mmap" for HPUX.
Jeremy.
(This used to be commit 840802f10677cb0009cb4df4c37c7d01aa5edacd)
2001-07-30 22:21:31 +00:00
Tim Potter
afa7300006 Changed instances of TRUE, FALSE to True, False as some compilers don't
have the first set of symbols.
(This used to be commit ad0cbfbd790bc5d6003ffcff2835d82fb0140625)
2001-07-12 22:27:00 +00:00
Andrew Tridgell
05fc3e578c use LDSHFLAGS not -shared in several places
(This used to be commit 8ec9c87b5d1a7dae17d5b1a30f58effaf5e69e4b)
2001-06-04 05:13:59 +00:00
Gerald Carter
fcc23d40dc update from Simo
(This used to be commit 9e4a6c227f719226cac6e00f1a6719651570e2c7)
2001-05-10 20:52:20 +00:00
Gerald Carter
30c4c04c2f Patch from Simo:
o sed 's/pdb_clear_sam/pdb_free_sam/g'
  o add pdb_reset_sam()
  o password changing should be ok now as well.
(This used to be commit 96d0e7c3301ad990f6c83b9c216720cb32661fb5)
2001-05-07 14:04:46 +00:00
Jean-François Micouleau
f35157f392 Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the
password changing. So don't cry ;-)

	J.F.
(This used to be commit a4a4c02b12f030a3b9e6225b999c90689dfc4719)
2001-05-04 15:44:27 +00:00
Gerald Carter
ba411ebf0c fixes from Simo
(This used to be commit 7703fbb30d9695b5a71ee0bcca9520bed4880bbd)
2001-05-04 14:01:33 +00:00
Jeremy Allison
98560fa394 HEAD specific slprintf paranoia fixes.
Jeremy.
(This used to be commit 61723c18f96a7b38cab0fcf545da7fb3640c5f7b)
2001-04-08 20:31:39 +00:00
Jeremy Allison
a2e5dbb112 Remove "BYTE" - we already have uint8 - don't need more conflicts with
system header files...
Jeremy.
(This used to be commit 31e0ce310ec38b3a3a05b344d6450d442c6be471)
2001-03-11 00:51:54 +00:00
Gerald Carter
d21325dbd9 more fixes from Simo. Also fixed the password expiration field
in the tdbsam to never expire (we don't support this yet).




jerry
(This used to be commit 3b7d0fe7eb3a9275d2713d7b3325de0ab510ea62)
2000-12-12 16:50:23 +00:00
Gerald Carter
f449a59136 group rid assignment cut and paste error
--jerry
(This used to be commit bb48b02d5f2118470a415d5f1f92305688e6b432)
2000-12-09 20:45:04 +00:00
Gerald Carter
c09b1d19f8 updates to the tdbsam implementation.
--jerry
(This used to be commit 29b3ac8634769d01c20bf394eecc536a02e0f36c)
2000-12-06 18:22:29 +00:00
Gerald Carter
0dcbafe2b9 Another large patch for the passdb rewrite.
o added BOOL own_memory flag in SAM_ACCOUNT so we could
    use static memory for string pointer assignment or
    allocate a new string

  o added a reference TDB passdb backend.  This is only a reference
    and should not be used in production because
	- RID's are generated using the same algorithm as with smbpasswd
 	- a TDB can only have one key (w/o getting into problems) and we
	  need three.  Therefore the pdb_sam-getpwuid() and
	  pdb_getsampwrid() functions are interative searches :-(

    we need transaction support, multiple indexes, and a nice open
    source DBM.  The Berkeley DB (from sleepycat.com seems to fit
    this criteria now)

  o added a new parameter "private dir" as many places in the code were
    using lp_smb_passwd_file() and chopping off the filename part.
    This makes more sense to me and I will docuement it in the man pages

  o Ran through Insure-lite and corrected memory leaks.  Need for
    a public flogging this time Jeremy (-:



-- jerry
(This used to be commit 4792029a2991bd84251d152a62b1033dec62cee2)
2000-11-21 05:55:16 +00:00
Gerald Carter
9fede0dc0d Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)

The following functions implement the storage manipulation interface

/*The following definitions come from  passdb/pdb_smbpasswd.c  */

BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);

There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members.  Note that the struct
passdb_ops {} has gone away.  Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file.  All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.

I'll write some documentation for this later.  The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.

What works and may not:

	o domain logons from Win9x 	works
	o domain logons from WinNT 4	works
	o user and group enumeration
		as implemented by Tim	works
	o file and print access		works
	o changing password from
		Win9x & NT		ummm...i'll fix this tonight :)

If I broke anything else, just yell and I'll fix it.  I think it
should be fairly quite.





-- jerry
(This used to be commit 0b92d0838ebdbe24f34f17e313ecbf61a0301389)
2000-11-13 23:03:34 +00:00