kai/samba.git
21 years agoSome of the updates from ctrlsoft's 'Various' patch:
Andrew Bartlett [Fri, 24 May 2002 09:57:48 +0000 (09:57 +0000)]
Some of the updates from ctrlsoft's 'Various' patch:

- convert net to popt
- convert status to popt
- adapt examples/pdb/ to multiple passdb system
- add dynamic debug class example to examples/pdb/

and some reformatting to better match the samba coding style.

Andrew Bartlett
(This used to be commit 2498bc69d4e5c38ec385f640489daa94c508c726)

21 years agoFixed incorrect comment.
Tim Potter [Fri, 24 May 2002 05:50:31 +0000 (05:50 +0000)]
Fixed incorrect comment.
(This used to be commit 2f74fb6e9893d306598ebedd54658f2dd56e988e)

21 years agoRemove the password length paramater from cli_full_connection - it really
Andrew Bartlett [Fri, 24 May 2002 05:14:16 +0000 (05:14 +0000)]
Remove the password length paramater from cli_full_connection - it really
didn't make any sense, and its was always just strlen(password) anyway.

This fixes it to be strlen(password)+1

Andrew Bartlett
(This used to be commit c205b18bd6b9b69200ff3db55f2c641631d4ab40)

21 years agoMove the authenticaion subsystem over to the same 'module:options' syntax
Andrew Bartlett [Fri, 24 May 2002 03:43:52 +0000 (03:43 +0000)]
Move the authenticaion subsystem over to the same 'module:options' syntax
that the passdb code now uses.  Similarly, move the 'pluggable' stuff
over from passdb as well, allowing runtime loading of new authenticaion
modules.

(NOTE:  The interfaces here can *and do* change - module writers are
not assured source-level compatibilty, and certainly not binary
compatibility).
(This used to be commit 3897cf5e048f50be91ae434f636affc6d539d0d1)

21 years agoDon't duplicat this here, use the existing function prototype.
Andrew Bartlett [Fri, 24 May 2002 03:37:56 +0000 (03:37 +0000)]
Don't duplicat this here, use the existing function prototype.
(This used to be commit 18c6db6a0014fd23383361485ec03eb871a85faa)

21 years agoMake function match the defintion require for assignment as a function
Andrew Bartlett [Fri, 24 May 2002 03:25:36 +0000 (03:25 +0000)]
Make function match the defintion require for assignment as a function
pointer.
(This used to be commit 38012edaca4c181f3d3a9e9df4fc434bba78f9dc)

21 years agoIf we don't do the select don't do the recvfrom.
Jeremy Allison [Fri, 24 May 2002 00:19:59 +0000 (00:19 +0000)]
If we don't do the select don't do the recvfrom.
Jeremy.
(This used to be commit f536ec62242c5c644e03afa19f4a3ebedf36f80d)

21 years agoFixed silly typo that causes receive_local_message to loop - caused by
Jeremy Allison [Fri, 24 May 2002 00:17:01 +0000 (00:17 +0000)]
Fixed silly typo that causes receive_local_message to loop - caused by
my removal of the goto. Oops !
Jeremy.
(This used to be commit 4d3679e03e0c30602b1345cbf2fbf8587dff1f26)

21 years agoCompile fix for enum trust dom wrapper.
Tim Potter [Thu, 23 May 2002 22:53:59 +0000 (22:53 +0000)]
Compile fix for enum trust dom wrapper.
(This used to be commit 63e2c7c5fe6eca86222a7a76d81ce1ee93ebde22)

21 years agoLooks like abartlet got a bit overexcited about using const...
Jim McDonough [Thu, 23 May 2002 15:42:29 +0000 (15:42 +0000)]
Looks like abartlet got a bit overexcited about using const...

BOOL const secrets_init(...)

Broke AIX build.
(This used to be commit 37b6bf3aae4fd8ee3af7e5947b3e549dcef754cf)

21 years agoAllow initial password set on net ads user add. I need to do this on
Jim McDonough [Thu, 23 May 2002 15:05:17 +0000 (15:05 +0000)]
Allow initial password set on net ads user add.  I need to do this on
rpc and rap too.  Anyone know what key I'm supposed to use to encrypt
it for the rap one?
(This used to be commit 033faaa8cbfe7e368c554b26e7a506098d06fa02)

21 years agoThis function is unused, and doesn't make any sense to me anyway.
Andrew Bartlett [Thu, 23 May 2002 14:26:04 +0000 (14:26 +0000)]
This function is unused, and doesn't make any sense to me anyway.

Wasn't this what got us some of the bugs with big-endien smbpasswd -j FOO -U ?

Anyway, it deserves to die.

Andrew Bartlett
(This used to be commit 7201720048b31e48fb2600de8f7396088cc9b533)

21 years agoNobody uses this, and its really just a layer of internal implementation.
Andrew Bartlett [Thu, 23 May 2002 14:24:59 +0000 (14:24 +0000)]
Nobody uses this, and its really just a layer of internal implementation.

Make it static (till sombody needs its...)
(This used to be commit 89dc15732062b46276d1d7a155954ee565070491)

