samba.git
22 years agoUse new version of open_pipe_creds() function.
Tim Potter [Mon, 27 May 2002 06:34:13 +0000 (06:34 +0000)]
Use new version of open_pipe_creds() function.

A compile fix for enumerating trusted domains.

22 years agoCheck types of dictionary elements in to_struct()
Tim Potter [Mon, 27 May 2002 06:33:33 +0000 (06:33 +0000)]
Check types of dictionary elements in to_struct()

22 years agoConvert open_pipe_creds() to use new cli_full_connection() interface.
Tim Potter [Mon, 27 May 2002 06:32:11 +0000 (06:32 +0000)]
Convert open_pipe_creds() to use new cli_full_connection() interface.

Initialise global_myname in py_samba_init() function.

22 years agoHonour return value of to_struct() when converting to Samba structures.
Tim Potter [Mon, 27 May 2002 06:29:58 +0000 (06:29 +0000)]
Honour return value of to_struct() when converting to Samba structures.

22 years agoFixed compiler warning.
Tim Potter [Mon, 27 May 2002 06:28:45 +0000 (06:28 +0000)]
Fixed compiler warning.

22 years agoFixed dodgy arguments to PyArg_ParseTupleAndKeywords()
Tim Potter [Mon, 27 May 2002 06:28:18 +0000 (06:28 +0000)]
Fixed dodgy arguments to PyArg_ParseTupleAndKeywords()

22 years agoSome rearrangement of header files.
Tim Potter [Mon, 27 May 2002 06:23:30 +0000 (06:23 +0000)]
Some rearrangement of header files.

22 years agochange: pdb_getsampwrid() ->pdb_getsampwsid()
Simo Sorce [Sun, 26 May 2002 19:11:52 +0000 (19:11 +0000)]
change: pdb_getsampwrid() ->pdb_getsampwsid()

passdb interface change, now the passdb modules will be asked for SID not for rid, the modules have been updated with a passthrough function that calls the old getsampwrid() functions.

srv_samr_nt.c functions that made use of the pdb_getsampwrid funcion has been updated to use the SID one.

22 years agoAdd support for NTLMv2 (tested!) with NTLMSSP.
Andrew Bartlett [Sun, 26 May 2002 14:59:57 +0000 (14:59 +0000)]
Add support for NTLMv2 (tested!) with NTLMSSP.

The problem was the NTLMv2 uses extra data in order to make reply/lookup
more difficult.  That extra data includes the hostname, and the domain.

This matches Win2k (sort of) by sending this information.

Win2k connects with LMCompatibilityLevel=5 without a problem.

We can change the negotiation bits if we want, this should allow us to make
NTLMv2 the default for other clients as well.

Some of the extra #defines were found in the squid source.

Andrew Bartlett

22 years agomove debug stuff from messages.c to debug.c (Elrond)
Simo Sorce [Sun, 26 May 2002 11:28:38 +0000 (11:28 +0000)]
move debug stuff from messages.c to debug.c (Elrond)

22 years agoUpdate some of the LM hash code to better respect the seperation between
Andrew Bartlett [Sat, 25 May 2002 08:24:24 +0000 (08:24 +0000)]
Update some of the LM hash code to better respect the seperation between
unix and DOS strings.

This pushes all the 'have to uppercase, must be 14 chars' stuff behind the
the interface.

Andrew Bartlett

22 years agoClean up a few unused functions, add a bit of static etc.
Andrew Bartlett [Sat, 25 May 2002 07:37:44 +0000 (07:37 +0000)]
Clean up a few unused functions, add a bit of static etc.

Importantly:

The removal of the silly 'delete user script' behaviour when secuity=domain.

I have left the name the same - as it still does the (previously documented,
but not in smb.conf(5)) sane behaviour of deleting users on request.

When we decide what to do with the 'add user' functionality, we might
rename it.

Andrew Bartlett

22 years agoOnly reterive the attributes we are actually going to use - rather than
Andrew Bartlett [Sat, 25 May 2002 07:17:38 +0000 (07:17 +0000)]
Only reterive the attributes we are actually going to use - rather than
the whole record which could include things like photos's etc.

Andrew Bartlett

22 years agoRemove unused variable, fix functions to match prototypes in the various
Andrew Bartlett [Sat, 25 May 2002 07:00:33 +0000 (07:00 +0000)]
Remove unused variable, fix functions to match prototypes in the various
structs.

Andrew Bartlett

