1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

958 Commits

Author SHA1 Message Date
Andrew Bartlett
dbee612f71 Change the passdb interface to use allocated strings.
These strings are allocated using talloc(), either using its own memory context
stored on the SAM_ACCOUNT or one supplied by the caller.

The pdb_init_sam() and pdb_free_sam() function have been modifed so that a call
to pdb_free_sam() will either clean up (remove hashes from memory) and destroy
the TALLOC_CTX or just clean up depending on who supplied it.

The pdb_init_sam and pdb_free_sam functions now also return an NTSTATUS, and I
have modified the 3 places that actually checked these returns.

The only nasty thing about this patch is the small measure needed to maintin
interface compatability - strings set to NULL are actually set to "".

This is becouse there are too many places in Samba that do strlen() on these
strings without checking if they are NULL pointers.

A supp patch will follow to set all strings to "" in pdb_default_sam().

Andrew Bartlett
(This used to be commit 144345b41d)
2002-01-15 01:02:13 +00:00
Jeremy Allison
c9d350a736 Added PRINTER_INFO_4/PRINTER_INFO_5, we're seeing level 5 requested on the wire... so.
Jeremy.
(This used to be commit b63b762978)
2002-01-12 02:37:54 +00:00
Jeremy Allison
1d40138232 Round and round we go....
Jeremy.
(This used to be commit 2603ab3c68)
2002-01-11 23:33:12 +00:00
Martin Pool
f5bc0e92a6 Better explanation message for dmalloc.
Also more insertion of parenthesis to handle struct members called
'free'.

You can now get useful dmalloc output, as long as it is compatible
with your C library.  On RH7.1 it looks like you have to rebuild
dmalloc to allow free(0) by default, because something in libcrypt
does that. (sigh)
(This used to be commit 391cbb6901)
2002-01-09 07:52:51 +00:00
Jeremy Allison
a842a3d458 When re-writing tdb version numbers as little endian int32, we must
change the version number also.
Jeremy.
(This used to be commit 3dec9cf99a)
2002-01-09 05:24:07 +00:00
Jeremy Allison
91536cc901 Fixed all uses of tdb_fetch/store/_int to use explicit int32 little endian
in tdb's. All except winbindd_idmap.... Hmmmmmm.
Jeremy.
(This used to be commit ec71f1732b)
2002-01-09 04:13:30 +00:00
Jeremy Allison
4702494dce Added get_called_name() function, which replaces global_myname in printing
code (one less global, hurrah !) - to allow NetBIOS aliasing to be used
with point and print.
Jeremy.
(This used to be commit 10d72f0b01)
2002-01-08 00:46:56 +00:00
Andrew Bartlett
2e28f8ff0e I've decided to move the auth code around a bit more...
The auth_authsupplied_info typedef is now just a plain struct - auth_context,
but it has been modified to contain the function pointers to the rest
of the auth subsystem's components.

(Who needs non-static functions anyway?)

In working all this mess out, I fixed a number of memory leaks and moved the
entire auth subsystem over to talloc().

Note that the TALLOC_CTX attached to the auth_context can be rather long-lived,
it is provided for things that are intended to live as long.  (The
global_negprot_auth_context lasts the whole life of the smbd).

I've also adjusted a few things in auth_domain.c, mainly passing the domain as
a paramater to a few functions instead of looking up lp_workgroup().  I'm
hopign to make this entire thing a bit more trusted domains (as PDC) freindly
in the near future.

Other than that, I moved a bit of the code around, hence the rather messy diff.

Andrew Bartlett
(This used to be commit 12f5515f55)
2002-01-05 04:55:41 +00:00
Jeremy Allison
eca99f5c22 Fixed nasty cast of tdb_delete in traversals.
Jeremy.
(This used to be commit a0cdec3acc)
2002-01-03 22:48:48 +00:00
Andrew Bartlett
a3f891dbd2 Actually enforce the passdb API.
Thou shalt not reference SAM_ACCOUNT members directly - always use
pdb_get/pdb_set.

This is achived by making the whole of SAM_ACCOUNT have a .private member,
where the real members live.  This caught a pile of examples, and these have
beeen fixed.

The pdb_get..() functions are 'const' (have been for some time) and this
required a few small changes to constify other functions.

I've also added some debugs to the pdb get and set, they can be removed if
requested.

I've rewritten the copy_id2x_to_sam_pass() functions to use the new passdb
interface, but I need the flags info to do it properly.

The pdb_free_sam() funciton now blanks out the LM and NT hashes, and as such
I have removed many extra 'samr_clear_sam_passwd(smbpass)' calls as a result.

Finally, any and all testing is always appriciated - but the basics seem to
work.

