ira/wip.git
22 years agothe next step in the intl changeover. This should get us compiling agian,
Andrew Tridgell [Sun, 14 Oct 2001 12:10:29 +0000 (12:10 +0000)]
the next step in the intl changeover. This should get us compiling agian,
and also completes the switch to lang_tdb.c. SWAT should now work
with a po file in the lib/ directory

also removed useless SYSLOG defines in many files

22 years agobit neater talloc_asprintf() implementation
Andrew Tridgell [Sun, 14 Oct 2001 09:32:14 +0000 (09:32 +0000)]
bit neater talloc_asprintf() implementation

22 years agominor Realloc() fix - pedantic
Andrew Tridgell [Sun, 14 Oct 2001 09:25:19 +0000 (09:25 +0000)]
minor Realloc() fix - pedantic

22 years agoSome reformatting.
Tim Potter [Sun, 14 Oct 2001 08:31:54 +0000 (08:31 +0000)]
Some reformatting.

22 years agoPass domain structure around in cache code rather than the domain name.
Tim Potter [Sun, 14 Oct 2001 08:30:30 +0000 (08:30 +0000)]
Pass domain structure around in cache code rather than the domain name.

22 years agoResurrected sam sequence number code.
Tim Potter [Sun, 14 Oct 2001 08:26:45 +0000 (08:26 +0000)]
Resurrected sam sequence number code.

Pass domain structure around in cache code rather than the domain name.

Some misc reformatting to make things look prettier.