22 years agomerge from SAMBA_2_2
Gerald Carter [Fri, 24 May 2002 19:17:27 +0000 (19:17 +0000)]
merge from SAMBA_2_2

22 years agomerge from SAMBA_2_2.
Gerald Carter [Fri, 24 May 2002 16:27:54 +0000 (16:27 +0000)]
merge from SAMBA_2_2.

Tim, please check the prs_align() removed from sec_io_desc()
and make sure it doesn't break anything else.  I know it is
right for the printing needs and I have tested some other
general things like viewing acls on directories, but I would
feel more comfortable if you would have a look as well.

jerry

22 years agoName the authentication modules, and therfore fix up both the build farm
Andrew Bartlett [Fri, 24 May 2002 13:55:05 +0000 (13:55 +0000)]
Name the authentication modules, and therfore fix up both the build farm
and secuirty=server.

I *love* automated testing...

Andrew Bartlett

22 years agoSome grammar fixes picked up from the bugs.debian.org, submitted by
Andrew Bartlett [Fri, 24 May 2002 13:24:58 +0000 (13:24 +0000)]
Some grammar fixes picked up from the bugs.debian.org, submitted by
jrv@vanzandt.mv.com

Most of them didn't apply any more, but the bits that did I've commited.

Andrew Bartlett

22 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

22 years agoFixed incorrect comment.
Tim Potter [Fri, 24 May 2002 05:50:31 +0000 (05:50 +0000)]
Fixed incorrect comment.

22 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

22 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).

22 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.

22 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.

22 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.

22 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.

22 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.

22 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.

22 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?

22 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

22 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...)

22 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

22 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.

22 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.

22 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.

22 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.

22 years agoGot gdb and gpl confused. (-:
Tim Potter [Wed, 22 May 2002 23:31:44 +0000 (23:31 +0000)]
Got gdb and gpl confused.  (-:

22 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.

22 years agoRemove horrid goto.
Jeremy Allison [Wed, 22 May 2002 20:54:26 +0000 (20:54 +0000)]
Remove horrid goto.
Jeremy.

22 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

22 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

22 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

22 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

22 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

22 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

22 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.

22 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.

22 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.

22 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.

22 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.

22 years agotypo day :-(
Simo Sorce [Tue, 21 May 2002 15:04:05 +0000 (15:04 +0000)]
typo day :-(

22 years agotypo, sorry
Simo Sorce [Tue, 21 May 2002 13:49:08 +0000 (13:49 +0000)]
typo, sorry

22 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 :-)

22 years agodebug classized
Simo Sorce [Tue, 21 May 2002 07:53:28 +0000 (07:53 +0000)]
debug classized

22 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.

22 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.

22 years agoMerge from 2.2.
Jeremy Allison [Mon, 20 May 2002 19:21:06 +0000 (19:21 +0000)]
Merge from 2.2.
Jeremy.

22 years agomerge from SAMBA_2_2
Gerald Carter [Mon, 20 May 2002 16:55:00 +0000 (16:55 +0000)]
merge from SAMBA_2_2

22 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()

22 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().

22 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.

22 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.

22 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.

22 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!

22 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.

22 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()

22 years agoSpelling fix.
Tim Potter [Sun, 19 May 2002 12:07:21 +0000 (12:07 +0000)]
Spelling fix.

22 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.

22 years agoFixed compiler warning.
Tim Potter [Sun, 19 May 2002 11:21:28 +0000 (11:21 +0000)]
Fixed compiler warning.

22 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 ...

22 years agoKeep the compiler happy
Andrew Bartlett [Sun, 19 May 2002 02:28:14 +0000 (02:28 +0000)]
Keep the compiler happy

22 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

22 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

22 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

22 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

22 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.

22 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

22 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.

22 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

22 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)

22 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

22 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!

22 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.

22 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.

22 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.

22 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?)

22 years agoAdd a touch of const
Andrew Bartlett [Fri, 17 May 2002 14:26:20 +0000 (14:26 +0000)]
Add a touch of const

22 years agoCheck paramters for NULL.
Andrew Bartlett [Fri, 17 May 2002 14:23:43 +0000 (14:23 +0000)]
Check paramters for NULL.

22 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.

22 years agoindent
Andrew Bartlett [Fri, 17 May 2002 14:15:47 +0000 (14:15 +0000)]
indent

22 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

22 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.

22 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

22 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

22 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

22 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.

22 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.

22 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.

22 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 ...

22 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.