Andrew Bartlett
(This used to be commit d3dd28f6c4)
2002-01-02 07:41:54 +00:00
Jeremy Allison
71f982c9f2 Make user enumeration work for w2k and win9x.
This means different return sizes depending on client bugs. This sucks :-(.
Jeremy.
(This used to be commit f6592628eb)
2002-01-02 07:27:33 +00:00
Andrew Bartlett
6694109c04 Named constants are always much better than magic numbers...
(I defined the constants when I put in 'net rpc shutdown')

Andrew Bartlett
(This used to be commit 4d90cc1d99)
2002-01-01 00:18:47 +00:00
Jeremy Allison
38851c64d9 last_enum not used.
Jeremy.
(This used to be commit efbec935fe)
2001-12-31 23:24:48 +00:00
Jeremy Allison
120607cab1 Fixed enumeration of a large (<1500) users from a Samba PDC to a W2k
member server. Firstly, use the same max enumeration size (0x400) as W2K
uses, otherwise W2K won't ask for any more. Secondly, if a enumeration
request with a non-zero offset comes in on a handle that hasn't started
an enumeration, don't bitch about it (return NT_STATUS_UNSUCCESSFUL),
just load the db on that handle and return at that offset.
Jeremy.
(This used to be commit 0b7da4a50e)
2001-12-31 22:37:51 +00:00
Andrew Tridgell
eb4e101153 - portablitity fixes for cc -64 on irix
- fixed gid* bug in rpc_server
(This used to be commit 48aa90c48c)
2001-12-31 13:46:26 +00:00
Gerald Carter
04aff47c71 moving SAM_ACCOUNT to include a bit field for initialized
members (such as uid and gid).  This way we will be able to
keep ourselves from writing out default smb.conf settings when
the admin doesn't want to,  That part is not done yet.

Tested compiles with ldap/tdb/smbpasswd.  Tested connection with smbpasswd
backend.

oh...and smbpasswd doesn'y automatically expire accounts after 21 days
from the last password change either now.  Just ifdef'd out that code
in build_sam_account().

Will merge updates into 2.2 as they are necessary.




jerry
(This used to be commit f0d4379115)
2001-12-27 06:38:04 +00:00
Jeremy Allison
7478d27e70 Removed unused variables.
Jeremy.
(This used to be commit 621fa227bd)
2001-12-21 23:28:04 +00:00
Jeremy Allison
e1e64a26fa The jf_get_sampasswd_entries() is not used anymore.
Jeremy.
(This used to be commit bf18160997)
2001-12-21 23:25:32 +00:00
Jean-François Micouleau
1acf4f67a2 added a copyright notice.
J.F.
(This used to be commit 87928c4d91)
2001-12-21 22:54:53 +00:00
Jean-François Micouleau
0e550b2c11 doesn't keep track of the struct's size we enumerate. W2K doesn't
calculate them and always reply a size of 32 bytes whereas NT4 did the
maths. Anyway, it looks like the clients don't complain.

in query_dom_info() at level 2, return the real number of users and
groups. That's the fix to the W95/98 userlist bug !

as W95/98 does a query_dom_info(2) followed by a query_disp_info(4) on
the SAME context handle (err we call it an lsa policy handle ! plain
wrong name), I was tempted to keep the snapshoot in memory, to prevent
2 full user db enumerations in a row and just have one shared. But if some
client does the 2 calls on two different handles, we would have 2 copies
in memory not free'ed before the samr_close().

We still have too many fixed constant and too many magic values in that
code. And btw, I really hates how the sequence number is generated !

        J.F.
(This used to be commit c0178e1a03)
2001-12-21 22:34:49 +00:00
Jeremy Allison
5829284a07 Fixup some DEBUG statements (0 -> 10).
Jeremy.
(This used to be commit bf65331cb4)
2001-12-21 22:27:20 +00:00
Jeremy Allison
fff44cc700 Use pdb_free_sam() to free a SAM_ACCOUNT struct, not safe_free(). There
are pointers withing the SAM_ACCOUNT struct that also need freeing.
Jeremy.
(This used to be commit a7d099cc75)
2001-12-21 19:34:32 +00:00
Jean-François Micouleau
595dd01507 re-done all of samr_query_disp_info()
instead of enumerating the whole user db or group db every time, we store
a in memory copy linked to the handle.

that's much faster for large enumeration where the db can't fit in a
single rpc packet. And as it's a copy, it's constant between enumeration.

still some stuff to clean. But now I can fix the W95 userlist bug, as I've
finally found it.

	J.F.
(This used to be commit 3ab4521536)
2001-12-21 13:36:14 +00:00
Martin Pool
bf65820af2 Add an output parameter to message_send_all that says how many
messages were sent, so you know how many replies to expect.

Const and doc religion.
(This used to be commit 22e510ea0d)
2001-12-21 00:37:49 +00:00
Jean-François Micouleau
ea274ac97f added info level 1 to samr_query_alias()
(This used to be commit 589aa4fe22)
2001-12-19 00:15:29 +00:00
Jeremy Allison
dccc1ed3f8 Fixup JF's weird SID return :-).
Jeremy
(This used to be commit 7b8fb8d85c)
2001-12-18 19:44:14 +00:00
Tim Potter
140f1ccf1f Fixed bad args to debug statements.
(This used to be commit 5e0f0716ca)
2001-12-18 05:00:07 +00:00
Jeremy Allison
5d3b81dede I'm pretty sure we need to return our netbios name for LSA_QUERY_INFO
level 5 when we're a standalone server. This makes the security dialogs
return correct info. JF - please check !
Jeremy.
(This used to be commit dd13daf52b)
2001-12-18 02:17:46 +00:00
Jean-François Micouleau
e611111732 in lsa_query_info at level 5 in member mode, we must reply our machine
name and not our domain name.

I thought it has been already fixed !

	J.F.
(This used to be commit 1fbb01868b)
2001-12-18 00:32:45 +00:00
Jean-François Micouleau
6e76486505 there is no unknown field in LSA_SEC_QOS
some cleanup of the lsa_open_policy and lsa_open_policy2 parser. the
length fields are not correct but that's what NT send. We don't anymore
underflow or overflow the decoding.

added the domain admins group to the default SD.

we are now checking the desired access flag in the lsa_open_policy_X()
calls and in most functions also.

        J.F.
(This used to be commit a217c4e4ff)
2001-12-17 23:03:23 +00:00
Gerald Carter
abcd1cad3a ChangeID fixe from APPLIANCE_HEAD
(This used to be commit 096d06a961)
2001-12-14 20:38:04 +00:00
Jean-François Micouleau
689144c631 add lsa_query_secobj server code. level 4 is the ACL, level 1 is the
owner. that's basic stuff.

got the POLICY_ define from TNG but they are also in an include file in
the NT SDK.

	J.F.
(This used to be commit 84289a9bf4)
2001-12-14 17:31:48 +00:00
Tim Potter
14d7f43590 FALSE -> False
(This used to be commit dbdbf7cd07)
2001-12-14 04:43:31 +00:00
Gerald Carter
4ad930ad5e merge from appliance_head
(This used to be commit 423554fd71)
2001-12-13 16:35:43 +00:00
Jean-François Micouleau
0ff1a9568b added info level 3 to samrgetgroupinfo. I don't know what the value is.
It's just to keep usermanager happy ;-)

clean up a bit samr_query_aliasinfo to return the group description

added: samr_del_aliasmem, samr_del_groupmem and samr_del_domuser

with the correct scripts, you can now entirely manage the users from
usermanager ! Closer to full PDC every day ;-)

        J.F.
(This used to be commit 0a727afc66)
2001-12-10 15:03:16 +00:00
Tim Potter
4f53486d78 Added client and server code for the GetPrintProcessorDirectory SPOOLSS
rpc.  This was supposed to fix a printer driver download bug but it didn't
but it seemed a shame to trash all this code so I'm commiting it #ifdef'ed
out in case someone needs it one day.
(This used to be commit bef4365647)
2001-12-10 05:03:17 +00:00
Jean-François Micouleau
6490fbce6b small comment I don't want to loose.
J.F.
(This used to be commit a0b5ae5822)
2001-12-08 23:57:35 +00:00
Jean-François Micouleau
139c46eced Fix domain logon that I broke 3 days ago.
And it's in sync with the docs, %U is really replaced by the name the user
asked. Whereas in 2.2 that's false, %U is replaced by the name the user
was mapped to.

	J.F.
(This used to be commit 39f2b23347)
2001-12-08 23:56:58 +00:00
Jean-François Micouleau
e0066d2dd4 again an intrusive patch:
- removed the ugly as hell sam_logon_in_ssb variable, I changed a bit the
definition of standard_sub_basic() to cope with that.

- removed the smb.conf: 'domain admin group' and 'domain guest group'
parameters ! We're not playing anymore with the user's group RIDs !

- in get_domain_user_groups(), if the user's gid is a group, put it first
in the group RID list.

I just have to write an HOWTO now ;-)

        J.F.
