nivanova/samba-autobuild/.git
18 years agoDon't put a \n on the end of the arg to exit_server()
Tim Potter [Mon, 5 Nov 2001 00:02:38 +0000 (00:02 +0000)]
Don't put a \n on the end of the arg to exit_server()
(This used to be commit dfb8566220c3e90ca2b757ea124f53aed103269e)

18 years agoAdded missing strchr_wa.
Jeremy Allison [Sun, 4 Nov 2001 21:10:17 +0000 (21:10 +0000)]
Added missing strchr_wa.
Jeremy.
(This used to be commit 16c5d279b97250ceb84ee6de6e5e801350c816c4)

18 years agoFix for broken-as-shipped RedHat 7.2 system headers. Now we have
Jeremy Allison [Sun, 4 Nov 2001 20:50:30 +0000 (20:50 +0000)]
Fix for broken-as-shipped RedHat 7.2 system headers. Now we have
to detect this in configure.
Jeremy.
(This used to be commit 44fb1992c98e7cca5663b17ea9a4833fcf0a8478)

18 years agoa big one:
Simo Sorce [Sun, 4 Nov 2001 18:26:53 +0000 (18:26 +0000)]
a big one:
 - old mangle code has gone, the new one based on tdb seem resonably ok
   probably the valid.dat table need to be updated to treat wild chars as
   invalid ones (work ok without it)
 - a LOT of new string manipulation function for unicode, they are somewhat
   tested but a review would not be bad
 - some new function I will need for the new unix_convert function I'm writing,
   this will be renamed filename_convert and use only unicode strings.
 - charconv, I attached a comment, if someone wnat to look if I'm right or
   just was hacking to late in the night to make a sane one :)

of course any bug is my responsibility an will be pleased to see patches if
you find any. :-)

Simo.
(This used to be commit ee19f7efb6ea9216fc91cf112ac1afa691983e9d)

18 years agoget the string lengths right in domain logons
Andrew Tridgell [Sun, 4 Nov 2001 18:13:33 +0000 (18:13 +0000)]
get the string lengths right in domain logons

Andrew, this fixes domain logons in head. Please look at the change,
as I think you may have misunderstood the max_str_len field (which is
badly named)
(This used to be commit fd3a657b440a61c0c146947bb62d2b83c1689b87)

18 years agoremove {} from default valid char list
Andrew Tridgell [Sun, 4 Nov 2001 18:10:31 +0000 (18:10 +0000)]
remove {} from default valid char list
(This used to be commit 5dd3c7b3fb8aac7fb3a256ae40c882fb8983537f)

18 years agoFix segfault. sup_tok might not always be with us.
Andrew Bartlett [Sun, 4 Nov 2001 04:58:17 +0000 (04:58 +0000)]
Fix segfault. sup_tok might not always be with us.
(This used to be commit 1f409a1f3fb0906f1ff985b96bb7a65f56253046)

18 years agoFix up authenticated pipes in line with vuser changes. This ensures that global
Andrew Bartlett [Sun, 4 Nov 2001 01:14:15 +0000 (01:14 +0000)]
Fix up authenticated pipes in line with vuser changes.  This ensures that global
groups obtained via a domain logon are respected in the attached NT_USER_TOKEN.

This functionality is only available in HEAD, becosue of the way authenticaion
has been abstracted.

Both vuid logins and authenticated pipes need to use the same code for this in
future.

Can sombody with the correct facilties check this please?\

Thanks,

Andrew Bartlett
(This used to be commit caae69fcd096f20aa4c6879b95ec2c275afea041)

18 years agoFixup for accounts without a local /etc/passwd entry.
Andrew Bartlett [Sun, 4 Nov 2001 01:10:21 +0000 (01:10 +0000)]
Fixup for accounts without a local /etc/passwd entry.
 - Now perfectly valid.
(This used to be commit be04aad90da341fb1b4ef472f2279aefab972258)

18 years agoFix up pdbedit so that it at least compiles without warnings.
Andrew Bartlett [Sun, 4 Nov 2001 01:09:04 +0000 (01:09 +0000)]
Fix up pdbedit so that it at least compiles without warnings.
 - Basic functionality intact
 - Now adds machine accounts without a uid.  (using the machine uid range to
   avoid conflict with real uid based accounts)
(This used to be commit 09d2e05d26f71b10ccabe4c6fa168a4923697bae)

18 years agoGot serious about const again.
Jeremy Allison [Sun, 4 Nov 2001 00:14:08 +0000 (00:14 +0000)]
Got serious about const again.
REMOVED BZERO CALLS YET AGAIN !!! Why do these keep creeping back in....
They are *NOT* POSIX. I'm also thinking of removing strncpy as I'm sure
it's not being used correctly....
Jeremy.
(This used to be commit b1930abb35dee74f858a3f7190276c418af2322b)