21 years agoGiven Jeremy's positive response, and a lack of one from tpot, I'll commit
Andrew Bartlett [Thu, 23 May 2002 14:02:17 +0000 (14:02 +0000)]
Given Jeremy's positive response, and a lack of one from tpot, I'll commit
this:

More code cleanup - this lot a bit more dodgy than the last:

The aim is to trim pwd_cache down to size.  Its overly complex, and a
pain to deal with.  With a header comment like this:

'obfusticaion is planned'

I think it deserved to die (at least partly).

This was being done to allow 'cli_establish_connection' to die - its
functionality has been replaced by cli_full_connection(), which does
not duplicate code everywhere for creating names etc.

This also removes the little 'init' fucntions for the various pipes,
becouse they were only used in one place, and even then it was dodgy.

(I've reworked smbcacls not to use anonymous connections any more, as
this will (should) fail with a 'restrict anonymous' PDC).

This allowed me to remove cli_pipe_util.c, which was calling
cli_establish_connection.

tpot:  I'm not sure what direction you were going with the client stuff,
and you may well have been wanting the init functions.  If thats the case,
give me a yell and I'll reimplement them against cli_full_connection.

Andrew Bartlett
(This used to be commit fa67e4626bed623333c571e76e06ccd52cba5cc5)

21 years agoA graphical tdb browser using the gnome-python bindings.
Tim Potter [Thu, 23 May 2002 05:10:51 +0000 (05:10 +0000)]
A graphical tdb browser using the gnome-python bindings.
(This used to be commit 08dcfff2a22fd35a3e5cdca8ed137a7e5891fe53)

21 years agoAnother change to the GPL "abandon hope all who enter here" warning.
Tim Potter [Thu, 23 May 2002 02:36:53 +0000 (02:36 +0000)]
Another change to the GPL "abandon hope all who enter here" warning.
(This used to be commit 1d75b548de8b667673cf136306388546eb3bd98d)

21 years agoEnsure we kill with -TERM.
Jeremy Allison [Thu, 23 May 2002 01:39:28 +0000 (01:39 +0000)]
Ensure we kill with -TERM.
Jeremy.
(This used to be commit 22b0d5da63716028c8f4b61f002493aa67ba189a)

21 years agoMerge of bugfixes from 2.2.
Jeremy Allison [Wed, 22 May 2002 23:34:47 +0000 (23:34 +0000)]
Merge of bugfixes from 2.2.
Jeremy.
(This used to be commit 5c8351228c55f2403214351f6fd16fe231aee917)

