summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-15 01:14:58 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-15 01:14:58 +0000
commit90558370ab9019c425019083a6dcb129a808a5ed (patch)
treea8e22132dd0ca947000c46afb970c58d63c48ad6 /source3/passdb
parentdbee612f7150ee2921c37fa331b38b86d2d63937 (diff)
downloadsamba-90558370ab9019c425019083a6dcb129a808a5ed.tar.gz
samba-90558370ab9019c425019083a6dcb129a808a5ed.tar.bz2
samba-90558370ab9019c425019083a6dcb129a808a5ed.zip
Commit the auth associated changes I missed from the last commit.
Also set the default value of all the allocated strings to "" to avoid changing the interface (becouse pdb_get...() would point to a null string, rather than a null pointer and parts of samba rely on that). Andrew Bartlett (This used to be commit 5b4079f748e25f21162e21b439063249baf8dca6)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c15
-rw-r--r--source3/passdb/pdb_get_set.c1
2 files changed, 16 insertions, 0 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 39a8fb3676..92447b3766 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -80,6 +80,21 @@ static void pdb_fill_default_sam(SAM_ACCOUNT *user)
memset(user->private.hours, 0xff, user->private.hours_len); /* available at all hours */
user->private.unknown_5 = 0x00000000; /* don't know */
user->private.unknown_6 = 0x000004ec; /* don't know */
+
+ /* Some parts of samba strlen their pdb_get...() returns,
+ so this keeps the interface unchanged for now. */
+
+ user->private.username = "";
+ user->private.domain = "";
+ user->private.nt_username = "";
+ user->private.full_name = "";
+ user->private.home_dir = "";
+ user->private.logon_script = "";
+ user->private.profile_path = "";
+ user->private.acct_desc = "";
+ user->private.workstations = "";
+ user->private.unknown_str = "";
+ user->private.munged_dial = "";
}
static void destroy_pdb_talloc(SAM_ACCOUNT **user)
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 0dd0f21c37..db7ab11bb7 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -28,6 +28,7 @@
* @todo Redefine this to NULL, but this changes the API becouse
* much of samba assumes that the pdb_get...() funtions
* return pstrings. (ie not null-pointers).
+ * See also pdb_fill_default_sam().
*/
#define PDB_NOT_QUITE_NULL ""