18 years agoAdded NT_USER_TOKEN into server_info to fix extra groups problem.
Jeremy Allison [Sat, 3 Nov 2001 23:34:24 +0000 (23:34 +0000)]
Added NT_USER_TOKEN into server_info to fix extra groups problem.
Got "medieval on our ass" about const warnings (as many as I could :-).
Jeremy.
(This used to be commit ee5e7ca547eff016818ba5c43b8ea0c9fa69b808)

18 years agoAdded many more defines in service category, user category and others
Steve French [Sat, 3 Nov 2001 21:13:42 +0000 (21:13 +0000)]
Added many more defines in service category, user category and others
(This used to be commit 3bfb828cf70489165b46281bf03ea7074d3ba07d)

18 years agoAdded support for UserListGroups, ServiceEnum
Steve French [Sat, 3 Nov 2001 21:12:44 +0000 (21:12 +0000)]
Added support for UserListGroups, ServiceEnum
(This used to be commit 4e882289b0e291bb57d48fc2b2120919632daa5f)

18 years agoAdding support for net password, net service, net user info, fixing net helps
Steve French [Sat, 3 Nov 2001 21:11:28 +0000 (21:11 +0000)]
Adding support for net password, net service, net user info, fixing net helps
(This used to be commit a1f3930637a6ccadd4dba90dcd713cf1e4b5a536)