21 years agoGot gdb and gpl confused. (-:
Tim Potter [Wed, 22 May 2002 23:31:44 +0000 (23:31 +0000)]
Got gdb and gpl confused.  (-:
(This used to be commit 08356ec38a5be239b6ab53ee75f3735c29b677a7)

21 years agoFix for strangeness in Linux 2.0.x select return.
Jeremy Allison [Wed, 22 May 2002 21:40:14 +0000 (21:40 +0000)]
Fix for strangeness in Linux 2.0.x select return.
Jeremy.
(This used to be commit 490b95a35d1e2ccd3b80db5cfcf7b9804901d36e)

21 years agoRemove horrid goto.
Jeremy Allison [Wed, 22 May 2002 20:54:26 +0000 (20:54 +0000)]
Remove horrid goto.
Jeremy.
(This used to be commit 7e6db250804e51ce0883b972831da455d389cdcd)

21 years agoNobody uses this function, and there really doesn't seem much point to
Andrew Bartlett [Wed, 22 May 2002 12:56:32 +0000 (12:56 +0000)]
Nobody uses this function, and there really doesn't seem much point to
it, so we may as well reduce the complexity.

Andrew Bartlett
(This used to be commit 31e074cea50111a150db220603c3cfccaaf4339c)

21 years agoAdd a bit more const, and kill of (finally!) sys_getpwnam and sys_getpwuid.
Andrew Bartlett [Wed, 22 May 2002 12:44:45 +0000 (12:44 +0000)]
Add a bit more const, and kill of (finally!) sys_getpwnam and sys_getpwuid.

These might be reimplmented as simple pass-through functions, but all users
really should be doing 'getpwnam_alloc' or 'getpwuid_alloc' to ensure that
there are not shared static buffers.

I don't beleive we actually need a getpw*() cache inside samba - if we do
then I think we should look at our code design first.

(some of these changes are for platforms I don't have access to, but
they look sane)

Andrew Bartlett
(This used to be commit 9d8431b04f41dceffe4c45cc969472ee59f7282f)

21 years agoCleanups!
Andrew Bartlett [Wed, 22 May 2002 12:14:28 +0000 (12:14 +0000)]
Cleanups!

Make some code static, add some const to the PAM code, and make the plaintext
password code actually function - particulary without the requirement to
modify the 'struct passwd' (which it assumed was made up of fstrings)

This kills some particularly ugly code in lib/util_pw.c

Andrew Bartlett
(This used to be commit 302dad4990ba5194f072e435465d9adaa089ae06)

21 years agoFix a silly memory (getpnam_alloc()) leak spotted by Elrond, and move
Andrew Bartlett [Wed, 22 May 2002 11:25:43 +0000 (11:25 +0000)]
Fix a silly memory (getpnam_alloc()) leak spotted by Elrond, and move
the DATA_BLOB code into its own file.

It would be nice to go over some of the other util.c functions, and check
that we still use them all, and that we use them in more than one place.

Andrew Bartlett
(This used to be commit d0ea70fce55df9a5b5878f50fce7bc115ffb37c2)

21 years agoCommit the header file for the LDAP/secrets changes
Andrew Bartlett [Wed, 22 May 2002 11:10:13 +0000 (11:10 +0000)]
Commit the header file for the LDAP/secrets  changes
(This used to be commit 5512618d3493a04c84a43beaa752c307bce146fc)

21 years agoUpdates for sane storage of ldap root DN passwords (tested, with upgrade
Andrew Bartlett [Wed, 22 May 2002 09:02:16 +0000 (09:02 +0000)]
Updates for sane storage of ldap root DN passwords (tested, with upgrade
from 2.2 format) and LDAP rebind support (untested, I don't have a setup
to match).

Andrew Bartlett
(This used to be commit 4f7ba78c9d50ac584497dcf1d78ce613112742d4)

21 years agoauto-recover from the fairly common case of a non-clean tdb shutdown
Andrew Tridgell [Wed, 22 May 2002 01:32:12 +0000 (01:32 +0000)]
auto-recover from the fairly common case of a non-clean tdb shutdown
while deleting a record. This leaves us with a non-free record on the
free list.
(This used to be commit e99b6a2b91e4022ce0a9a14415df71314b5e013f)

21 years agoMerge of receive_local_message fix from 2.2.5.
Jeremy Allison [Wed, 22 May 2002 01:04:58 +0000 (01:04 +0000)]
Merge of receive_local_message fix from 2.2.5.
Jeremy.
(This used to be commit d4dbb9cb1338332bda3651dc4b86abcf47e9c2d2)

21 years agoAdded a reminder about programs using the tdb bindings having to be
Tim Potter [Wed, 22 May 2002 00:43:04 +0000 (00:43 +0000)]
Added a reminder about programs using the tdb bindings having to be
licensed under the GPL.
(This used to be commit aa3ec7618fe39ddc75755098433572b271197af4)

21 years agoFailing to find an entry when doing mod_share_entry isn't a error
Jeremy Allison [Tue, 21 May 2002 23:07:04 +0000 (23:07 +0000)]
Failing to find an entry when doing mod_share_entry isn't a error
condition, as we look for the entry before locking the chain - thus
someone else could have legitimately deleted it.
Jeremy.
(This used to be commit bd64a291a8df63a6e0f9e166ad9ea7d92adbb4d5)

21 years agoTricky fix. If we were waiting for an oplock break response message from
Jeremy Allison [Tue, 21 May 2002 20:52:30 +0000 (20:52 +0000)]
Tricky fix. If we were waiting for an oplock break response message from
another smbd and an incoming SIGUSR1 message arrived we'd break out of
the wait early - as we have to use sys_select() to wait for an oplock
response message, not sys_select_intr() (which ignores EINTR errors)
because of the real time signal kernel interface.
Jeremy.
(This used to be commit 3bb26957e3e7fb5059d21115546d189eaca34646)

21 years agotypo day :-(
Simo Sorce [Tue, 21 May 2002 15:04:05 +0000 (15:04 +0000)]
typo day :-(
(This used to be commit 5b3b65aafe38e767e9b7206ffe6d7c89edb267ba)

21 years agotypo, sorry
Simo Sorce [Tue, 21 May 2002 13:49:08 +0000 (13:49 +0000)]
typo, sorry
(This used to be commit d222bc8c4b620095a21ba327940d4750d5dee753)

21 years agouhh, forgot to commit the DBGC_WINBIND definition :-)
Simo Sorce [Tue, 21 May 2002 08:06:44 +0000 (08:06 +0000)]
uhh, forgot to commit the DBGC_WINBIND definition :-)
(This used to be commit efb119fb88a511e026239773422242fff636ae13)

21 years agodebug classized
Simo Sorce [Tue, 21 May 2002 07:53:28 +0000 (07:53 +0000)]
debug classized
(This used to be commit ae5d24873ad0fb3df970cc9912e18e6a5067ae2d)

21 years agoA tdb module based on some tips from Mike Noriega. This version supports
Tim Potter [Tue, 21 May 2002 07:43:35 +0000 (07:43 +0000)]
A tdb module based on some tips from Mike Noriega.  This version supports
locking and tdb traversal using python callbacks.
(This used to be commit f3530fd6180bb78a58a3f41ac1389c9f0ba7b183)

21 years agoStop smbd looping when hide unreadable is true and .. is unreadable.
Jeremy Allison [Mon, 20 May 2002 23:33:46 +0000 (23:33 +0000)]
Stop smbd looping when hide unreadable is true and .. is unreadable.
Jeremy.
(This used to be commit fda7a11b093315a77ca1199119b5421a029ee883)

21 years agoMerge from 2.2.
Jeremy Allison [Mon, 20 May 2002 19:21:06 +0000 (19:21 +0000)]
Merge from 2.2.
Jeremy.
(This used to be commit 174df5d914b149e52bf260e6502f2436c2720958)

21 years agomerge from SAMBA_2_2
Gerald Carter [Mon, 20 May 2002 16:55:00 +0000 (16:55 +0000)]
merge from SAMBA_2_2
(This used to be commit 2424578c298ea11f67415bcfe2928353cd95819b)

21 years agoRemove level and name fields from dictionary copy in py_to_FORM()
Tim Potter [Mon, 20 May 2002 08:09:19 +0000 (08:09 +0000)]
Remove level and name fields from dictionary copy in py_to_FORM()
(This used to be commit ac15442579848f145dbdce6d51207321c4150c25)

21 years agopy_to_DRIVER_INFO_3: remove level key on copy of dictionary before calling
Tim Potter [Mon, 20 May 2002 08:07:49 +0000 (08:07 +0000)]
py_to_DRIVER_INFO_3: remove level key on copy of dictionary before calling
to_struct().
(This used to be commit 274679d8ce33aaf664ffaaa6834d506f7b196fc6)

21 years agoDecode info level 3 for getprinterdriver.
Tim Potter [Mon, 20 May 2002 08:05:27 +0000 (08:05 +0000)]
Decode info level 3 for getprinterdriver.

Error checking for undecoded info levels.
(This used to be commit 841b6cf63c1f22dcb8fa07796a44e20555fe5b59)

21 years agoWhen converting from a dictionary to a Samba structure, check for any
Tim Potter [Mon, 20 May 2002 08:04:02 +0000 (08:04 +0000)]
When converting from a dictionary to a Samba structure, check for any
additional keys that may have been added and return False if so.
(This used to be commit 96ccb2beb1d45f8122ff03fc2f7727bf065adbf6)

21 years agoSet level key in driver info structures.
Tim Potter [Mon, 20 May 2002 02:55:35 +0000 (02:55 +0000)]
Set level key in driver info structures.
(This used to be commit 0caf7610dcf698d2c649e42f0630de4337cfcea2)

21 years agoOK that last commit was incorrect - this call is parsed properly. I only
Tim Potter [Mon, 20 May 2002 01:31:51 +0000 (01:31 +0000)]
OK that last commit was incorrect - this call is parsed properly.  I only
imagined it wasn't!
(This used to be commit bbad6c6678c89a33fb233091f5965ccd1aa589f6)

21 years agoThere's probably a pointer to a buffer at the end of a enumprinterdrivers()
Tim Potter [Mon, 20 May 2002 01:00:56 +0000 (01:00 +0000)]
There's probably a pointer to a buffer at the end of a enumprinterdrivers()
rpc call which we currently don't parse - just added a comment about it for
the moment as not parsing it is harmless.
(This used to be commit 2429c4cc796576aa2d816a14b10fdd932b672a02)

21 years agoNo need to pass a fstring in make_spoolss_q_enumprinters()
Tim Potter [Mon, 20 May 2002 00:55:19 +0000 (00:55 +0000)]
No need to pass a fstring in make_spoolss_q_enumprinters()
(This used to be commit 1fb8e2b3a07fdc0bb302f02a451ed32a275f0c10)

21 years agoSpelling fix.
Tim Potter [Sun, 19 May 2002 12:07:21 +0000 (12:07 +0000)]
Spelling fix.
(This used to be commit 37f1cd013da073ca23fd9b16ee8cfbf9a3e6cbd9)

21 years agoPatch to only set SV_TYPE_PRINTQ_SERVER in default_server_announce if a
Tim Potter [Sun, 19 May 2002 12:06:45 +0000 (12:06 +0000)]
Patch to only set SV_TYPE_PRINTQ_SERVER in default_server_announce if a
print share is exported.  Needs some more testing.
(This used to be commit 92b36482fd6aa5103c30dad40fe799c07dd2d8d7)

21 years agoFixed compiler warning.
Tim Potter [Sun, 19 May 2002 11:21:28 +0000 (11:21 +0000)]
Fixed compiler warning.
(This used to be commit 793d9306e29ddd23e3f52736b5cd558b5d058611)

21 years agoA small change to print out the error message only if we could not check the
Richard Sharpe [Sun, 19 May 2002 07:08:32 +0000 (07:08 +0000)]
A small change to print out the error message only if we could not check the
secrets ...
(This used to be commit 56eea2623a8a8f2a5a0311cda6d0282d0037a3cc)

21 years agoKeep the compiler happy
Andrew Bartlett [Sun, 19 May 2002 02:28:14 +0000 (02:28 +0000)]
Keep the compiler happy
(This used to be commit 84ea2a434b510ed49838a04a4b30bd2fc9ec5673)

21 years agoso here it is the code to introduce seriously debugggging classes.
Simo Sorce [Sat, 18 May 2002 15:09:21 +0000 (15:09 +0000)]
so here it is the code to introduce seriously debugggging classes.
this is a first step only passdb stuff has beein "classized".

 - so what can you do?
   set debug level to:  1 poasdb:10
   that will make all the code run at debug level 1 except the code in
   passdb/* files that will run at level 10
   TODO: fix the man page

 - also smbcontrol has this nice feature so smbcontrol smbd debug 3 passdb:5
   will set every smbd to have a default log level of 3 while passdb stuff
   will be at level 5

   and so no..

  minor cosmetic fix to pdbedit is there too
(This used to be commit be5c3b3f5781ddc002ffcc98df04ab024dcef4ca)

21 years agoRemove unused files.
Andrew Bartlett [Sat, 18 May 2002 13:50:59 +0000 (13:50 +0000)]
Remove unused files.

The size of samba going down for once :-)

Andrew Bartlett
(This used to be commit 00ef4aad88f4ba9f2e242578c37933eac001c351)

21 years agoMove client_receive_smb to clientgen.c as a static, as proposed by Elrond.
Andrew Bartlett [Sat, 18 May 2002 13:19:38 +0000 (13:19 +0000)]
Move client_receive_smb to clientgen.c as a static, as proposed by Elrond.

(only function that used it was unused, and this helps bring TNG and HEAD
closer)

Its also cleaner.

Andrew Bartlett
(This used to be commit 78f47c83332a6408a718a3dee45645935638b364)

21 years agoOops, I missed commiting this earlier.
Andrew Bartlett [Sat, 18 May 2002 11:38:50 +0000 (11:38 +0000)]
Oops, I missed commiting this earlier.

The idea is that pdb_add_sam_account() should have a non-const SAM_ACCOUNT,
and update some of the the properties generated during the add.

Andrew Bartlett
(This used to be commit b014d9ae4bc38d83d474888b73d350a62704341f)

21 years agoRemove const from some functions to match the changed prototype in a
Andrew Bartlett [Sat, 18 May 2002 09:32:59 +0000 (09:32 +0000)]
Remove const from some functions to match the changed prototype in a
previous commit, and remove some unsued variables.

Main change:  Make sure to fill in the username when making a non-unix
account from smbpasswd.
(This used to be commit 7019486eacb72ca44c42ce620b8696bb29f12292)

21 years agoPassdb:
Andrew Bartlett [Sat, 18 May 2002 09:06:23 +0000 (09:06 +0000)]
Passdb:

Kill off the silly code that attempts to do NT -> Unix username mapping.
This is done well before here, no need to repeat it.

Add some small fixes and extra debugs, trying to track down current build
farm failures.

pdb_unix:

When 'updating' a pdb_unix account, instead add it to the default passdb.
This means that you don't need to specify '-a' to smbpasswd any more when
messing with an existing unix user, the account is simply 'upgraded'.

The idea here is that these accounts are just as 'real' as any other, they
just don't have the extra attributes an smbpasswd file does.

I'm open for debate on the pdb_unix issue, and will remove it if given
good reason.  (without this, an attempt to add an account already in
pdb_unix to smbpasswd would fail, as it would fail to update pdb_unix).

rpc_server/srv_netlog_nt.c

Change a couple of things around, so as to show the client workstation etc.

WRONG_PASSWORD is certainly not the right default error.  Try ACCESS_DENIED
for now.

Andrew Bartlett
(This used to be commit d78b74b338df9accd9ad84c56a49fa4f787425e2)

21 years agoInclude the extra #define for the last set of smbpasswd mods.
Andrew Bartlett [Sat, 18 May 2002 08:59:04 +0000 (08:59 +0000)]
Include the extra #define for the last set of smbpasswd mods.
(This used to be commit bf82ac14c826a765b33d368e4cb62c7fb3cd3c4f)

21 years agoMake smbpasswd at least slightly sane. This kills off some of the
Andrew Bartlett [Sat, 18 May 2002 08:57:25 +0000 (08:57 +0000)]
Make smbpasswd at least slightly sane.  This kills off some of the
silly global variables, and makes it come closer to a clean compile.

I'm still not convinced what was wrong with the previous code, at least
it didn't cause a gush of warnings...

In any case, we now don't need to spegetti code gotos etc.

This should really be redone with popt.

Andrew Bartlett
(This used to be commit d9330f10447f199a5a73803579ce3b1253f4d02c)

21 years agoAs per rsharpe's request, require only a Masters in Astrophysics to
Andrew Bartlett [Sat, 18 May 2002 06:42:50 +0000 (06:42 +0000)]
As per rsharpe's request, require only a Masters in Astrophysics to
correctly configure winbind.

(Next job:  Fill in the 'error_msg' field with somthing useful)
(This used to be commit 49ee2a25c131641887cbc438a6336652f042cfb0)

21 years agoA few things in this commit:
Andrew Bartlett [Sat, 18 May 2002 05:52:52 +0000 (05:52 +0000)]
A few things in this commit:

cleanup some of the code in net_rpc_join re const warnings and
fstrings.

Passdb:

Make the %u and %U substituions in passdb work.
This is done by declaring these paramters to be 'const' and doing
the substitution manually.  I'm told this is us going full circle,
but I can't really see a better way.

Finally these things actually seem to work properly...

Make the lanman code use the pdb's recorded values for homedir etc
rather than the values from lp_*()

Add code to set the plaintext password in the passdb, where it can
decide how to store/set it.  For use with a future 'ldap password
change' option, or somthing like that...

Add pdb_unix, so as to remove the 'not in passdb' special cases from the
local_lookup_*() code.  Quite small, as it uses the new 'struct passwd ->
SAM_ACCOUNT' code that is now in just one place.  (also used by pdb_smbpasswd)

Other:
Fix up the adding of [homes] at session setup time to actually pass
the right string, that is the unix homedir, not the UNC path.

Fix up [homes] so that for winbind users is picks the correct name.
(bad interactions with the default domain code previously)

Change the rpc_server/srv_lsa_nt.c code to match NT when for the
SATUS_NONE_MAPPED reply:  This was only being triggered on
no queries, now it is on the 'no mappings' (ie all mappings failed).
Checked against Win2k.

Policy Question:  Should SID -> unix_user.234/unix_group.364 be
considered a mapping or not?  Currently it isn't.

Andrew Bartlett
(This used to be commit c28668068b5a3b3cf3c4317e5fb32ec9957f3e34)

21 years agoDon't forget the semicolon, you fool!
Jim McDonough [Fri, 17 May 2002 14:55:50 +0000 (14:55 +0000)]
Don't forget the semicolon, you fool!
(This used to be commit 1c9387330f776b9b96714f9c9c62087bbd32f7b6)

21 years agoMake --with-ldapsam 'go away'. This is now a standard, stable, feature
Andrew Bartlett [Fri, 17 May 2002 14:51:55 +0000 (14:51 +0000)]
Make --with-ldapsam 'go away'.  This is now a standard, stable, feature
and there is no real reason for it to depend on more than the abilty
to compile the code.
(This used to be commit 64aaec137e39595e6e61b55eb525615683a1393c)

21 years agoFix usage of va_list passed as an arg. Use __va_copy before using it
Jim McDonough [Fri, 17 May 2002 14:51:22 +0000 (14:51 +0000)]
Fix usage of va_list passed as an arg.  Use __va_copy before using it
when it exists.
(This used to be commit 85ab07bdc1b2ce7b2c1b8197fad45124b1460dca)

21 years agoThis is meant to be accessed via the helper fn, not directly.
Andrew Bartlett [Fri, 17 May 2002 14:35:54 +0000 (14:35 +0000)]
This is meant to be accessed via the helper fn, not directly.
(This used to be commit b84882a628b3f2f0890322f25694c1932aa3e5ec)

21 years agoMake non-static for some later work (pushing the info3 across the winbind
Andrew Bartlett [Fri, 17 May 2002 14:27:42 +0000 (14:27 +0000)]
Make non-static for some later work (pushing the info3 across the winbind
pipe for smbd to decode), and fix up the debug.  (At least I assume it is
wrong, can an expert care to comment?)
(This used to be commit e5b4331ffa99d769b062053d6afc4772355fa5b2)

21 years agoAdd a touch of const
Andrew Bartlett [Fri, 17 May 2002 14:26:20 +0000 (14:26 +0000)]
Add a touch of const
(This used to be commit 3e93b216ddba14592a0193664c5d6bcbef898f1a)

21 years agoCheck paramters for NULL.
Andrew Bartlett [Fri, 17 May 2002 14:23:43 +0000 (14:23 +0000)]
Check paramters for NULL.
(This used to be commit 078e81530e9bc4e5f0b8e18aff0488386bce29a5)

21 years agoMake Get_Pwnam use getpwnam_alloc() in an attempt to make it segfault rather
Andrew Bartlett [Fri, 17 May 2002 14:19:36 +0000 (14:19 +0000)]
Make Get_Pwnam use getpwnam_alloc() in an attempt to make it segfault rather
than allow silent reuse of stale static buffer.

Next step is to make this fn return that allocated buffer.
(This used to be commit e1daf816f3d809d288313fe2db98b5a731c93a79)

21 years agoindent
Andrew Bartlett [Fri, 17 May 2002 14:15:47 +0000 (14:15 +0000)]
indent
(This used to be commit 173aac4a810782dddc85494c328a6917cb3fe0c2)

21 years agoA few more trusted domains updates from mimir.
Andrew Bartlett [Fri, 17 May 2002 13:49:01 +0000 (13:49 +0000)]
A few more trusted domains updates from mimir.

I think we may still need to look at our server enumeration code, but
other than that, its much better in the tree than out.

Andrew Bartlett
(This used to be commit d57a1b4629d12a0374cc6d74dfc6f5d4793fcef8)

21 years agoAdd an item about the __va_copy macro to prevent SEGV's on 390 and PPC Linux.
Jim McDonough [Fri, 17 May 2002 13:13:15 +0000 (13:13 +0000)]
Add an item about the __va_copy macro to prevent SEGV's on 390 and PPC Linux.
(This used to be commit 443ba282be79e2b7259950fffbd7fe9bb4cabf8c)

21 years agoThis removes --with-ssl from Samba.
Andrew Bartlett [Fri, 17 May 2002 12:42:39 +0000 (12:42 +0000)]
This removes --with-ssl from Samba.

This option was badly maintained, useless and confused our users and
distirbutors.  (its SSL, therfore it must be good...)

No windows client uses this protocol without help from an SSL tunnel.

I can't see any reason why setting up a unix-side SSL wrapper would
be any more difficult than the > 10 config options this mess added
to samba in any case.

On the Samba client end, I think the LIBSMB_PROG hack should be
sufficient to start stunnel on the unix side.  We might extend this
to take %i and %p (IP and port) if there is demand.

Andrew Bartlett
(This used to be commit b04561d3fd3ee732877790fb4193b20ad72a75f8)

21 years agoUpdate the doco for the LDAP options in smb.conf, in line with code changes
Andrew Bartlett [Fri, 17 May 2002 11:10:34 +0000 (11:10 +0000)]
Update the doco for the LDAP options in smb.conf, in line with code changes
a little while back.  We might have to look at the migration path for these
options.  (or as --with-ldap has always been 'experimental' we could ignore
it...)

Andrew Bartlett
(This used to be commit 35e909b33870f6c5d8af9398d6f9f816e83e2ca4)

21 years agomore dl* -> sys_dl* for sco
Andrew Bartlett [Fri, 17 May 2002 10:54:26 +0000 (10:54 +0000)]
more dl* -> sys_dl* for sco
(This used to be commit 92eead1a0a93a6191fbd7b413f0736eb1a716b8e)

21 years agoMakes winbindd_proto handling consistent with the other header files,
Martin Pool [Fri, 17 May 2002 06:59:04 +0000 (06:59 +0000)]
Makes winbindd_proto handling consistent with the other header files,
so that at least "make clean; make all" doesn't fail.

It's still not safe for parallel builds, i.e. "make clean; make -j3
all" will probably crash, but "make clean; make proto && make -j3 all"
seems OK.  I'm not sure if it is possible to solve that and still
support ancient non-GNU versions of Make.
(This used to be commit 4d202c19997d4219e7f607a725123d5606b9bd8a)

21 years agoGet the sco boxes compiling again - use the sys_ intefaces for all the dl*
Andrew Bartlett [Fri, 17 May 2002 06:15:06 +0000 (06:15 +0000)]
Get the sco boxes compiling again - use the sys_ intefaces for all the dl*
funcitons.
(This used to be commit c37c1e39253d9d21f8ab38ab8d24f7e787008596)

21 years agoNT sends the server name prepended with \\ for a enumerate printers RPC
Tim Potter [Fri, 17 May 2002 05:33:48 +0000 (05:33 +0000)]
NT sends the server name prepended with \\ for a enumerate printers RPC
call so we probably should as well.
(This used to be commit 39c0218e5b4132e60401c2fc25fcbc88be94f87f)

21 years agoChanges to allow head to translate NMB flags ...
Richard Sharpe [Fri, 17 May 2002 03:37:37 +0000 (03:37 +0000)]
Changes to allow head to translate NMB flags ...
(This used to be commit c986a19cde0dfa96b512eb24d873203981e68c48)

21 years agoUse get_level_value() utility fn.
Tim Potter [Fri, 17 May 2002 02:39:07 +0000 (02:39 +0000)]
Use get_level_value() utility fn.

Cleaned up some local variable naming.
(This used to be commit d4c7a85c2b5c45f1cc3273230d80a1d5923cd848)

21 years agoAdd level field when converting FORM_1 to dict.
Tim Potter [Fri, 17 May 2002 02:34:49 +0000 (02:34 +0000)]
Add level field when converting FORM_1 to dict.

More error checking when converting from dict to FORM_1.
(This used to be commit 608b9ab29dca820d29a40a2c5df86c1ff7e751a9)

21 years agoaddform(), setform():
Tim Potter [Fri, 17 May 2002 02:32:02 +0000 (02:32 +0000)]
addform(), setform():

  - call get_level_value() utility function
  - removed unused keyword args
  - clean up handling of name arg to cli call

deleteform():

  - removed unused keyword args
(This used to be commit c9c2aac9035a11e3fe2d320504097b98a426dd63)

21 years agoCall get_level_value() utility function.
Tim Potter [Fri, 17 May 2002 02:28:26 +0000 (02:28 +0000)]
Call get_level_value() utility function.
(This used to be commit 2566dad274e0bced9e55cbc3c126c00e70373fbe)

21 years agoAdded a utility function to extract the info key from a dictionary.
Tim Potter [Fri, 17 May 2002 02:25:37 +0000 (02:25 +0000)]
Added a utility function to extract the info key from a dictionary.
(This used to be commit 4cafbcb205af11c478a2d9047554315915933e5d)

21 years agoto_struct() now returns a boolean which is false if not all the elements of
Tim Potter [Fri, 17 May 2002 02:24:06 +0000 (02:24 +0000)]
to_struct() now returns a boolean which is false if not all the elements of
the structure were present in the dictionary.
(This used to be commit b26d9d793914b66050c374ec2c0e94fa37c7e0e4)

21 years agoFix for non-__va_copy systems. I had used AC_TRY_COMPILE, but even though
Jim McDonough [Thu, 16 May 2002 20:28:52 +0000 (20:28 +0000)]
Fix for non-__va_copy systems.  I had used AC_TRY_COMPILE, but even though
__va_copy wasn't defined, it compiled as though it were a function, but
fails on a link.  Oops.
(This used to be commit d3222ecd1a024fd2e7ba72b1bc10a400d398a364)

21 years agoAdd __va_copy to talloc functions. talloc_asprintf was causing all kinds
Jim McDonough [Thu, 16 May 2002 20:06:00 +0000 (20:06 +0000)]
Add __va_copy to talloc functions.  talloc_asprintf was causing all kinds
of problems on Linux/390 systems...
(This used to be commit 2605e483b309e62b4c5d39a2ac6d8b2257bb5a87)

21 years agoAdd configure support for __va_copy, which is required on Linux/390 systems
Jim McDonough [Thu, 16 May 2002 19:59:25 +0000 (19:59 +0000)]
Add configure support for __va_copy, which is required on Linux/390 systems
when assigning on va_list to another, or when passing a va_list as an
argument to a function.  Not using it causes segv's and other unpredictable
results.

We need to check all over the place for this...
(This used to be commit 331132678c2e25e5f220de34968f6b16f4fbbc97)

21 years agoFix bug where creating a file and setting a security descriptor atomically
Jeremy Allison [Thu, 16 May 2002 18:56:26 +0000 (18:56 +0000)]
Fix bug where creating a file and setting a security descriptor atomically
that only contains an "everyone" DACL doesn't apply this to user and group
entries also.
Jeremy.
(This used to be commit 2f67f39d219bbe110d52ed2680fd8ac57946756f)

21 years agomerge from SAMBA_2_2
Gerald Carter [Thu, 16 May 2002 17:19:41 +0000 (17:19 +0000)]
merge from SAMBA_2_2
(This used to be commit d8e8f13f7231c2b2874fdca7f3600acb69e48df4)

21 years agoReturn enumerated forms as a hash of hashes instead of a list of hashes.
Tim Potter [Thu, 16 May 2002 07:32:55 +0000 (07:32 +0000)]
Return enumerated forms as a hash of hashes instead of a list of hashes.
(This used to be commit 2f86f01b88ccaaeee97588f339ebaeae5c4c06e9)

21 years agoRemoved unused variable.
Tim Potter [Thu, 16 May 2002 05:45:01 +0000 (05:45 +0000)]
Removed unused variable.
(This used to be commit 8d2f77ce956711f2afbadbeee50d82fbec9047dc)

21 years agoRenamed 'printer_name' field in python printer info to 'name' to be
Tim Potter [Thu, 16 May 2002 05:25:53 +0000 (05:25 +0000)]
Renamed 'printer_name' field in python printer info to 'name' to be
more consistent.
(This used to be commit f8c198b74899d1be1725d0647c5f0cd7db870340)

21 years agoFix memory leaks and return values in error returns for enumprinters().
Tim Potter [Thu, 16 May 2002 05:24:06 +0000 (05:24 +0000)]
Fix memory leaks and return values in error returns for enumprinters().

Return enumerated printers as a hash of hashes instead of a list of hashes.
(This used to be commit 1d0fd34d42e286fe7a41ca2d122f6bd7dc958b0a)

21 years agoFix memory leaks and return values in error returns for enumports().
Tim Potter [Thu, 16 May 2002 05:19:30 +0000 (05:19 +0000)]
Fix memory leaks and return values in error returns for enumports().

Return enumerated ports as a hash of hashes instead of a list of hashes.
(This used to be commit c469ada3d3b12b6a6e243d004faaae5f96cd3d96)

21 years agoSet exception object when enumjobs returns non-zero NT status.
Tim Potter [Thu, 16 May 2002 05:17:43 +0000 (05:17 +0000)]
Set exception object when enumjobs returns non-zero NT status.
(This used to be commit b1818eb37572f4d30efef998d926ac111e78cb48)

21 years agoFix return value for enumprinterdrivers(), getprinterdriverdir().
Tim Potter [Thu, 16 May 2002 05:16:06 +0000 (05:16 +0000)]
Fix return value for enumprinterdrivers(), getprinterdriverdir().

Set info level key in getprinterdriverdir() return info.
(This used to be commit cb4bfd39eb83efddb29b3a3bc70c2a8713f80ef2)

21 years agoShorten some debug messages.
Tim Potter [Thu, 16 May 2002 05:13:50 +0000 (05:13 +0000)]
Shorten some debug messages.
(This used to be commit 179c68bd0db7c2631fcf052a746acacedf3c47ac)