(This used to be commit fef52c4b96)
2001-12-06 13:09:15 +00:00
Jean-François Micouleau
7b53a92f59 added samr_queryuseralias(). instead of returning BUILTIN_ALIAS_RID_USERS,
now return the alias correctly.

time to look at the netlogon case.

	J.F.
(This used to be commit 72ee179108)
2001-12-05 15:41:44 +00:00
Andrew Tridgell
95a21460b7 fixed a return value
(This used to be commit 56bdb152d8)
2001-12-05 11:32:25 +00:00
Jeremy Allison
105f8a1a0f Use print_queue_length() by preference if we don't need a queue
as it doesn't do a traversal.
Jeremy.
(This used to be commit 4bf4ee3f14)
2001-12-05 02:11:03 +00:00
Jeremy Allison
5472638730 Improved efficiency of enumerating print queue's under a particular
extreme condition...
Jeremy.
(This used to be commit 425bb0f405)
2001-12-05 00:54:33 +00:00
Jean-François Micouleau
922eb763d7 added a boolean to the group mapping functions to specify if we need or
not the privileges. Usually we don't need them, so the memory is free
early.

lib/util_sid.c: added some helper functions to check an SID.

passdb/passdb.c: renamed local_lookup_rid() to local_lookup_sid() and pass
an RID all the way. If the group doesn't exist on the domain SID,
don't return a faked one as it can collide with a builtin one. Some rpc
structures have been badly designed, they return only rids and force the
client to do subsequent lsa_lookup_sid() on the domain sid and the builtin
sid !

rpc_server/srv_util.c: wrote a new version of get_domain_user_groups().
Only the samr code uses it atm. It uses the group mapping code instead of
a bloody hard coded crap. The netlogon code will use it too, but I have to
do some test first.

	J.F.
(This used to be commit 6c87e96149)
2001-12-04 21:53:47 +00:00
Jean-François Micouleau
cdf9b42754 added a tdb to store the account policy informations.
You can change them with either usermanager->policies->account
or from a command prompt on NT/W2K: net accounts /domain

we can add a rpc accounts to the net command. As the net_rpc.c is still
empty, I did not start. How should I add command to it ? Should I take the
rpcclient/cmd_xxx functions and call them from there ?

alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more
for jeremy ;-)

        J.F.
(This used to be commit bc28a8eebd)
2001-12-03 17:14:23 +00:00
Jean-François Micouleau
633ee99afa added queryuseraliases to rpcclient
and some comments to the samr server code, to explain what we should
return here.

	J.F.
(This used to be commit 06cb20a46d)
2001-12-02 01:45:50 +00:00
Jean-François Micouleau
043dfe985c there was a bug in samr_lookup_names (my fault)
and added comments and some debugs.

	J.F.
(This used to be commit 114eba496f)
2001-12-02 00:06:10 +00:00
Gerald Carter
9cc8cb5134 merge from APPLIANCE_HEAD
(This used to be commit f8b18b2594)
2001-11-30 20:33:35 +00:00
Jeremy Allison
605248abd9 Check error returns.
Jeremy.
(This used to be commit fc8638e89e)
2001-11-30 03:45:21 +00:00
Jeremy Allison
445ab75ec3 Gerald's fix.
Jeremy
(This used to be commit b0c1fcfc8b)
2001-11-30 03:38:59 +00:00
Tim Potter
6d9adfe73c Renamed sid field in SEC_ACE to trustee to be more in line with MS's
definitions.
(This used to be commit 9712d3f15a)
2001-11-30 01:04:15 +00:00
Jean-François Micouleau
fac01bda8b Changed again how the privilege list is handled in the group mapping code.
This time it's a PRIVILEGE_SET struct instead of a simple uint32 array. It
makes much more sense. Also added a uint32 systemaccount to the GROUP_MAP
struct as some privilege showing in USRMGR.EXE are not real privs but a
bitmask flag. I guess it's an heritage from NT 3.0 ! I could setup an NT
3.1 box to verify, but I'm too lazy (yes I still have my CDs).

Added 3 more LSA calls: SetSystemAccount, AddPrivileges and
RemovePrivileges, we can manage all this privilege from UserManager.

Time to change the NT_USER_TOKEN struct and add checks in all the rpc
functions. Fun, fun, fun.

        J.F.
(This used to be commit 3f0a9ef2b8)
2001-11-29 16:05:05 +00:00
Gerald Carter
bd8e916cb5 merge from APPLIANCE_HEAD
(This used to be commit c60aa6c06f)
2001-11-28 21:51:11 +00:00
Jean-François Micouleau
e158c4123d added samr_set_domain_info and samr_unknown_2E.
We now get the full account policy window in usermanager, and the
framework to store all those values. I plan to add a TDB file to store
them.

oh, and found that the last value in a sam_unknown_info_12_inf struct is
an uint16 and not a uint32.

andrewb: you hardcoded the MAX_PASSWORD_AGE to 21 days. We can now turn it
to a value setable in usermanager.

        J.F.
(This used to be commit 99471d2569)
2001-11-28 00:06:00 +00:00
Jeremy Allison
d919314390 Added PRINTER_ALREADY_EXISTS error check from Gerry.
Jeremy
(This used to be commit c7f1d3d6f7)
2001-11-27 20:01:23 +00:00
Tim Potter
178f6a64b2 challange -> challenge
(This used to be commit d6318add27)
2001-11-26 04:05:28 +00:00
Andrew Bartlett
97346ea795 Unless the error is exactly NT_STATUS_OK, we might not have a server info, so
we need to bail here.
(This used to be commit ea0331354e)
2001-11-25 02:30:30 +00:00
Andrew Bartlett
d0a2faf78d This is another rather major change to the samba authenticaion
subystem.

The particular aim is to modularized the interface - so that we
can have arbitrary password back-ends.

This code adds one such back-end, a 'winbind' module to authenticate
against the winbind_auth_crap functionality.  While fully-functional
this code is mainly useful as a demonstration, because we don't get
back the info3 as we would for direct ntdomain authentication.

This commit introduced the new 'auth methods' parameter, in the
spirit of the 'auth order' discussed on the lists.  It is renamed
because not all the methods may be consulted, even if previous
methods fail - they may not have a suitable challenge for example.

Also, we have a 'local' authentication method, for old-style
'unix if plaintext, sam if encrypted' authentication and a
'guest' module to handle guest logins in a single place.

While this current design is not ideal, I feel that it does
provide a better infrastructure than the current design, and can
be built upon.

The following parameters have changed:
 - use rhosts =

  This has been replaced by the 'rhosts' authentication method,
 and can be specified like 'auth methods = guest rhosts'

 - hosts equiv =

  This needs both this parameter and an 'auth methods' entry
  to be effective.  (auth methods = guest hostsequiv ....)

 - plaintext to smbpasswd =

  This is replaced by specifying 'sam' rather than 'local'
  in the auth methods.