18 years agoanonymous logins are guest logins, so mark them as such. (Otherwise they can
Andrew Bartlett [Sat, 3 Nov 2001 00:59:57 +0000 (00:59 +0000)]
anonymous logins are guest logins, so mark them as such. (Otherwise they can
browse non-guest shares).
(This used to be commit 7131fe3be4eb2c652f3afe2f3cd99d3f82e09654)

18 years agoMinor cleanups/fixes in the NTLMv2 code
Andrew Bartlett [Sat, 3 Nov 2001 00:20:31 +0000 (00:20 +0000)]
Minor cleanups/fixes in the NTLMv2 code
(This used to be commit 253790f6d71653b572c0174113b8559820de6bdd)

18 years agoMove the test for non-SPNEGO session setups when using SPNEGO, becouse its a
Andrew Bartlett [Sat, 3 Nov 2001 00:19:56 +0000 (00:19 +0000)]
Move the test for non-SPNEGO session setups when using SPNEGO, becouse its a
perfectly vailid behaviour for guest logins.
(This used to be commit 4db8d70ad74cdbd74c0578e66377fd0233195aaa)

18 years agoReturn 1 (rather than 0) on failure. This may well help get the build farm
Andrew Bartlett [Fri, 2 Nov 2001 11:31:49 +0000 (11:31 +0000)]
Return 1 (rather than 0) on failure.  This may well help get the build farm
back into order, becouse its the inverse tests that are 'failing' - they get
error 0 back and think that we just let sombody in without a password and the
like.

Andrew Bartlett
(This used to be commit 83c2d7977445b511989b449959141aeed4bcf0b7)

18 years agoVarious post AuthRewrite cleanups, fixups and tidyups.
Andrew Bartlett [Thu, 1 Nov 2001 05:02:41 +0000 (05:02 +0000)]
Various post AuthRewrite cleanups, fixups and tidyups.

Zero out some of the plaintext passwords for paranoia

Fix up some of the other passdb backends with the change to *uid_t rather than
uid_t.

Make some of the code in srv_netlog_nt.c clearer, is passing an array around,
so pass its lenght in is definition, not as a seperate paramater.

Use sizeof() rather than magic numbers, it makes things easier to read.

Cope with a PAM authenticated user who is not in /etc/passwd - currently by
saying NO_SUCH_USER, but this can change in future.

Andrew Bartlett
(This used to be commit 514c91b16baca639bb04638042bf9894d881172a)

18 years agozero the data, not a pointer to the data ...
Andrew Tridgell [Thu, 1 Nov 2001 03:54:52 +0000 (03:54 +0000)]
zero the data, not a pointer to the data ...
(This used to be commit eeaa80aa09736dc1c5f5f72a1437eb9d9c0d4ae7)

18 years agoRemoved unneeded extern.
Tim Potter [Wed, 31 Oct 2001 12:45:50 +0000 (12:45 +0000)]
Removed unneeded extern.
(This used to be commit c80641b6f335aa706a2e384b7cfe7912be4a41b1)

18 years agoThis should fix up the compile with krb5.
Andrew Bartlett [Wed, 31 Oct 2001 12:37:56 +0000 (12:37 +0000)]
This should fix up the compile with krb5.

This needs to use the auth interface at some stage, but for now this will do.
(This used to be commit 8dc4f2e44b150cdcdecd2f6028bf06907ff90cad)

18 years agoWhen you make a data_blob() then you probably need to free it too...
Andrew Bartlett [Wed, 31 Oct 2001 12:28:40 +0000 (12:28 +0000)]
When you make a data_blob() then you probably need to free it too...
(This used to be commit 531e24973227ca4f1ae65ffb2454aedd5871de96)

18 years agoFix up domain logons. Tested with NT4.
Andrew Bartlett [Wed, 31 Oct 2001 12:07:59 +0000 (12:07 +0000)]
Fix up domain logons.  Tested with NT4.
(This used to be commit c8b2718adfe114b74a155116c5e74f014d6df887)

18 years ago... and clean up the unused variables.
Andrew Bartlett [Wed, 31 Oct 2001 11:10:29 +0000 (11:10 +0000)]
... and clean up the unused variables.
(This used to be commit e0b56a31480906b39f37761eed20d3cad0d53973)

18 years agoSmall changes for guest authenticated pipes.
Andrew Bartlett [Wed, 31 Oct 2001 11:09:21 +0000 (11:09 +0000)]
Small changes for guest authenticated pipes.
(This used to be commit 813bf962ae6f29ddcaee4bc8b67d8017f04172b1)

18 years agoThis is a farily large patch (3300 lines) and reworks most of the AuthRewrite
Andrew Bartlett [Wed, 31 Oct 2001 10:46:25 +0000 (10:46 +0000)]
This is a farily large patch (3300 lines) and reworks most of the AuthRewrite
code.

In particular this assists tpot in some of his work, becouse it provides the
connection between the authenticaion and the vuid generation.

Major Changes:
- Fully malloc'ed structures.
  - Massive rework of the code so that all structures are made and destroyed
    using malloc and free, rather than hanging around on the stack.
- SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them
   to be declared 'invalid' without the chance that people might get ROOT by
   default.

- kill off some of the "DOMAIN\user" lookups.  These can be readded at a more
  appropriate place (probably domain_client_validate.c) in the future. They
  don't belong in session setups.

- Massive introduction of DATA_BLOB structures, particularly for passwords.

- Use NTLMSSP flags to tell the backend what its getting, rather than magic
  lenghths.

- Fix winbind back up again, but tpot is redoing this soon anyway.

- Abstract much of the work in srv_netlog_nt back into auth helper functions.

This is a LARGE change, and any assistance is testing it is appriciated.

Domain logons are still broken (as far as I can tell) but other functionality
seems
intact.

Needs testing with a wide variety of MS clients.

Andrew Bartlett
(This used to be commit f70fb819b2f57bd57232b51808345e2319d52f6c)

18 years agoMore const.
Andrew Bartlett [Wed, 31 Oct 2001 06:57:28 +0000 (06:57 +0000)]
More const.
(This used to be commit ceba373aa30e09be948bd0980040cba204d12084)

18 years agoSPNEGO works perfectly well with security=domain, so don't exclude it.
Andrew Bartlett [Wed, 31 Oct 2001 06:24:25 +0000 (06:24 +0000)]
SPNEGO works perfectly well with security=domain, so don't exclude it.
(This used to be commit 26a9479ad450a5135e54b45d659bf3558892d9e6)

18 years agoSmall 'const' updates ahead of some AuthRewrite merging.
Andrew Bartlett [Wed, 31 Oct 2001 06:22:19 +0000 (06:22 +0000)]
Small 'const' updates ahead of some AuthRewrite merging.
(This used to be commit 3b5e72bda3263c6bdf81dfface4fae4f06b71032)

18 years agoAdded some extra fields to the auth_serversupplied_info structure.
Tim Potter [Wed, 31 Oct 2001 06:20:58 +0000 (06:20 +0000)]
Added some extra fields to the auth_serversupplied_info structure.
To obtain the full group membership of a user (i.e nested groups on a
win2k native mode server) it is necessary to merge this list of groups
with the groups returned by winbindd when creating an nt access token.

This breaks winbindd linking while AB and I sync up our changes to the
authentication subsystem.
(This used to be commit 4eeb7bcd783d7cfb3ac232f1faa035773007401d)

18 years agoThis one's a doozy. A cut&paste bug incorrectly sets the max string length
Tim Potter [Wed, 31 Oct 2001 04:55:43 +0000 (04:55 +0000)]
This one's a doozy.  A cut&paste bug incorrectly sets the max string length
of the lm challenge/response header in the NET_ID_INFO_2 structure included
in a network logon request.  It seems Windows 2000 is the only OS that
cares about this.
(This used to be commit 0f6207f45567a8af0a125a838a5ed68ea6c22283)

18 years agoDon't accidentally return success when sending a broken NET_SAMLOGON
Tim Potter [Wed, 31 Oct 2001 04:42:16 +0000 (04:42 +0000)]
Don't accidentally return success when sending a broken NET_SAMLOGON
request.  This exposes a domain authentication bug with win2k where a rpc
fault is returned but not propagated up as an error.
(This used to be commit 27cd7ac85779bbc1e9488ee06e87b0c743c5b29c)

18 years agoSome tweaking to make the samlogon function look more like NT on the wire.
Tim Potter [Wed, 31 Oct 2001 04:26:36 +0000 (04:26 +0000)]
Some tweaking to make the samlogon function look more like NT on the wire.
(This used to be commit b30232e2b7ddb5eab419d4e6237176f695a534ad)

18 years agoParionia to ensure people don't install libsmb based programs setuid root.
Andrew Bartlett [Wed, 31 Oct 2001 01:52:34 +0000 (01:52 +0000)]
Parionia to ensure people don't install libsmb based programs setuid root.

libsmb has not been written to be setuid, with things like LIBSMB_PROG allowing
all sort of fun and games.

Andrew Bartlett
(This used to be commit 0c8e9339d8238de92e9146d04091694b62874c33)

18 years agoSpnego on the 'server' end of security=server just does not work, so set the
Andrew Bartlett [Tue, 30 Oct 2001 13:54:54 +0000 (13:54 +0000)]
Spnego on the 'server' end of security=server just does not work, so set the
flags so we just do a 'normal' session setup.

Also add some parinoia code to detect when sombody attempts to do a 'normal'
session setup when spnego had been negoitiated.

Andrew Bartlett
(This used to be commit 190898586fa218c952fbd5bea56155d04e6f248b)

18 years agoFix debug in domain_client_validate() when password server = *.
Tim Potter [Tue, 30 Oct 2001 05:54:38 +0000 (05:54 +0000)]
Fix debug in domain_client_validate() when password server = *.
(This used to be commit c78fec86c97075bb5726fcb7ed197bc75dd88ac0)

18 years agoAllow the logon level to be passed to cli_netlogon_sam_logon() rather than
Tim Potter [Tue, 30 Oct 2001 05:41:07 +0000 (05:41 +0000)]
Allow the logon level to be passed to cli_netlogon_sam_logon() rather than
the validation level.
(This used to be commit c79e94ea27aab31423b1bdc34e9cff25688dbe5f)

18 years agoAllow the logon level to be passed to cli_netlogon_sam_logon() rather than
Tim Potter [Tue, 30 Oct 2001 05:38:41 +0000 (05:38 +0000)]
Allow the logon level to be passed to cli_netlogon_sam_logon() rather than
the validation level.  This allows us to test interactive or network logons.

Interestingly enough a win2k native mode server generates a rpc fault when
presented with a network logon!
(This used to be commit 0758c0ea845dd0b552e4dab3ce05f0811fa9658e)

18 years agoRemoved confusing comment.
Tim Potter [Tue, 30 Oct 2001 05:29:37 +0000 (05:29 +0000)]
Removed confusing comment.
(This used to be commit b496936634a4b676aa2df973e64c91aa0da5d7d5)

18 years agoFix up smbpasswd -e/-d so that it doesn't change the password under you any
Andrew Bartlett [Tue, 30 Oct 2001 05:21:16 +0000 (05:21 +0000)]
Fix up smbpasswd -e/-d  so that it doesn't change the password under you any
more.

(Previously it set them to 'XXXX' or similar when only the flags were being
changed - a bug I must have introduced when I reworked the passdb end of things
a few weeks back.)

Adds a new local flag:  LOCAL_SET_PASSWORD to specify that the password is
actually to be changed.

Andrew Bartlett
(This used to be commit cea6b6cb228c7e1f0c2d45951590e0d8fb8b315c)

18 years agoDisplay some errors if the initial connection to the server could not be
Tim Potter [Tue, 30 Oct 2001 04:21:53 +0000 (04:21 +0000)]
Display some errors if the initial connection to the server could not be
made.
(This used to be commit c3f5df8d6743bb7b48118b378f23268008e74145)

18 years agoAdded samlogon command to test against win2k native mode server. I think
Tim Potter [Tue, 30 Oct 2001 01:49:44 +0000 (01:49 +0000)]
Added samlogon command to test against win2k native mode server.  I think
there's a bug in the marshalling of net_sam_logon.
(This used to be commit 7c5ac46b8ad0be681d102e7ef3478d64d7a2b8e6)

18 years agoFixed typo in debug message.
Tim Potter [Tue, 30 Oct 2001 00:19:43 +0000 (00:19 +0000)]
Fixed typo in debug message.
(This used to be commit 26fa0374bb5894ece460899ca37cf512c4424b2f)

18 years agoFix up auth_smbpasswd.c to use the password interface, rather than the
Andrew Bartlett [Mon, 29 Oct 2001 22:28:21 +0000 (22:28 +0000)]
Fix up auth_smbpasswd.c to use the password interface, rather than the
structures directly.

Andrew Bartlett
(This used to be commit c2dc24ab6370236437b72b929e2a56e174163d78)

18 years agoAdd a bit of 'const' for the data_blob code.
Andrew Bartlett [Mon, 29 Oct 2001 22:14:17 +0000 (22:14 +0000)]
Add a bit of 'const' for the data_blob code.

Add a new data_blob_clear_free() function - that zero's out the buffer
when its done.
(This used to be commit b02ed7ee195ebd9060f91e117c002d661b6cc9d6)

18 years agoDon't force winbind to use non-local DC's.
Volker Lendecke [Mon, 29 Oct 2001 15:00:45 +0000 (15:00 +0000)]
Don't force winbind to use non-local DC's.

Volker
(This used to be commit fd1d0064b3a4fe834c5d8e810a12a8077f9d2a66)

18 years agoclear errno before a call, tdbsam will not update it.
Simo Sorce [Mon, 29 Oct 2001 13:31:01 +0000 (13:31 +0000)]
clear errno before a call, tdbsam will not update it.
just a hack to make things work.
(This used to be commit fd1bc3557a7ba57a983a29d36ce0461085fb6682)

18 years agoanother few changes to the new mangle code
Simo Sorce [Mon, 29 Oct 2001 13:21:29 +0000 (13:21 +0000)]
another few changes to the new mangle code
(This used to be commit 92f953c156a39b54230c52c6102a319a4a5ca798)

18 years agochange some more functions to the new mangle interface.
Simo Sorce [Mon, 29 Oct 2001 13:19:22 +0000 (13:19 +0000)]
change some more functions to the new mangle interface.
(This used to be commit 06a7c28ea1be81c4a53f9a5b885c37fdde31f75c)

18 years ago- fix string len for an ucs2_to_dos function as any ucs2 char may be up to 4 dos...
Simo Sorce [Mon, 29 Oct 2001 11:37:42 +0000 (11:37 +0000)]
- fix string len for an ucs2_to_dos function as any ucs2 char may be up to 4 dos hars...
- addedd ascii compatibility functions
(This used to be commit 8b9302b7078f1dd5459051500ed19a696dc09ae0)

18 years agoMore spelling and grammer from Vance. <vance@digital-host.net>
Andrew Bartlett [Mon, 29 Oct 2001 08:26:45 +0000 (08:26 +0000)]
More spelling and grammer from Vance. <vance@digital-host.net>

Thanks!

Andrew Bartlett
(This used to be commit f019bed7663b4a20c1b5ab6b59fcadda17b89acd)

18 years agoThis patch applied, except without the structure changes to nmblib.c
Andrew Bartlett [Mon, 29 Oct 2001 08:12:44 +0000 (08:12 +0000)]
This patch applied, except without the structure changes to nmblib.c

Andrew Bartlett.

From kai@cmail.ru Mon Oct 29 18:50:42 2001
Date: Fri, 19 Oct 2001 17:26:06 +0300
From: Andrew V. Samoilov <kai@cmail.ru>
To: samba-technical@lists.samba.org
Subject: [patch]: makes some arrays const to be shared between processes

Hi!

This patch makes some arrays const. So these arrays go to text/rodata
segment and are shared between all of the processes which use shared
library with these arrays.

Regards,
Andrew V. Samoilov.

P.S. Please cc your answer to kai@cmail.ru,
I don't subscribed to this list.

ChangeLog:
* cliconnect.c (prots): Make const.
* clierror.c (rap_errmap): Likewise.
* nmblib.c (nmb_header_opcode_names): Likewise.
(lookup_opcode_name): Make opcode_namep const. Eliminate i.
* nterr.c (nt_err_code_struct): Typedef const.
* smberr.c (err_code_struct): Make const.
(err_classes): Likewise.
(This used to be commit cb84485a2b0e1fdcb6fa90e0bfb97e125ae1b3dd)

18 years agoThis commit is number 4 of 4.
Andrew Bartlett [Mon, 29 Oct 2001 07:35:11 +0000 (07:35 +0000)]
This commit is number 4 of 4.

In particular this commit focuses on:

Actually adding the 'const' to the passdb interface, and the flow-on changes.

Also kill off the 'disp_info' stuff, as its no longer used.

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

----

These changes introduces 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

---

This finishes this line of commits off, your tree should now compile again :-)