22 years agofixed NTLMSSP with XP servers (who don't send the duplicate challenge
Andrew Tridgell [Sun, 14 Oct 2001 06:14:11 +0000 (06:14 +0000)]
fixed NTLMSSP with XP servers (who don't send the duplicate challenge
in the asn1 spnego structures)

22 years agofixed two bugs in the NTLMSSP code
Andrew Tridgell [Sun, 14 Oct 2001 05:42:28 +0000 (05:42 +0000)]
fixed two bugs in the NTLMSSP code
 - handle servers that don't send a kerberos principle (non-member servers)
 - enable spnego without KRB5

22 years agointroduce mangle backward compatibility functions
Simo Sorce [Sat, 13 Oct 2001 12:47:59 +0000 (12:47 +0000)]
introduce mangle backward compatibility functions
add talloc_asprintf()

22 years agoMade nt acl support a local parameter for w2ksp2 profile fix.
Jeremy Allison [Fri, 12 Oct 2001 22:00:38 +0000 (22:00 +0000)]
Made nt acl support a local parameter for w2ksp2 profile fix.
Jeremy.

22 years agoConverted a few winbind functions to use a talloc context that is destroyed
Tim Potter [Fri, 12 Oct 2001 08:28:08 +0000 (08:28 +0000)]
Converted a few winbind functions to use a talloc context that is destroyed
immediately after the call.

22 years agofixed compiler warning.
Tim Potter [Fri, 12 Oct 2001 06:09:39 +0000 (06:09 +0000)]
fixed compiler warning.

22 years agoThis file is really old and not used anymore.
Tim Potter [Fri, 12 Oct 2001 06:03:17 +0000 (06:03 +0000)]
This file is really old and not used anymore.

22 years agoMoved from include subdir.
Tim Potter [Fri, 12 Oct 2001 05:59:41 +0000 (05:59 +0000)]
Moved from include subdir.

22 years agoMoved to rpcclient subdirectory.
Tim Potter [Fri, 12 Oct 2001 05:57:35 +0000 (05:57 +0000)]
Moved to rpcclient subdirectory.

22 years agoSome old stuff hanging around since the CIFS conference. Big cleanup of
Tim Potter [Fri, 12 Oct 2001 05:56:23 +0000 (05:56 +0000)]
Some old stuff hanging around since the CIFS conference.  Big cleanup of
rpcclient code.  Refactored cmd_* functions to move common mem_ctx and pipe
opening stuff up one level.  Moved rpcclient.h into rpcclient directory and
out of includes/smb.h

22 years agomoved some OIDs to the ASN.1 header
Andrew Tridgell [Fri, 12 Oct 2001 04:54:53 +0000 (04:54 +0000)]
moved some OIDs to the ASN.1 header

22 years agoadded NTLMSSP authentication to libsmb. It seems to work well so I have enabled it...
Andrew Tridgell [Fri, 12 Oct 2001 04:49:42 +0000 (04:49 +0000)]
added NTLMSSP authentication to libsmb. It seems to work well so I have enabled it by default if the server supports it. Let me know if this breaks anything. Choose kerberos with the -k flag to smbclient, otherwise it will use SPNEGO/NTLMSSP/NTLM

22 years agoRemoved some unused code from the recent cleanup.
Tim Potter [Fri, 12 Oct 2001 03:56:13 +0000 (03:56 +0000)]
Removed some unused code from the recent cleanup.

22 years agoFix for tdb_oob() on TDB_INTERNAL databases.
Jeremy Allison [Fri, 12 Oct 2001 00:01:35 +0000 (00:01 +0000)]
Fix for tdb_oob() on TDB_INTERNAL databases.
Jeremy.

22 years agomerge from 2.2
Gerald Carter [Thu, 11 Oct 2001 16:44:17 +0000 (16:44 +0000)]
merge from 2.2

22 years agoimprove the error handling in the ASN1 code a bit
Andrew Tridgell [Thu, 11 Oct 2001 13:49:08 +0000 (13:49 +0000)]
improve the error handling in the ASN1 code a bit

22 years agoadded a ASN.1 parser, so now I can properly parse the negTokenInit
Andrew Tridgell [Thu, 11 Oct 2001 13:13:06 +0000 (13:13 +0000)]
added a ASN.1 parser, so now I can properly parse the negTokenInit
packet which means I can extract the service and realm, so we should
now work with realms other than the local realm.

it also means we now check the list of OIDs given by the server just
in case it says that it doesn't support kerberos. In that case we
should fall back to NTLMSSP but that isn't written yet.

22 years agoremove unused function in mangle.c
Simo Sorce [Thu, 11 Oct 2001 12:33:26 +0000 (12:33 +0000)]
remove unused function in mangle.c
fix some alloc leaks spotted by andreas moroder.

22 years agofixed some memory leaks, started adding asn1 decoder for server side
Andrew Tridgell [Thu, 11 Oct 2001 10:29:17 +0000 (10:29 +0000)]
fixed some memory leaks, started adding asn1 decoder for server side

22 years agofirst step in converting the head branch to use lang_tdb.c instead
Andrew Tridgell [Thu, 11 Oct 2001 08:40:42 +0000 (08:40 +0000)]
first step in converting the head branch to use lang_tdb.c instead
of gettext for internationalisation support. There is more to do

22 years agoprofile.h is now known as smbprofile.h due to a conflict with badly
Andrew Tridgell [Thu, 11 Oct 2001 07:45:45 +0000 (07:45 +0000)]
profile.h is now known as smbprofile.h due to a conflict with badly
written MIT kerberos5 header files :(

22 years agoinitial kerberos/ADS/SPNEGO support in libsmb and smbclient. To
Andrew Tridgell [Thu, 11 Oct 2001 07:42:52 +0000 (07:42 +0000)]
initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To
activate you need to:

- install krb5 libraries
- run configure
- build smbclient
- run kinit to get a TGT
- run smbclient with the -k option to choose kerberos auth

22 years agoFixed bug when status=no and max smbd processes > 0.
Jeremy Allison [Thu, 11 Oct 2001 05:53:15 +0000 (05:53 +0000)]
Fixed bug when status=no and max smbd processes > 0.
Jeremy.

22 years agoMerge from 2.2
Tim Potter [Wed, 10 Oct 2001 23:38:53 +0000 (23:38 +0000)]
Merge from 2.2

22 years agoGot the rest of the group functions working. Did some reformatting (man
Tim Potter [Wed, 10 Oct 2001 23:08:13 +0000 (23:08 +0000)]
Got the rest of the group functions working.  Did some reformatting (man
what was I thinking with those 4 character tabs?)

We now pass our winbindd test suite again!

Still to do:

 - talloc_ctx on a per winbindd request basis not per connection
 - clean up old crap we don't use any more
 - test against multiple BDCs (I know this isn't going to work - group/user
   handles have to be made against the same DC the domain and basic handles
   are.
 - implement network and dc failure recovery

22 years agoBack-out the share acl fix. Not needed (Gerald has been telling porkies
Jeremy Allison [Wed, 10 Oct 2001 19:36:53 +0000 (19:36 +0000)]
Back-out the share acl fix. Not needed (Gerald has been telling porkies
again :-) :-).
Jeremy.

22 years agomega-merge from 2.2
Gerald Carter [Wed, 10 Oct 2001 17:19:10 +0000 (17:19 +0000)]
mega-merge from 2.2

22 years agomerge from 2.2
Gerald Carter [Wed, 10 Oct 2001 17:04:23 +0000 (17:04 +0000)]
merge from 2.2

22 years agoops, remove my test code, sorry.
Simo Sorce [Wed, 10 Oct 2001 07:51:20 +0000 (07:51 +0000)]
ops, remove my test code, sorry.
fix some return codes missed in previous commit.

22 years agoFixed some compile warnings.
Tim Potter [Wed, 10 Oct 2001 01:01:15 +0000 (01:01 +0000)]
Fixed some compile warnings.

22 years agoImplemented sam group handle stuff. getent group now works.
Tim Potter [Tue, 9 Oct 2001 22:55:00 +0000 (22:55 +0000)]
Implemented sam group handle stuff.  getent group now works.

22 years agoFix bug where removing root from a share SD stops further edit access.
Jeremy Allison [Tue, 9 Oct 2001 21:22:33 +0000 (21:22 +0000)]
Fix bug where removing root from a share SD stops further edit access.
Jeremy.

22 years agoFixes from John Trostel (modified somewhat by me) to ensure that all lookup_XX
Jeremy Allison [Tue, 9 Oct 2001 20:54:56 +0000 (20:54 +0000)]
Fixes from John Trostel (modified somewhat by me) to ensure that all lookup_XX
functions correctly deal with the SID_NAME_TYPE. One fix for connection user
lookup in LSA.
Jeremy.

22 years agoold fixes I forgot to commit
Simo Sorce [Tue, 9 Oct 2001 19:12:48 +0000 (19:12 +0000)]
old fixes I forgot to commit

22 years agoinitial support to error report in smbclient, useful when using smbclient -c in scripts.
Simo Sorce [Tue, 9 Oct 2001 19:12:18 +0000 (19:12 +0000)]
initial support to error report in smbclient, useful when using smbclient -c in scripts.
Thanks to Claudio Cicali aka FleXer for the initial patch

22 years agoFixed WINS re-registration bug. Don't ask..... :-(. It was in my code :-).
Jeremy Allison [Mon, 8 Oct 2001 19:39:07 +0000 (19:39 +0000)]
Fixed WINS re-registration bug. Don't ask..... :-(. It was in my code :-).
Jeremy.

22 years agotim suggested to add a copyright note :)
Simo Sorce [Mon, 8 Oct 2001 11:58:25 +0000 (11:58 +0000)]
tim suggested to add a copyright note :)

22 years agoMore work on winbindd connection rewrite:
Tim Potter [Mon, 8 Oct 2001 00:34:14 +0000 (00:34 +0000)]
More work on winbindd connection rewrite:

 - implemented some of the sam related connection manager routines
 - fill in group id and gecos fields for getpwnam/getpwuid routines
 - convert querydispinfo to cm
 - getent passwd now works

Now for the group related routines...

22 years agomore fixing and testing.
Simo Sorce [Sun, 7 Oct 2001 14:53:40 +0000 (14:53 +0000)]
more fixing and testing.
added ucs2_to_dos83 function.
the code should be ok now.
further test with japanese and other languages is needed at this point.

22 years agofixed lame valid table
Andrew Tridgell [Sun, 7 Oct 2001 14:51:54 +0000 (14:51 +0000)]
fixed lame valid table

22 years agomerge from 2.2
Gerald Carter [Sat, 6 Oct 2001 18:03:25 +0000 (18:03 +0000)]
merge from 2.2

22 years agoPPC spinlocks work again. Sorry, my bad.
Anton Blanchard [Sat, 6 Oct 2001 10:36:15 +0000 (10:36 +0000)]
PPC spinlocks work again. Sorry, my bad.

22 years agoFix up indenting in out SAM password check code.
Andrew Bartlett [Sat, 6 Oct 2001 01:51:57 +0000 (01:51 +0000)]
Fix up indenting in out SAM password check code.

22 years agomove libsmb/domain_client_validate.o around in the makefile again, it really is
Andrew Bartlett [Sat, 6 Oct 2001 01:42:20 +0000 (01:42 +0000)]
move libsmb/domain_client_validate.o around in the makefile again, it really is
an authenticaion object that happens to also be used by winbind.  We need to
fix this up at some stage.

In the end it will probably be best if winbind does the login over its own
internally managed connections, not a new one per authenticiaon.  Then this
would no longer be an issue, as it could call cli_nt_login_network() directly.

Andrew Bartlett

22 years agoThis is the start of a bit of a rewrite of winbindd's connection handling.
Tim Potter [Fri, 5 Oct 2001 00:20:06 +0000 (00:20 +0000)]
This is the start of a bit of a rewrite of winbindd's connection handling.
I've wrapped up all the decisions about managing, making and closing
connections into a connection manager in nsswitch/winbindd_cm.c.

It's rather incomplete at the moment - only querying basic user info works
at the moment (i.e finger -m DOMAIN/user) and everything else is broken.

Jeremy, please take a look and I'll start moving across the rest of
winbindd to this new system.

22 years agoAdd CLI_POLICY_HND as a valid return type.
Tim Potter [Fri, 5 Oct 2001 00:16:04 +0000 (00:16 +0000)]
Add CLI_POLICY_HND as a valid return type.

22 years agoRemove winbindd_glue.c dodgy hack and add winbindd_cm.c for managing
Tim Potter [Fri, 5 Oct 2001 00:08:24 +0000 (00:08 +0000)]
Remove winbindd_glue.c dodgy hack and add winbindd_cm.c for managing
connections within winbindd.

22 years agoMove CLI_POLICY_HND to be internal to winbindd.
Tim Potter [Fri, 5 Oct 2001 00:06:43 +0000 (00:06 +0000)]
Move CLI_POLICY_HND to be internal to winbindd.

22 years agoinit only in test code.
Simo Sorce [Thu, 4 Oct 2001 08:32:29 +0000 (08:32 +0000)]
init only in test code.
remove unused structure for tdb data.
fixes.

22 years agoAdded a comment about not changing the magic timestamp values without
Tim Potter [Wed, 3 Oct 2001 23:08:10 +0000 (23:08 +0000)]
Added a comment about not changing the magic timestamp values without
knowing what you are doing!

22 years agoEnsure accessing NT member servers works with a Samba PDC. Don't
Jeremy Allison [Wed, 3 Oct 2001 22:58:37 +0000 (22:58 +0000)]
Ensure accessing NT member servers works with a Samba PDC. Don't
change these timestamp settings without good reason.
Remove CLEAR_IF_FIRST flag is tdb is read-only.
Jeremy.

22 years agofix some possible memleaks and not tested reallocs spotted by Andreas Moroder
Simo Sorce [Wed, 3 Oct 2001 21:10:29 +0000 (21:10 +0000)]
fix some possible memleaks and not tested reallocs spotted by Andreas Moroder

22 years agofixed basic ucs2 operation on big endian boxes. Still a bit more to
Andrew Tridgell [Wed, 3 Oct 2001 14:55:45 +0000 (14:55 +0000)]
fixed basic ucs2 operation on big endian boxes. Still a bit more to
do, but at least you can connect now.

22 years agoset ACB_PWNOEXP by default on new accounts.
Andrew Tridgell [Wed, 3 Oct 2001 13:07:02 +0000 (13:07 +0000)]
set ACB_PWNOEXP by default on new accounts.

22 years agoremoved old unused files
Andrew Tridgell [Wed, 3 Oct 2001 13:05:59 +0000 (13:05 +0000)]
removed old unused files

22 years agoswitched over to a new method of handling uppercase/lowercase mappings
Andrew Tridgell [Wed, 3 Oct 2001 12:18:20 +0000 (12:18 +0000)]
switched over to a new method of handling uppercase/lowercase mappings
for unicode strings. The new method relies on 3 files that are mmap'd
at startup to provide the mapping tables. The upcase.dat and
lowcase.dat tables should be the same on all systems. The valid.dat
table says what characters are valid in 8.3 names, and differs between
systems. I'm committing the japanese valid.dat here, in future we need
some way of automatically installing and choosing a appropriate table.

This commit also adds my mini tdb based gettext replacement in
intl/lang_tdb.c. I have not enabled this yet and have not removed the
old gettext code as the new code is still being looked at by Monyo.

Right now the code assumes that the upcase.dat, lowcase.dat and
valid.dat files are installed in the Samba lib directory. That is not
a good choice, but I'll leave them there until we work out the new
install directory structure for Samba 3.0.

simo - please look at the isvalid_w() function and think about using
it in your new mangling code. That should be the final step to
correctly passing the chargen test code from monyo.

22 years agoFixup insure changes for rpcclient.
Jeremy Allison [Wed, 3 Oct 2001 03:05:55 +0000 (03:05 +0000)]
Fixup insure changes for rpcclient.
Jeremy.

22 years agoIncorrect definition of debugf.
Jeremy Allison [Wed, 3 Oct 2001 01:45:51 +0000 (01:45 +0000)]
Incorrect definition of debugf.
Jeremy.

22 years agoFixed up the change password bug when not using PAM.
Jeremy Allison [Tue, 2 Oct 2001 21:58:09 +0000 (21:58 +0000)]
Fixed up the change password bug when not using PAM.
The problem is we were trying to use mask_match as a generic
wildcard matcher for UNIX strings (like the password prompts).
We can't do that - we need a unix_wild_match (re-added into lib/util.c)
as the ms_fnmatch semantics for empty strings are completely wrong.
This caused partial reads to be accepted as correct passwd change
responses when they were not....
Also added paranioa test to stop passwd change being done as root
with no %u in the passwd program string.
Jeremy.

22 years agobetter method of generating the case equivalence table
Andrew Tridgell [Tue, 2 Oct 2001 13:26:38 +0000 (13:26 +0000)]
better method of generating the case equivalence table

interestingly, this shows that w2kp-jp and w2kp have the *same* case
equivalence table, but it is not the same as the Samba one.

22 years agoFixed the bug with member servers in a Samba PDC hosted domain not allowing
Jeremy Allison [Tue, 2 Oct 2001 06:57:18 +0000 (06:57 +0000)]
Fixed the bug with member servers in a Samba PDC hosted domain not allowing
other access. Problem was max time was being set to 0xffffffff, instead of
0x7fffffff.
Jeremy.

22 years agothe CASETABLE torture target now generates the complete unicode
Andrew Tridgell [Tue, 2 Oct 2001 05:52:11 +0000 (05:52 +0000)]
the CASETABLE torture target now generates the complete unicode
equivalence table for a server. This was inspired by the chargen win32
code from monyo.

This takes a *long* time to run against a Samba server due to the case
insensitive comparisons in the filesystem. That makes it a N^2
operation, and N is 64k. It is linear on NT.

22 years agoRemoved 'extern int DEBUGLEVEL' as it is now in the smb.h header.
Tim Potter [Tue, 2 Oct 2001 04:29:50 +0000 (04:29 +0000)]
Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.

22 years agoAdded copyright (not sure who owns it though) and #include guards.
Tim Potter [Tue, 2 Oct 2001 03:46:12 +0000 (03:46 +0000)]
Added copyright (not sure who owns it though) and #include guards.

22 years agoAdded copyright and include guards.
Tim Potter [Tue, 2 Oct 2001 03:43:26 +0000 (03:43 +0000)]
Added copyright and include guards.

22 years agohonor the ACB_PWNOEXP flag in smbpasswd
Andrew Tridgell [Mon, 1 Oct 2001 13:07:46 +0000 (13:07 +0000)]
honor the ACB_PWNOEXP flag in smbpasswd

22 years ago- fix handling of 0 last_change_time and must_change_time
Andrew Tridgell [Mon, 1 Oct 2001 10:54:11 +0000 (10:54 +0000)]
- fix handling of 0 last_change_time and must_change_time
- move the arbitrary 21 day timeout to local.h

22 years agoDon't try to write the LM password in the NT password feild.
Andrew Bartlett [Sun, 30 Sep 2001 14:51:38 +0000 (14:51 +0000)]
Don't try to write the LM password in the NT password feild.

22 years agomake strupper() and strlower() not modify the string if it doesn't
Andrew Tridgell [Sun, 30 Sep 2001 13:30:52 +0000 (13:30 +0000)]
make strupper() and strlower() not modify the string if it doesn't
need modifying

that makes constant strings OK

22 years agoI told Jeremy at the CIFS conference that I would sort the command list
Christopher R. Hertel [Sun, 30 Sep 2001 06:49:44 +0000 (06:49 +0000)]
I told Jeremy at the CIFS conference that I would sort the command list
in smbclient.  Done.  I had a little trouble because the "!" command is
a special case and must be listed last.  Awkward.

Chris -)-----

22 years agoSmall changes to register_vuid ahead of a larger restructure.
Andrew Bartlett [Sun, 30 Sep 2001 04:28:43 +0000 (04:28 +0000)]
Small changes to register_vuid ahead of a larger restructure.

22 years agoMake header comment clearer, these are RIDs, not UIDs.
Andrew Bartlett [Sun, 30 Sep 2001 02:51:45 +0000 (02:51 +0000)]
Make header comment clearer, these are RIDs, not UIDs.

22 years agoFinally kill off the SMBENCRYPT() macro.
Andrew Bartlett [Sun, 30 Sep 2001 01:39:47 +0000 (01:39 +0000)]
Finally kill off the SMBENCRYPT() macro.

22 years agomerge from 2.2
Gerald Carter [Sun, 30 Sep 2001 01:33:02 +0000 (01:33 +0000)]
merge from 2.2

22 years agofixed in *BSD
Motonobu Takahashi [Sat, 29 Sep 2001 20:07:26 +0000 (20:07 +0000)]
fixed in *BSD

22 years agofixed not to install in *BSD, but perhaps on Solaris, cannot install
Motonobu Takahashi [Sat, 29 Sep 2001 20:06:35 +0000 (20:06 +0000)]
fixed not to install in *BSD, but perhaps on Solaris, cannot install

22 years agoundef the code for now
Simo Sorce [Sat, 29 Sep 2001 16:20:15 +0000 (16:20 +0000)]
undef the code for now

22 years agofurther devel and test kit.
Simo Sorce [Sat, 29 Sep 2001 16:16:38 +0000 (16:16 +0000)]
further devel and test kit.
first tests show it still does not work.
work in progress...

22 years agonot to creat gmo files from po files during making
Motonobu Takahashi [Sat, 29 Sep 2001 16:07:01 +0000 (16:07 +0000)]
not to creat gmo files from po files during making
this is because some platforms such as HP-UX do not have any msgfmt
command.

if someone updates po file,
then he has to update gmo files manually and commit.

22 years agoThis is the passdb section of the previously mentioned commit.
Andrew Bartlett [Sat, 29 Sep 2001 13:14:19 +0000 (13:14 +0000)]
This is the passdb section of the previously mentioned commit.

Of particular note is the change to pdb_free_sam() to take its sam argument by
reference, allowing it to be NULLified by the SAFE_FREE() macro, and the
changed to local_password_change() both to make it work and to remove the
duplicate code that caused so much breakage over the last few days.

 - Small change in behaviour:  when LOCAL_ADD_USER is set, the user doesn't
actually exist locally but does exist in the passdb we don't attempt to do a
GetPwnam().  (How the entry got there is another matter, and most passdbs won't
allow this anyway).

Andrew Bartlett

22 years agoFix up a number of intertwined issues:
Andrew Bartlett [Sat, 29 Sep 2001 13:08:26 +0000 (13:08 +0000)]
Fix up a number of intertwined issues:

The big one is a global change to allow us to NULLify the free'ed pointer to a
former passdb object.  This was done to allow idra's SAFE_FREE() macro to do
its magic, and to satisfy the input test in pdb_init_sam() for a NULL pointer
to start with.

This NULL pointer test was what was breaking the adding of accounts up until
now, and this code has been reworked to avoid duplicating work - I hope this
will avoid a similar mess-up in future.

Finally, I fixed a few nasty bugs where the pdb_ fuctions's return codes were
being ignored.  Some of these functions malloc() and are permitted to fail.
Also, this caught a nasty bug where pdb_set_lanman_password(sam, NULL) acheived
precisely didilly-squat, just returning False.  Now that we check the returns
this bug was spotted.  This could allow different LM and NT passwords.

 - the pdbedit code needs to start checking these too, but I havn't had a
chance to fix it.

I have also fixed up where some of the password changing code was using the
pdb_set functions to store *internal* data.  I assume this is from a previous
lot of mass conversion work...

Most likally (and going on past experience) I have missed somthing, probably in
the LanMan password change code which I havn't yet been able to test, but this
lot is in much better shape than it was before.

If all this is too much to swallow (particularly for 2.2.2) then just adding a
sam_pass = NULL to the particular line of passdb.c should do the trick for the
ovbious bug.

Andrew Bartlett

22 years agoreturn NT_STATUS_NO_MEMORY istead of NT_STATUS_OK if we are out of memory.
Simo Sorce [Sat, 29 Sep 2001 12:26:40 +0000 (12:26 +0000)]
return NT_STATUS_NO_MEMORY istead of NT_STATUS_OK if we are out of memory.

22 years agoAdd a few const statements to various odd bits of the tree. (Fixes some
Andrew Bartlett [Sat, 29 Sep 2001 11:51:40 +0000 (11:51 +0000)]
Add a few const statements to various odd bits of the tree.  (Fixes some
warnings)

22 years agoDon't build make_printerdef in HEAD. This tool is not needed except
Gerald Carter [Sat, 29 Sep 2001 04:04:35 +0000 (04:04 +0000)]
Don't build make_printerdef in HEAD.  This tool is not needed except
to support 2.0.x style WIn9x driver download.

22 years agoFixed CUPS detection - patch from Michael Sweet.
Jeremy Allison [Fri, 28 Sep 2001 18:07:11 +0000 (18:07 +0000)]
Fixed CUPS detection - patch from Michael Sweet.
Jeremy.

22 years agoHow the heck I missed this I don't know, but somehow I got a copy-and-paste
Andrew Bartlett [Fri, 28 Sep 2001 04:48:36 +0000 (04:48 +0000)]
How the heck I missed this I don't know, but somehow I got a copy-and-paste
error in here...

Now you can change local passwords again.  There is stil somthing broken about
remote (via windows/sampasswd) password changing.

I shall have to revise my testing, I honestly don't know how this slipped
through the net.

MERGE for 2.2.2.

Sorry,
Andrew Bartlett

22 years agoRemoved smbpasswd_XX call (how did this get re-added, I removed all
Jeremy Allison [Thu, 27 Sep 2001 21:27:12 +0000 (21:27 +0000)]
Removed smbpasswd_XX call (how did this get re-added,  I removed all
these yesterday ?).
Jeremy.

22 years agoSync 2.2.2 and HEAD (I will keep these the same if it kills me :-).
Jeremy Allison [Thu, 27 Sep 2001 21:20:14 +0000 (21:20 +0000)]
Sync 2.2.2 and HEAD (I will keep these the same if it kills me :-).
Jeremy.

22 years agoMerge HEAD and 2.2 - try frantically to keep in sync.
Jeremy Allison [Thu, 27 Sep 2001 20:40:47 +0000 (20:40 +0000)]
Merge HEAD and 2.2 - try frantically to keep in sync.
Jeremy.

22 years agoHow often did I read the CVS commit message
Volker Lendecke [Thu, 27 Sep 2001 16:28:50 +0000 (16:28 +0000)]
How often did I read the CVS commit message
"Always compile before commit" :-((

Volker

22 years agoget out unicode_from_buffer and buffer_from_unicode, unneeded.
Simo Sorce [Thu, 27 Sep 2001 12:41:38 +0000 (12:41 +0000)]
get out unicode_from_buffer and buffer_from_unicode, unneeded.
store mangled filename in dos charset and unmangled in unicode.
clean ups
still lot to do.
againg compiled but not yet tested.

22 years agoMajor update to pdbedit's import and export code, in line with reqests for it
Andrew Bartlett [Thu, 27 Sep 2001 09:36:38 +0000 (09:36 +0000)]
Major update to pdbedit's import and export code, in line with reqests for it
to use the pdb_ formatting functions.

Similarly, it now uses pdb_set...() rather than accessing passdb members
directly.

Andrew Bartlett

22 years agoKill unused variables
Andrew Bartlett [Thu, 27 Sep 2001 09:18:13 +0000 (09:18 +0000)]
Kill unused variables

22 years agoFix memory leak in get_sampwd_entries(), reindent for clarity.
Andrew Bartlett [Thu, 27 Sep 2001 09:13:26 +0000 (09:13 +0000)]
Fix memory leak in get_sampwd_entries(), reindent for clarity.
 - call pdb_reset_sam() after each getent call.

Fix bug in get_group_alias_entries(), were if num_entries was zero this caused
talloc() to return NULL, failing a test below with NT_STATUS_NO_MEMORY.

Fix pdb_reset_sam() to correctly initalise the sam structure.

Move default value code into a single place, likewise for sam freeing code.
 - should make things easier if we decide to malloc other strings, or get more
 non-zero default values.

Finally, add a function in init a sam struct from a getpwnam() return.

Andrew Bartlett