The security = parameter is unchanged, and now provides defaults
for the 'auth methods' parameter.

The available auth methods are:

guest
rhosts
hostsequiv
sam (passdb direct hash access)
unix (PAM, crypt() etc)
local (the combination of the above, based on encryption)
smbserver (old security=server)
ntdomain (old security=domain)
winbind (use winbind to cache DC connections)


Assistance in testing, or the production of new and interesting
authentication modules is always appreciated.

Andrew Bartlett
(This used to be commit 8d31eae52a)
2001-11-24 12:12:38 +00:00
Andrew Bartlett
af1a0238aa Kill off that crazy copy_sam_passwd(). You simply can't do that if the
structre contains pointers (well not if you intend of free those pointers
at some stage)

There is no reason (given the new passdb interface) that you can't modify a
SAM_ACCOUNT in any case.

Andrew Bartlett
(This used to be commit e8e73f7f0f)
2001-11-24 00:36:37 +00:00
Jeremy Allison
b9a82592f6 Sorry. I broke the build, missed on open_directory call.
Jeremy.
(This used to be commit fe288b14cc)
2001-11-23 19:07:35 +00:00
Jean-François Micouleau
7e1dce1de8 return NO_MORE_ENTRIES in lsa_enum_trust_dom. UserManager is happier :-)
J.F.
(This used to be commit 75ee50bbef)
2001-11-23 15:17:30 +00:00
Jean-François Micouleau
2527f5ef52 Changed how the privileges are stored in the group mapping code. It's now
an array of uint32. That's not perfect but that's better.

Added more privileges too.

Changed the local_lookup_rid/name functions in passdb.c to check if the
group is mapped. Makes the LSA rpc calls return correct groups

Corrected the return code in the LSA server code enum_sids.

Only enumerate well known aliases if they are mapped to real unix groups.
Won't confuse user seeing groups not available.

Added a short/long view to smbgroupedit.

now decoding rpc calls to add/remove privileges to sid.

        J.F.
(This used to be commit f29774e589)
2001-11-23 15:11:22 +00:00
Jean-François Micouleau
fbfd27a495 added lsa_enum_sids to rpcclient
fixed lsa_enum_rpivs server code. This time it works as W2K.
fixed smbgroupedit to compile and work.

	J.F.
(This used to be commit 646651018a)
2001-11-22 23:50:16 +00:00
Jean-François Micouleau
b09d9e3dc5 fixing enum_privs and get_dispname server code.
That works as expected now.

	J.F.
(This used to be commit f2766932d6)
2001-11-22 17:19:59 +00:00
Jean-François Micouleau
2e8ae88785 add a command to rpcclient: enumprivs
J.F.
(This used to be commit fa63cb78e3)
2001-11-22 16:12:43 +00:00
Gerald Carter
59b2e772e2 remove unused variables
(This used to be commit 90ed3d47e1)
2001-11-22 06:44:05 +00:00
Gerald Carter
116740a5df merge from 2.2
(This used to be commit 96b3a65a73)
2001-11-22 05:56:09 +00:00
Martin Pool
f741f65673 Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da)
2001-11-19 02:49:53 +00:00
Tim Potter
06ff349e21 FALSE -> False
(This used to be commit 7c6529c081)
2001-11-15 05:26:22 +00:00
Gerald Carter
e3abad1741 Fixed a few typos and added the opnum for ADDPRINTERDRIVEREX to the
rpc_spoolss.h header file.
(This used to be commit d4cafc076b)
2001-11-09 20:59:18 +00:00
Andrew Bartlett
395aa946cd This change updates lp_guestaccount() to be a *global* paramater, rather than
per-share.  I beleive that almost all the things that this could have done on
a per-share basis can be done with other tools, like 'force user'.

Almost all the user's of this paramater used it as a global anyway...

While this is one step at a time, I hope it will allow me to considerably
simplfy the make_connection() code, particularly for the user-level security
case.

This already removes an absolute truckload of extra attempted password lookups
on the guest account.

Andrew Bartlett
(This used to be commit 8e708332ed)
2001-11-09 11:16:06 +00:00
Andrew Bartlett
55dfb66079 Change to guest logon code.
This changes the way we process guest logons - we now treat them as normal
logons, but set the 'guest' flag.  In particular this is needed becouse Win2k
will do an NTLMSSP login with username "", therefore missing our previous guest
connection code - this is getting a pain to do as a special case all over the
shop.

Tridge:  We don't seem to be setting a guest bit for NTLMSSP, in either the
anonymous or authenticated case, can you take a look at this?

Also some cleanups in the check_password() code that should make some of the
debugs clearer.

Various other minor cleanups:

 - change the session code to just take a vuser, rather than having to do a
   vuid lookup on vuser.vuid

 - Change some of the global_client_caps linking

 - Better debug in authorise_login(): show the vuid.

Andrew Bartlett
(This used to be commit 62f4e4bd0a)
2001-11-08 22:19:01 +00:00
Andrew Bartlett
848d01cde5 Initilising these variables before appending the domain groups to them
(This used to be commit 8004cfea19)
2001-11-07 02:16:22 +00:00
Jeremy Allison
198612deda Changed MAX_OPEN_PIPES to 2048.
Jeremy.
(This used to be commit 591d217ed4)
2001-11-05 07:42:55 +00:00
Tim Potter
7623cec4ad Wrote some stubs for new win2k only spoolss rpc commands:
GetPrinterDataEx() and SetPrinterDataEx().  Not sure what the command
number is for the latter is - I haven't seen it on the wire yet.
(This used to be commit 87614c74b3)
2001-11-05 06:15:02 +00:00
Tim Potter
d876260d88 Don't put a \n on the end of the arg to exit_server()
(This used to be commit dfb8566220)
2001-11-05 00:02:38 +00:00
Andrew Bartlett
5f5661d217 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 caae69fcd0)
2001-11-04 01:14:15 +00:00
Jeremy Allison
f8e2baf39e 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 ee5e7ca547)
2001-11-03 23:34:24 +00:00
Andrew Bartlett
acb81fe408 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 514c91b16b)
2001-11-01 05:02:41 +00:00
Andrew Bartlett
be93100240 Fix up domain logons. Tested with NT4.
(This used to be commit c8b2718adf)
2001-10-31 12:07:59 +00:00
Andrew Bartlett
abaedd04f2 ... and clean up the unused variables.
(This used to be commit e0b56a3148)
2001-10-31 11:10:29 +00:00
Andrew Bartlett
b49b7ed1fb Small changes for guest authenticated pipes.
(This used to be commit 813bf962ae)
2001-10-31 11:09:21 +00:00
Andrew Bartlett
60f0627afb 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 f70fb819b2)
2001-10-31 10:46:25 +00:00
Tim Potter
6f0b8a38ec 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 4eeb7bcd78)
2001-10-31 06:20:58 +00:00
Andrew Bartlett
d9d7f023d8 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 c95f5aeb93)
2001-10-29 07:35:11 +00:00
Andrew Bartlett
2038649e51 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 e7634f81c5)
2001-10-29 07:28:32 +00:00
Andrew Bartlett
ab5d5cfbe0 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 a8971a5448)
2001-10-29 07:15:51 +00:00
Jeremy Allison
d04824639d Raise simultaneous open pipes from 64 to 1024 for large print server
environments.
Jeremy.
(This used to be commit e5f8147d02)
2001-10-27 07:16:48 +00:00
Jeremy Allison
c416ff851b Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.
Ensure make_conection() can only be called as root.
Jeremy.
(This used to be commit 8d23a7441b)
2001-10-18 20:15:12 +00:00
Jean-François Micouleau
375dcb9a8b Fix some unicode string error.
I'm wondering if I have to audit *all* the rpc code for that kind of
trouble ;-) Oh well I've done it twice already, I can do it a third time
;-)

	J.F.