Andrew Bartlett
(This used to be commit c95f5aeb9327347674589ae313b75bee3bf8e317)

18 years agoThis commit is number 3 of 4.
Andrew Bartlett [Mon, 29 Oct 2001 07:28:32 +0000 (07:28 +0000)]
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
(This used to be commit e7634f81c5116ff4addfb7e495f54b6bb78e8f77)

18 years agoThis commit is number 2 of 4.
Andrew Bartlett [Mon, 29 Oct 2001 07:24:49 +0000 (07:24 +0000)]
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.
(This used to be commit 8f607810eb24ed1157bbd2e896c2c167bc34d986)

18 years agoThis commit is number 1 of 4.
Andrew Bartlett [Mon, 29 Oct 2001 07:15:51 +0000 (07:15 +0000)]
This commit is number 1 of 4.

In particular this commit focusses on:

Adding the new 'pass changed now' helper function.

While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.
(This used to be commit a8971a5448cf6d203b379c3ed01e331d5263c9ee)

18 years agoConverted a bunch of functions to use sscanf %i instead of atoi to
Tim Potter [Mon, 29 Oct 2001 05:38:02 +0000 (05:38 +0000)]
Converted a bunch of functions to use sscanf %i instead of atoi to
allow hex or decimal rids to be specified.
(This used to be commit d93488b953337890a17de124f88cf2066f733c40)

18 years agoHey where did those 4 character tabs come from?
Tim Potter [Mon, 29 Oct 2001 04:57:20 +0000 (04:57 +0000)]
Hey where did those 4 character tabs come from?
(This used to be commit 49d47238267c3a2e0fc466178b779a692a7809ff)

18 years agoDon't reference tallocated memory that has already been disposed of. The
Tim Potter [Mon, 29 Oct 2001 04:50:17 +0000 (04:50 +0000)]
Don't reference tallocated memory that has already been disposed of.  The
cli_samr_query_userinfo function used to do this.
(This used to be commit da2c167660ec12360354f96dc672d935f58dd9c0)

18 years agoFixed confusing debug message - it was always printing uid 0 instead of the
Tim Potter [Mon, 29 Oct 2001 03:46:09 +0000 (03:46 +0000)]
Fixed confusing debug message - it was always printing uid 0 instead of the
correct uid.
(This used to be commit ad30a35ebc04f6a56c3ffb28bfb793557cf1fdf7)

18 years agofix a logic bug on max size of a returned string,
Simo Sorce [Sun, 28 Oct 2001 19:19:57 +0000 (19:19 +0000)]
fix a logic bug on max size of a returned string,
this fixes also the bug with file renaming.
(This used to be commit 5246d7609c3aff658fcd08a1f1c1bb6e11509e35)