(This used to be commit 6be8ea28f9)
2001-10-16 22:42:24 +00:00
Jeremy Allison
de2ece0543 Back-out the share acl fix. Not needed (Gerald has been telling porkies
again :-) :-).
Jeremy.
(This used to be commit 3b56239c51)
2001-10-10 19:36:53 +00:00
Jeremy Allison
a2272cb71f Fix bug where removing root from a share SD stops further edit access.
Jeremy.
(This used to be commit 4d57c7520f)
2001-10-09 21:22:33 +00:00
Jeremy Allison
ed94aa9d61 Fixes from John Trostel (modified somewhat by me) to ensure that all lookup_XX
functions correctly deal with the SID_NAME_TYPE. One fix for connection user
lookup in LSA.
Jeremy.
(This used to be commit 29730027d8)
2001-10-09 20:54:56 +00:00
Simo Sorce
a42efb4971 fix some possible memleaks and not tested reallocs spotted by Andreas Moroder
(This used to be commit d30939a091)
2001-10-03 21:10:29 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Andrew Bartlett
81697d5ebe Fix up a number of intertwined issues:
The big one is a global change to allow us to NULLify the free'ed pointer to a
former passdb object.  This was done to allow idra's SAFE_FREE() macro to do
its magic, and to satisfy the input test in pdb_init_sam() for a NULL pointer
to start with.

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

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

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

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

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

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

Andrew Bartlett
(This used to be commit 762c8758a7)
2001-09-29 13:08:26 +00:00
Andrew Bartlett
2a9cd3b79a Fix memory leak in get_sampwd_entries(), reindent for clarity.
- call pdb_reset_sam() after each getent call.

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

Fix pdb_reset_sam() to correctly initalise the sam structure.

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

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

Andrew Bartlett
(This used to be commit a41fb44f5e)
2001-09-27 09:13:26 +00:00
Andrew Bartlett
d74d82bddc Make use of the pdb_set_plaintext_passwd() update to vastly simplify
decode_pw_buffer() and the samr password changing routines.

And yes, I know that we can lost some information in the Unicode->UTF->Unicode
bit of this, but its worth the code cleanup.

This also takes into account the possability of multibyte passwords.

Andrew Bartlett
(This used to be commit 42402c87d6)
2001-09-26 11:51:25 +00:00
Andrew Bartlett
6744ca0a36 More updates to prevent account-guessing.
This moves the check that ensures that the account being looked up is the same
account as the machine logged in as to the front, before we even start with
passdb.

Merge for 2.2.2?

Andrew Bartlett
(This used to be commit f7ed0ecc14)
2001-09-26 11:13:55 +00:00
Jeremy Allison
0f4281b9b4 Added Elrond patch to make se_access_check use NT datastructures, not Samba.
Jeremy.
(This used to be commit bca6419447)
2001-09-26 00:05:03 +00:00
Jeremy Allison
008ba27b28 Fixed enumeration of large numbers of groups from a Samba DC.
Tidied up debug messages in lib/messages.c
Jeremy.
(This used to be commit dfb58f2276)
2001-09-25 00:50:37 +00:00
Andrew Tridgell
80ad52d5c2 fixed character set for user name pull
(This used to be commit 374f76fa2d)
2001-09-21 13:22:22 +00:00
Andrew Bartlett
01529e340c fix debug
(This used to be commit d103371e80)
2001-09-19 02:53:14 +00:00
Andrew Bartlett
36939fcd24 Reverse some of the breakage I commited a day or two ago, as we need to
fill out the user_info struct (otherwise we don't have a vuid for
make_connection()).

Also add a become_user() call, becouse it really looks like it was missing
(we must pass it anyway to finish make_connection()).

Is there any reason not to be the user when reading an ACL?

Finally, fix up some formatting to show that the two functions are almost
identical.

Andrew Bartlett
(This used to be commit 00c667c0ad)
2001-09-19 02:28:15 +00:00
Simo Sorce
87945989c0 move to SAFE_FREE()
(This used to be commit 5ceecc7bef)
2001-09-17 10:26:23 +00:00
Andrew Bartlett
6ff605c283 Minor tidy-up.
(This used to be commit dbb21aedbf)
2001-09-16 07:32:06 +00:00
Andrew Bartlett
dec3cbcaf0 Fix up workstaion and kickoff time checks, moved to auth_smbpasswd.c where
they can have general effect.

Fixed up workstaion support in the rest of samba, so that we can do these
checks.

Pass through the workstation for cli_net_logon(), if supplied.
(This used to be commit 7f04a139b2)
2001-09-16 06:35:35 +00:00
Andrew Bartlett
06ccf1e499 Looks like it missed these. make_connection now no longer takes a 'username'
argument.
(This used to be commit 0e1322227b)
2001-09-15 23:32:19 +00:00
Andrew Bartlett
7892c494e7 Kill off the //server/share%user hack in share level security.
This should help make much of this code simpiler.

Andrew Bartlett
(This used to be commit fb0c3629c3)
2001-09-15 12:55:59 +00:00
Gerald Carter
bd7595ec37 merge from appliance_head
(This used to be commit f70b1707e4)
2001-09-14 15:22:49 +00:00
Andrew Bartlett
cbd99a13c5 Finally commit my fix to this little mess...
The same function that adds machines to the system also adds users, and the
new 'add user script'/'add machine script' distinction needs to be made
correctly.  Also introduces a sainity check for correct $ termination.

Andrew Bartlett
(This used to be commit ef377ea0cc)
2001-09-14 10:31:39 +00:00
Tim Potter
b800a36b1c Some patches to authentication:
- the usersupplied_info now contains a smb_username (as it comes across on
   the wire) and a unix_username (after being passed through mapping
   functions)

 - when doing security={server,domain} use the smb_username, otherwise use
   the unix_username