18 years agoadded de.msg from Andreas Moroder
Motonobu Takahashi [Sun, 28 Oct 2001 12:16:00 +0000 (12:16 +0000)]
added de.msg from Andreas Moroder
(This used to be commit bc909797efcb9b13480d1a77e1429473bb107ed4)

18 years agoFix up the Makefile for now (thanks herb).
Andrew Bartlett [Sat, 27 Oct 2001 12:59:46 +0000 (12:59 +0000)]
Fix up the Makefile for now (thanks herb).

I understand that Vance is reworking the build_options stuff, so maybe we can
have better way of regenerating this in future.

Andrew Bartlett
(This used to be commit a228e9b39f0a5642d5acaba90a92ba0b29adf689)

18 years agosmbd/notify_hash.c: Merged Herb's fix.
Jeremy Allison [Sat, 27 Oct 2001 07:17:21 +0000 (07:17 +0000)]
smbd/notify_hash.c: Merged Herb's fix.
lib/debug.c: Fix for potential null pointer access.
Jeremy.
(This used to be commit 5a4d22dd66ab782f6161aa5a4162c0e7f1d811fb)

18 years agoRaise simultaneous open pipes from 64 to 1024 for large print server
Jeremy Allison [Sat, 27 Oct 2001 07:16:48 +0000 (07:16 +0000)]
Raise simultaneous open pipes from 64 to 1024 for large print server
environments.
Jeremy.
(This used to be commit e5f8147d02b57198f684c6686dfa497c6732ff44)

18 years agoAdded some connection checking code. Doesn't work yet though.
Tim Potter [Sat, 27 Oct 2001 04:48:22 +0000 (04:48 +0000)]
Added some connection checking code.  Doesn't work yet though.
(This used to be commit 4f4dace5772780cf4eedc0ebca1c60d04171eb74)

18 years agoA few spelling fixes from Vance. <vance@digital-host.net>
Andrew Bartlett [Fri, 26 Oct 2001 23:54:25 +0000 (23:54 +0000)]
A few spelling fixes from Vance.  <vance@digital-host.net>

Thanks!
(This used to be commit 5fda15463a63018d917fbd7d6d9dd1fb0b2558cf)

18 years agosamba-bugs@samba.org -> samba@samba.org
Andrew Bartlett [Fri, 26 Oct 2001 23:12:32 +0000 (23:12 +0000)]
samba-bugs@samba.org -> samba@samba.org

The rest of this is still broken however...
(This used to be commit 6cce6350caf034bdf6e5b6417e762bebc3dd97c8)

18 years agoRestore the intended behaviour for .headers.stamp
Andrew Bartlett [Fri, 26 Oct 2001 23:03:33 +0000 (23:03 +0000)]
Restore the intended behaviour for .headers.stamp

We don't want a 'make headers' (aka make proto) to force a rebuild
of the entire tree.

Andrew Bartlett
(This used to be commit 8c0cb50387cbbcca89d12cefae40a6a02d147ea4)

18 years agoFixed compile warning.
Tim Potter [Fri, 26 Oct 2001 22:58:32 +0000 (22:58 +0000)]
Fixed compile warning.
(This used to be commit 320c21b7a9e0a914b8a9523775df8895cb41256f)

18 years agoAdded || -> && fix from "Orwig, Paul" <PORWIG@PacificLife.com>.
Jeremy Allison [Wed, 24 Oct 2001 23:52:29 +0000 (23:52 +0000)]
Added || -> && fix from "Orwig, Paul" <PORWIG@PacificLife.com>.
Jeremy.
(This used to be commit 57b8e6d742addd9fa90da918ec4343d47562f0b7)

18 years agoRemove xstrdup since it was added to lib/util.c. Caused compile failure
Jim McDonough [Wed, 24 Oct 2001 17:58:03 +0000 (17:58 +0000)]
Remove xstrdup since it was added to lib/util.c.  Caused compile failure
(This used to be commit 43c384fa7854a9592ce5e5b67cb650c91ea09a76)

18 years agoUpdated copyright notice.
Tim Potter [Wed, 24 Oct 2001 00:55:26 +0000 (00:55 +0000)]
Updated copyright notice.
(This used to be commit 86de168ea948b48c47d88b8f1928437de7c33873)

18 years agoRenamed global_vfs_ops to default_vfs_ops and made static.
Tim Potter [Wed, 24 Oct 2001 00:45:41 +0000 (00:45 +0000)]
Renamed global_vfs_ops to default_vfs_ops and made static.

Make a copy of the default ops structure rather than following a pointer.

This fixes the audit VFS example module!
(This used to be commit 91ab6f75d9e6820a13fe3034a5f100ae170ad164)

18 years agoRemoved unused function.
Tim Potter [Wed, 24 Oct 2001 00:36:49 +0000 (00:36 +0000)]
Removed unused function.
(This used to be commit ef06de2a1ca434ab658940146b5d6c16bf580bb3)

18 years agoMade default vfs ops static so we can use this symbol in actual modules.
Tim Potter [Wed, 24 Oct 2001 00:35:55 +0000 (00:35 +0000)]
Made default vfs ops static so we can use this symbol in actual modules.
(This used to be commit 398ced6eef7e52441ddc59fef70e4a50a96a73b7)

18 years agoDon't get stuck in an infinite loop in vfs_connect.
Tim Potter [Tue, 23 Oct 2001 22:13:25 +0000 (22:13 +0000)]
Don't get stuck in an infinite loop in vfs_connect.
(This used to be commit 69275e4f0f502f07ceb37f274d01450d639ba23f)

18 years agomore compiler warnings
Herb Lewis [Tue, 23 Oct 2001 20:39:38 +0000 (20:39 +0000)]
more compiler warnings
(This used to be commit 12c10e876ea528fdf33e8ecfe42ab0ebb346b143)

18 years ago.headers.stamp not getting touched if file already existed.
Herb Lewis [Tue, 23 Oct 2001 20:32:24 +0000 (20:32 +0000)]
.headers.stamp not getting touched if file already existed.

Not sure what the original intent was with the [ -f $@ ] test but this
prevented the touch from happening. Could whoever originally added this
target check this out?
(This used to be commit 813490855339cffa31c8734ecd362eba7585bda2)

18 years agoget rid of compiler warnings (casts and delete unused variables)
Herb Lewis [Tue, 23 Oct 2001 19:10:30 +0000 (19:10 +0000)]
get rid of compiler warnings (casts and delete unused variables)
(This used to be commit 51cb4411df61d1caec9d84809b1a53a6a632f808)

18 years agoIRIX compiler dies not like casts in macro args
Herb Lewis [Tue, 23 Oct 2001 18:15:18 +0000 (18:15 +0000)]
IRIX compiler dies not like casts in macro args
(This used to be commit 1b3123df48ca586b3d9c86a152354690836f6beb)

18 years agoRemove setbuffer which caused build errors
Jim McDonough [Tue, 23 Oct 2001 17:49:28 +0000 (17:49 +0000)]
Remove setbuffer which caused build errors
(This used to be commit 5a482350a74e255b8db1ea3c8e76654d6f089f51)

18 years agoget rid of compiler warnings
Herb Lewis [Tue, 23 Oct 2001 17:39:03 +0000 (17:39 +0000)]
get rid of compiler warnings
(This used to be commit 3fed17c537985177d8f54d03b71fda04ff930d5d)

18 years agoFix popt library checking
Jim McDonough [Tue, 23 Oct 2001 17:12:30 +0000 (17:12 +0000)]
Fix popt library checking
(This used to be commit 2cd33e88eb5ed88da90ddfd50a1ec96a2053479a)