(This used to be commit d34fd8ec07)
2001-09-12 06:39:50 +00:00
Andrew Tridgell
39d7983a47 - enable MSDFS by default, there seems no reason not to have it enabled
by default in Samba 3.x

- got rid of some unused parameters in Makefile.in

- declare DEBUGLEVEL in debug.h rather than in each file
(This used to be commit b8651acb9c)
2001-09-12 03:08:51 +00:00
Tim Potter
a39d4c052c Converted DFS error returns to WERROR instead of uint32.
(This used to be commit 97286570ef)
2001-09-12 01:14:03 +00:00
Gerald Carter
cae476a1a2 cut-n-paste error
(This used to be commit b2ed211df0)
2001-09-10 19:30:34 +00:00
Gerald Carter
c113b5196f merge from APPLIANCE_HEAD
(This used to be commit 55bd514c45)
2001-09-10 19:29:00 +00:00
Andrew Tridgell
9a9ac2739b got rid of USE_TDB_MMAP_FLAG as its not needed any more
(This used to be commit c26e0d3f27)
2001-09-06 22:08:19 +00:00
Tim Potter
b31055fa74 Logon workstation checks from Toomas Soome <tsoome@ut.ee>
Fixed compile warning.
(This used to be commit 3eee665165)
2001-09-06 05:24:37 +00:00
Andrew Tridgell
b04933dfbb a fix for fussy compilers
(This used to be commit 78f437b507)
2001-09-04 11:18:50 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
fbc1f326f4 more NTSTATUS/WERROR conversion
(This used to be commit ad648c5cd8)
2001-09-03 10:38:13 +00:00
Andrew Tridgell
fd6ea43161 the next step in our error code handling change
- added WERROR for win32 error codes
- added a configure test for immediate structures

still lots to do, so its not enabled by default, but the main
structure is there
(This used to be commit 24f9ab683d)
2001-09-03 08:50:59 +00:00
Tim Potter
cd0a9f6fcc Send a MSG_SMB_SAM_SYNC when a netlogon_ctrl2 message is received.
(This used to be commit 73e1b708d0)
2001-08-28 06:34:08 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Andrew Tridgell
ee5f7237de started converting NTSTATUS to be a structure on systems with gcc in order to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs
(This used to be commit 1b778bc7d2)
2001-08-27 17:52:23 +00:00
Andrew Bartlett
3820578473 As per plug-fest discussions this paramater no longer defaults to the value
of add user script.
(This used to be commit 9e0c9a99f6)
2001-08-27 03:56:09 +00:00
Jeremy Allison
d309035c3e Spaces -> Tabs.
Jeremy.
(This used to be commit 5b665122f5)
2001-08-26 20:05:33 +00:00
Herb Lewis
717533483b get rid of compiler warnings
(This used to be commit 0768991d04)
2001-08-24 20:32:01 +00:00
Herb Lewis
40342d6917 fix missing )
(This used to be commit f3bc6b5d68)
2001-08-24 14:34:23 +00:00
Simo Sorce
0174ccc0d6 let admins also abort a shutdown
(This used to be commit 3b40ec4f14)
2001-08-24 07:51:59 +00:00
Jeremy Allison
659774bffd Fixed malloc -> talloc problems pointed out by Simo.
Jeremy
(This used to be commit 0f5b187387)
2001-08-24 07:32:51 +00:00
Simo Sorce
8ef7ddba65 so let admins shutdown their samba servers remotely if they want :-)
(This used to be commit 6391fd7bda)
2001-08-23 23:25:34 +00:00
Tim Potter
b5a5fe44cc Fix for filers sending -1 for the maximum read request length on the
LSA pipe.
(This used to be commit 95307a5d38)
2001-08-23 18:05:44 +00:00
Simo Sorce
28b206f163 some %things are not expanded properly in get share info levels
(This used to be commit 3e60636f2b)
2001-08-22 16:10:28 +00:00
Jeremy Allison
e08ca02631 Added Jim McDonough's Win9x take ownership fix.
Jeremy.
(This used to be commit 800e46ea7e)
2001-08-13 23:19:16 +00:00
Gerald Carter
26ceb74063 merge from 2.2
(This used to be commit 7049217eb4)
2001-08-13 21:30:27 +00:00
Simo Sorce
2e783a4707 this is a big global fix for the ptr = Realloc(ptr, size) bug.
many possible mem leaks, and segfaults fixed.

someone should port this fix to 2.2 also.
(This used to be commit fa8e55b8b4)
2001-08-12 17:30:01 +00:00
Andrew Bartlett
ddec830658 Kill of idra's extra become_root()/unbecome_root() now I have fixed the actual
problem.

Andrew Bartlett
(This used to be commit 895d1cd317)
2001-08-12 12:23:50 +00:00
Andrew Bartlett
6ad80352dd This patch does a number of things, mostly smaller than they look :-)
In particuar, it moves the domain_client_validate stuff out of
auth_domain.c to somwhere where they (I hope) they can be shared
with winbind better.  (This may need some work)

The main purpose of this patch was however to improve some of the
internal documentation and to correctly place become_root()/unbecome_root()
calls within the code.

Finally this patch moves some more of auth.c into other files, auth_unix.c
in this case.

Andrew Bartlett
(This used to be commit ea1c547ac8)
2001-08-12 11:19:57 +00:00
Simo Sorce
8d5916d5fa Without this become_root()/unbecome_root() pair I was not able to login
when samba acting as a PDC.
I also removed a pdb_free_sam(sampass), because it sampass was never
initialized before...

Please abartlet can you check this patch is ok?
I feel like this was a bad check-in
(This used to be commit f25a5dab60)
2001-08-11 16:34:11 +00:00
Jeremy Allison
4b2016305b Merge in the NT drivers changes from 2.2.
Jeremy.
(This used to be commit a3781ad38f)
2001-08-10 19:38:53 +00:00
Tim Potter
047a7c88d7 Replaced the duplicate DOS constants with appropriate ones from doserr.h to
emphasise the fact that the spoolss pipe returns DOS error codes instead of
32-bit nt status codes.
(This used to be commit 5f5ed41ee8)
2001-08-10 05:41:53 +00:00
Gerald Carter
f8d3cac8af a few cleanups while mergeing the passdb code into 2.2
(This used to be commit ef01739708)
2001-08-09 15:53:49 +00:00
Andrew Bartlett
986372901e This is my 'Authentication Rewrite' version 1.01, mostly as submitted to
samba-technical a few weeks ago.

The idea here is to standardize the checking of user names and passwords,
thereby ensuring that all authtentications pass the same standards.  The
interface currently implemented in as

nt_status = check_password(user_info, server_info)

where user_info contains (mostly) the authentication data, and server_info
contains things like the user-id they got, and their resolved user name.

The current ugliness with the way the structures are created will be killed
the next revision, when they will be created and malloced by creator functions.

This patch also includes the first implementation of NTLMv2 in HEAD, but which
needs some more testing.  We also add a hack to allow plaintext passwords to be
compared with smbpasswd, not the system password database.

Finally, this patch probably reintroduces the PAM accounts bug we had in
2.2.0, I'll fix that once this hits the tree.  (I've just finished testing
it on a wide variety of platforms, so I want to get this patch in).
(This used to be commit b30b6202f3)
2001-08-03 13:09:23 +00:00
Jeremy Allison
996719cce2 Added "use mmap" for HPUX.
Jeremy.
(This used to be commit 840802f106)
2001-07-30 22:21:31 +00:00
Tim Potter
648528196c Held a shoot-out between NT_STATUS_NO_PROBLEMO and NT_STATUS_NOPROBLEMO.
According to the incorruptible judges find and grep, the latter won.

Mmm - procrastination.  (-:
(This used to be commit 2e33940360)
2001-07-25 06:42:05 +00:00
Jeremy Allison
a9ab7eaa5d Fix case insensitive password change code.
Fixed crash bug with un-zeroed talloced memory.
Jeremy.
(This used to be commit eea1c30df2)
2001-07-23 22:06:05 +00:00
Tim Potter
cdcf646c65 #ifdef'ed out some unused functions.
(This used to be commit ab5ccce2ed)
2001-07-19 07:44:59 +00:00
Jeremy Allison
3015fde980 Fix usermanager for domains - we were returning no memory when we
should have been returning empty space at end of enumeration.
Jeremy.
(This used to be commit 175c640692)
2001-07-17 02:26:04 +00:00
Tim Potter
5f4a1aa3c3 Removed unused variable.
(This used to be commit 914e78f053)
2001-07-12 22:19:39 +00:00
Jean-François Micouleau
0a33cb45c1 implement:
LSA_ENUM_PRIVS
	LSA_PRIV_GET_DISPNAME
	LSA_ENUM_ACCOUNTS
	LSA_OPENACCOUNT
	LSA_ENUMPRIVSACCOUNT
	LSA_GETSYSTEMACCOUNT

It's a work in progress. nobody should expect it to work

	J.F.
(This used to be commit 3056357cd8)
2001-07-09 18:32:54 +00:00
Jean-François Micouleau
62d399f3cf add query user info level 20 (for RAS)
add query dominfo level 5
some cleanup, don't free talloced memory.
implement delete domain and local groups.

	J.F.
(This used to be commit 3f14dda2a2)
2001-07-09 18:25:40 +00:00
Andrew Bartlett
5b8d230e39 This removes unused paramaters from various authtication functions, and should
not change behaviour.

This should make my later diffs smaller, where I actualy start cleaning up this
mess...

Andrew Bartlett
(This used to be commit 04f090c224)
2001-07-08 14:10:30 +00:00
Andrew Bartlett
28a53730a9 Add a new paramater: add machine script
This allows the administrator to define different scripts for adding unix users
and automaticly adding machines.  If it is not defined, it falls back to the
value of 'add user script'.

Andrew Bartlett
(This used to be commit 7a478e050f)
2001-07-07 08:45:39 +00:00
Jeremy Allison
3a40f80a94 Fix for enumerating large numbers of users.
Jeremy.
(This used to be commit c8c138c1fb)
2001-07-05 22:36:25 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
ed2fc96222 Fixed extra file_free calls - my fault :-(.
Jeremy.
(This used to be commit 2f8b84bda0)
2001-07-02 18:37:39 +00:00
Andrew Bartlett
e682d6d54e This fix from Eelco Vriezekolk <eelco@nexus.com.na> is for a SIG11 bug where we
would always file_free(fsp) twice, once in close_file and once afterwoulds.

The bug was reported in SAMBA_2_2, but a code inspection shows it to be in HEAD
as well.  (Unfortunetly I don't have the facilites to actualy check this, but
the change is quite simple, makes sence and compiles).

Andrew Bartlett
(This used to be commit 5d3f622375)
2001-07-02 13:43:46 +00:00
Jeremy Allison
8d0b9cf534 Added LsaGetConnectedCredentials patch from Manoj Naik <manoj@almaden.ibm.com>.
Jeremy.
(This used to be commit 7079300da6)
2001-06-29 23:12:55 +00:00
Jeremy Allison
2cddd5fe8c From JF....
hi jeremy,

can you commit the following patch against HEAD. I can't do it right now

Thanks Tim for me. He changed the SAM_DISPINFO_1 array without checking if
he didn't break the server code. And he did.

So on my way I cleaned info_1, 2, .. 5

it may break winbind. I leave to tim the pleasure to fix it ;-)

        jf.

I added some talloc changes and checks for alloc fails.

Jeremy.
(This used to be commit 001e9b7b54)
2001-06-29 18:41:31 +00:00
Herb Lewis
c2cfcb34e1 SGI compiler fixes.
Jeremy
(This used to be commit 45bf995bf6)
2001-06-26 20:23:45 +00:00
Tim Potter
6e0605c3ab Cosmetic fixups found while playing with the server manager. Added support
for NET_SRV_SET_INFO rpc call which is made when double-clicking on a
computer in the server manager and changing the description.  We always
return NT_STATUS_NOPROBLEMO as NT doesn't seem to decode any error messages
passed back.

Maybe the changed comment string could be stored in a tdb and regurgitated
instead of the "server string" smb.conf parameter?
(This used to be commit d936ffedd9)
2001-06-25 06:13:27 +00:00
Jeremy Allison
b08ee8995d Fix from "Jim McDonough" <jmcd@us.ibm.com>" - when we use open_file_shared(),
we need to close with close_file().
Jeremy.
(This used to be commit 5b2ffd160f)
2001-06-22 18:58:35 +00:00
Jeremy Allison
3a6019b0eb Merging Gerry's spoolss changes.
Jeremy.
(This used to be commit 6b4a70cd82)
2001-06-21 17:46:14 +00:00
Jeremy Allison
3f1254bee1 Fixed W2K SP2 joining a Samba PDC hosted domain.
Jermey.
(This used to be commit 05a2911403)
2001-06-20 19:55:59 +00:00
Jeremy Allison
d2846a3ea9 Only try and open a directory if we get EISDIR.
Jeremy.
(This used to be commit 5b1245f803)
2001-06-19 18:43:17 +00:00
Tim Potter
fd0f3dfd3c Fixed typo in debug message.
(This used to be commit d05577c332)
2001-06-19 06:52:45 +00:00
Jeremy Allison
c1fbf761ce rpc_server/srv_srvsvc_nt.c: Don't test an uint32 for < 0.
utils/smbcacls.c: Set enum correctly.
Jeremy.
(This used to be commit 66f959e0ff)
2001-06-19 00:44:23 +00:00
Jeremy Allison
48a5c87240 Fix for assert fail - left over when moved to dynamic allocation.
Jeremy.
(This used to be commit 0fcf200633)
2001-06-18 21:34:01 +00:00
Jeremy Allison
809c025878 Added patches to remove Linux specific XFS ACLs. These are now handled by the
generic Linux ACL code.
rpc_server/srv_samr_nt.c: Don't delete a policy handle before it's created.
Jeremy.
(This used to be commit db5b82e53a)
2001-06-18 20:27:35 +00:00
Jeremy Allison
0417200fa9 Added "Jim McDonough" <jmcd@us.ibm.com> patches for directory support
for Win9x.
Jeremy.
(This used to be commit 70194b194e)
2001-06-18 17:52:58 +00:00
Jeremy Allison
af604fe769 Modified version of Jim's 0x27 and 0x28 Win9x Secdesc patch.
Jeremy.
(This used to be commit 5690ec77c8)
2001-06-16 00:32:13 +00:00
Jeremy Allison
8209eda774 Make message receive fn static.
Jeremy.
(This used to be commit d8807b1922)
2001-06-13 01:08:27 +00:00
Tim Potter
c569e20b10 Fixed typo in debug message.
(This used to be commit 4d2f660582)
2001-06-12 10:13:24 +00:00
Jeremy Allison
11b2de50fc Added getconf flags for RH7.1 lfs support. Changed while() to a for()
loop in Simo's code (removes much grp = gep->next code).
Jeremy.
(This used to be commit d0c276c242)
2001-06-06 23:07:10 +00:00
Tim Potter
5d83242a9e Merge of lsa_lookup_names() i18n bugfix from appliance.
(This used to be commit 84a22d5f0a)
2001-06-05 01:26:06 +00:00
Andrew Tridgell
05fc3e578c use LDSHFLAGS not -shared in several places
(This used to be commit 8ec9c87b5d)
2001-06-04 05:13:59 +00:00
Tim Potter
94186f645d Merge of i18n domain name fix for lsa_query_info_policy() from appliance
branch.
(This used to be commit e7a4dd7612)
2001-06-02 06:14:42 +00:00
Tim Potter
2eef56f9fa i18n bugfix merge from appliance.
(This used to be commit 73eb539da6)
2001-06-02 03:03:28 +00:00
Simo Sorce
bbf5ea221a 4 new functions to retrieve single linked list of group and passwd entries
+ a fix to an infinite loop in srv_samr_nt.c caused by misuse of
setgrent/getgrent/endgrent solved by these new functions
(This used to be commit 97dbb54a13)
2001-05-29 07:34:01 +00:00
Tim Potter
076ace3e3d Added server side reponse to net_logon_ctrl rpc. We can now respond
to NLTEST /BDC_QUERY:DOMAIN when acting as a BDC.

Reverse engineered a couple of status constants.
(This used to be commit 0678c30282)
2001-05-24 08:05:12 +00:00
Gerald Carter
43000d8d06 merge from 2.2 (deleteprinterdriver RPC)
(This used to be commit 515caaf7b4)
2001-05-18 04:11:17 +00:00
Jeremy Allison
c912d04389 Fix the W2KSP2 joining a Samba domain problem.
Jeremy.
(This used to be commit 6bbcab5e48)
2001-05-18 01:30:21 +00:00
Gerald Carter
6dd8c06ce9 Should be faliing on False and not True. Bad check on return value
(This used to be commit 5be97aacf4)
2001-05-10 20:05:06 +00:00
Gerald Carter
f874646136 check for valid pointer before calling memset() in samr_clear_sam_passwd
(This used to be commit a6a4a17f6a)
2001-05-09 17:57:08 +00:00
Jean-François Micouleau
b6a6b4b02e fixes to the group mapping code.
Not ready yet.

	J.F.
(This used to be commit 62a7a567fd)
2001-05-08 16:33:18 +00:00
Tim Potter
f39cb774e7 Fixed compiler warning.
(This used to be commit 9f1f811154)
2001-05-08 06:09:52 +00:00
Jeremy Allison
ee8821f2f3 Fix for insure missmatched parameter error.
Jeremy.
(This used to be commit b32b1afe25)
2001-05-08 01:26:28 +00:00
Gerald Carter
495f6e6787 merge from 2.2 removing the 'domain XXX' parameters.
(This used to be commit 9aefc86e35)
2001-05-07 22:10:38 +00:00
Gerald Carter
dbd7e0a54e removed unused variables
(This used to be commit 09103b16cf)
2001-05-07 22:08:34 +00:00
Gerald Carter
30c4c04c2f Patch from Simo:
o sed 's/pdb_clear_sam/pdb_free_sam/g'
  o add pdb_reset_sam()
  o password changing should be ok now as well.
(This used to be commit 96d0e7c330)
2001-05-07 14:04:46 +00:00
Jean-François Micouleau
f35157f392 Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the
password changing. So don't cry ;-)

	J.F.
(This used to be commit a4a4c02b12)
2001-05-04 15:44:27 +00:00
Jeremy Allison
dea501bc5f Fix noticed by John Trostel - we need to return our account SID for level 5.
Jeremy.
(This used to be commit acf32f277d)
2001-05-02 20:32:17 +00:00
Jeremy Allison
3c525aaaa3 Remove embedded '/*' in comment.
Jeremy.
(This used to be commit 9a85dc9cdb)
2001-05-02 08:14:00 +00:00
Andrew Tridgell
e51cc47cec fixed comment-in-comment
(This used to be commit 4c456c8264)
2001-05-01 04:02:15 +00:00
Jeremy Allison
8bd2a11c86 Added code from "Nigel Williams" <nigel@veritas.com> (yes, the same famous
Nigel Williams who did NIS/GINA !) to implement add/modify/delete shares
for Win2k. Needs testing as I made a few mods to the original code.
Jeremy.
(This used to be commit 9b3dd80176)
2001-05-01 01:01:19 +00:00
Jeremy Allison
9b78339875 More acl -> the_acl, %d with uid_t issues.
Jeremy.
(This used to be commit 30edd7fdf1)
2001-04-27 21:49:22 +00:00
Jean-François Micouleau
30c0777c1f fix a bug in printer name handling that jerry reported.
names can be \\server -> print server
\\server\printer -> printer
printer -> printer

	J.F.
(This used to be commit ec576722b7)
2001-04-27 17:08:33 +00:00
Gerald Carter
c3bf153c0c converted the passdb smbpasswd implementation to using talloc
for memory allocation.  This fixes a long standing seg fault
(i knew i would get around to it one day :) )

Tested with NT4 and Win2k.  Needs a little more testing with the
"create the machine account on the fly" code for NT4.

Simo, this is probably going to break the tdb passdb code.
Can you look at that when you get a chance and see what you think?
(This used to be commit 1c13110873)
2001-04-25 22:12:13 +00:00