18 years agoReplace getopt_long with popt for parsing commandline options
Jim McDonough [Tue, 23 Oct 2001 14:16:59 +0000 (14:16 +0000)]
Replace getopt_long with popt for parsing commandline options
(This used to be commit 0be7bf421be5ccff295a0d36331e915fce31796f)

18 years agoAdd popt for parsing commandline options
Jim McDonough [Tue, 23 Oct 2001 14:16:22 +0000 (14:16 +0000)]
Add popt for parsing commandline options
(This used to be commit df34e11d84a6fe89dc6654eb10de0a49383e1dea)

18 years agoops, some testing code in compat function let only mangled name come back.
Simo Sorce [Mon, 22 Oct 2001 23:25:11 +0000 (23:25 +0000)]
ops, some testing code in compat function let only mangled name come back.
(This used to be commit e48eb7b572de10481e928fb55243f47e8a3aa446)

18 years agoserver support for RAP session list function
Jim McDonough [Mon, 22 Oct 2001 18:14:42 +0000 (18:14 +0000)]
server support for RAP session list function
(This used to be commit d42c28fbadf577a23fb8c1da9e1c64a2f34fe133)

18 years agolets try the new mangling code
Simo Sorce [Mon, 22 Oct 2001 06:53:28 +0000 (06:53 +0000)]
lets try the new mangling code
all the calls go through a compatibility interface will
change that soon
a new mangle.tdb file will be set in the lock directory
it contains a static mapping longname<->manglename
(This used to be commit 1ffacd2068a896d36a9e56b6e28c63e2f7e98762)

18 years agoa quick fix to get rpcclient working again. This just disables
Andrew Tridgell [Mon, 22 Oct 2001 06:48:35 +0000 (06:48 +0000)]
a quick fix to get rpcclient working again. This just disables
NTLMSSP in cli_establish_connection()

What we really need to do is kill off the pwd_cache code. It is horrible,
and assumes the challenge comes in the negprot reply.
(This used to be commit 3f919b4360b3bfcc133f7d88bc5177e9d93f2db2)

18 years agosamr querydispinfo can change level, start index and max entries.
Jean-François Micouleau [Mon, 22 Oct 2001 06:30:18 +0000 (06:30 +0000)]
samr querydispinfo can change level, start index and max entries.
added level 4 decoding.

J.F.
(This used to be commit 0573caa91bdff361e3e864d3fd39d450e3738580)

18 years agoallow the samr commands to work back and the help too ;-)
Jean-François Micouleau [Mon, 22 Oct 2001 06:13:38 +0000 (06:13 +0000)]
allow the samr commands to work back and the help too ;-)

J.F.
(This used to be commit 0157fdc8a291ba9872757fb6cf5e16e98058a034)

18 years ago- fixed link order of krb5 libs
Andrew Tridgell [Mon, 22 Oct 2001 05:04:33 +0000 (05:04 +0000)]
- fixed link order of krb5 libs
- accept a wide range of principal names in session setup
(This used to be commit 672df66296f540b606aa43effab5f021b8978e4b)

18 years agoFix for @ in pathname from Kian Win.
Jeremy Allison [Mon, 22 Oct 2001 02:50:20 +0000 (02:50 +0000)]
Fix for @ in pathname from Kian Win.
Jeremy.
(This used to be commit 070fd5180fef921efb363ff24f04a298254f108b)

18 years agoRenamed inbuilt xstrdup to smb_xstrdup.
Jeremy Allison [Mon, 22 Oct 2001 02:43:20 +0000 (02:43 +0000)]
Renamed inbuilt xstrdup to smb_xstrdup.
Jeremy.
(This used to be commit cf99f9361370c521f28dcced008cbfec9fc38de5)

18 years agoAdded xstrdup, removed static version from smbpasswd.c
Jeremy Allison [Mon, 22 Oct 2001 02:38:45 +0000 (02:38 +0000)]
Added xstrdup, removed static version from smbpasswd.c
Jeremy.
(This used to be commit d01a9e5974d80ee8be2f7a20aeaae5826325d035)

18 years agoAdded xmalloc - calls smb_panic on zero size or malloc fail.
Jeremy Allison [Mon, 22 Oct 2001 02:34:41 +0000 (02:34 +0000)]
Added xmalloc - calls smb_panic on zero size or malloc fail.
Added xmemdup - calls xmalloc.
Made data_blob() call xmemdup.
Defensive programming (I still hate the no error checking... :-).
Jeremy.
(This used to be commit 2cc262278f9d4892cf2485d7a73d88bc0e7559a8)

18 years agoOk, I know it's a language thing and it shouldn't matter.... but a kerberos
Jeremy Allison [Sun, 21 Oct 2001 20:51:27 +0000 (20:51 +0000)]
Ok, I know it's a language thing and it shouldn't matter.... but a kerberos
name is a "principal", not a principle. English majors will complain :-).
Jeremy.
(This used to be commit b668d7d656cdd066820fb8044f24bcd4fda29524)