1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

3654 Commits

Author SHA1 Message Date
Luke Leighton
6f9105c853 various. debug levels changed. nmbd doesn't need libsmb/clienttrust.c.
samr_lookup_rids() moved to a dynamic memory structure not a
static one limited to 32 RIDs.  cli_pipe.c reading wasn't checking
ERRmoredata when DOS error codes negotiated (this terminates
MSRPC code with prejudice).
(This used to be commit 8976eca2db43576c32069dcda017e8777048e007)
1999-10-21 16:53:50 +00:00
Luke Leighton
003f7364fd adding error checking in parsing code
(This used to be commit 4c98d71ebd3f1cdaef664d46c998c864af34632a)
1999-10-15 20:00:30 +00:00
Jean-François Micouleau
ed5fbd743b don't leak printer handles,
don't coredump when adding forms,
and a small non obvious memory leak in the rpc buffers

	J.F.
(This used to be commit bee11f8889378b9f1cc6e2818fd0f8dd7ddcf10d)
1999-09-27 13:12:55 +00:00
Jean-François Micouleau
0490365b04 Don't duplicate forms anymore, just update the definition.
Many memory leaks fixed.

	J.F.
(This used to be commit f328ae8024584599324ae4263bb9fb89a358279f)
1999-09-25 14:18:48 +00:00
Jean-François Micouleau
7b88001235 Correctly handle the dependent files in the printer_driver_info_3 struct
It means complex printer drivers should now download fine.

	J.F.
(This used to be commit a893df5c00189d7e81efd619a4a4ee2bd8ead61f)
1999-09-24 14:45:21 +00:00
Luke Leighton
178ad937ec allan hourihane sent log 100 in which showed that some really old code
for lsa_close response was messing up.  fixed by calling lsa_io_r_close()
which i've been meaning to do for over eighteen months.
(This used to be commit f9a0ea09486b18a130ce1a1e5381ca61e0293c75)
1999-09-09 18:15:08 +00:00
Luke Leighton
58f8159566 matthew chapman identified 4 previously unknown samr functions.
(This used to be commit 001b53866c819045bc52330cad5746e1a2f7a4b1)
1999-08-31 13:19:55 +00:00
Luke Leighton
736c507722 debugged enumgroups -g option
(This used to be commit 1cde47ba6a6409e0ae178ca9f44be2123bef0f9d)
1999-08-30 17:15:59 +00:00
Luke Leighton
b3f59299a0 patch from michael glauche to add session enum code into smbd.
(This used to be commit e90e38c66d51dc1808f716c016299b1604636ce9)
1999-08-18 21:18:42 +00:00
Luke Leighton
e055972009 patch from Michael Glauche to list connections from STATUS..LCK.
(This used to be commit 91a66dd5c3a551691fbf91e782cb6ff16dfea37b)
1999-08-17 23:16:17 +00:00
Jean-François Micouleau
4bff267574 - enumprintprocessors and enumprintmonitors added.
- getjob (level 1 and 2) done.
- better handling of getprinterdriver (level 2).
- added workaround to print PCL files.

Now the spoolss code should be compliant with all kind of printers :-)

	Jean Francois
(This used to be commit bf9b639bf9162d61eb152af506dc2c1a7e8a4c85)
1999-07-27 10:46:44 +00:00
Luke Leighton
f2e0bbffb5 renaming AUTH VERIFIER to AUTH NTLMSSP VERIFIER. ready for adding
another RPC authentication system.
(This used to be commit 1a211bafebad8c63d98b5ef275a6272013527c65)
1999-07-26 21:47:23 +00:00
Luke Leighton
d300fc3173 commented location where lookup_sids(), a direct call to the password
database API, needs to be replaced with over-the-wire (actually, tcp/ip
loopback) to smbd.

in fact, this is the location where, if we want to put in an nt5 ldap
lookup system or netware NDS instead, we make the calls to resolve
users-to-sids and vice-versa: NOT by replacing rpc_server/srv_samr.c.
(This used to be commit fd886af3317ca806c9c28f71afca5c7b063c1226)
1999-07-26 17:46:06 +00:00
Luke Leighton
ae0d7718eb Tim Potter spotted compile error: matthew had added BDC support to smbd,
which i didn't know about!
(This used to be commit 30620b93e5c476ba7bf09c459ab4b7bea3f67642)
1999-07-21 05:07:20 +00:00
Luke Leighton
1f33d5a8aa code from bertl to allow remap of default built-in names to anything.
parameter is "builtin rid file".
Copyright 1999 Bertl <bp@vpnet.at>
(This used to be commit 80d36778432d42eb265ed9428f27a27250ba5e08)
1999-07-14 19:21:44 +00:00
Luke Leighton
f922d25ce8 oops, set password lengths to a boolean value.
(This used to be commit e6d43ddb1bdb249f93dca65180964a61d281935b)
1999-07-06 20:33:24 +00:00
Jean-François Micouleau
89517ed4d3 many small bugs...
J.F.
(This used to be commit bda429eb73fa3c0a6d59cf47a8285e3fc0cdae98)
1999-07-01 18:02:34 +00:00
Luke Leighton
73891ca8e4 improving authentication code (tidyup).
(This used to be commit ab1a6aa42db5217f025941fb5107436556bc23b7)
1999-06-29 18:47:06 +00:00
Jean-François Micouleau
0c927f2b1b Fixed most memory leak and big-endian bug in the spoolss code.
Also added addform/setform rpc api calls. Now I can add/change forms from
the server property dialog box.

Jean Francois
(This used to be commit 8d73f83b6c112327a51c0df2e96a1866deb13c3a)
1999-06-22 18:42:10 +00:00
Matthew Chapman
99e42c0656 Some more BDC-related fixes, mainly to the NET_SAM_SYNC RPC with respect
to alignment, missing fields, etc. - it should now work correctly.
There is still the problem of decoding the private data field.
(This used to be commit c3c25e762fbc30d5663323f23449c913f2ce4b0e)
1999-06-02 03:19:20 +00:00
Jean-François Micouleau
4e5bf481fb last part of RPC api change.
and of rpcclient eventlog funtion

	Jean Francois
(This used to be commit 7fc8659e83bf0269df297016beac6793ff0bdf32)
1999-05-03 22:04:02 +00:00
Jean-François Micouleau
be552ca350 rpc_parse/parse_misc.c : defined a new BUFFER5 struct
include/ntdomain.h     : added rpc_spoolss.h include statement
include/proto.h
include/rpc_dce.h      : added definition of RPC_ALTER_CONTEXT request &
                         reply
param/loadparm.c       : 2 new options for NT printing support and some
                         changes to initial values in the LPRNG case.
rpc_parse/parse_prs.c  : added prs_uint16s()
rpc_parse/parse_rpc.c  : added SYNT_SPOOLSS_V1 and code for the
                         alter-context support.
rpc_server/srv_pipe.c  : alter-context support
smbd/nttrans.c
smbd/server.c
include/rpc_misc.h
Makefile.in
include/smb.h

Jean Francois
(This used to be commit 4c515804b70254248e378a3f90f47e4c32639d29)
1999-04-27 10:43:32 +00:00
Jean-François Micouleau
de0c233a7a Adding RPC spoolss code support and some new low-level printing functions.
Jean Francois
(This used to be commit 9e8192cc674db7551569d23982877dd25c488b50)
1999-04-27 10:13:02 +00:00
Matthew Chapman
2bc0641b88 Added new define NT_STATUS_MORE_ENTRIES = 0x105.
(This used to be commit 52b4fd5b55c22deb691124b743ae9d3beb33b39e)
1999-04-23 14:48:22 +00:00
Matthew Chapman
53f0cd990c Mainly BDC-related changes.
* Added SEC_CHAN_BDC
* Fix for endianness problem reported by Edan Idzerda <edan@mtu.edu>. A
  BUFFER2 is really a "unibuf" in my terminology and we should treat it as
  such.
* Added some more common NT structures (BIGINT, BUFHDR2, BUFFER4).
* Added NET_SAM_SYNC (-> NetDatabaseSync2) RPC for account replication.
  Still experimental and incomplete, with a few too many NULL security
  descriptors lying around (must go look at Jeremy's SD code). Haven't
  worked out password encryption yet either.
  However, the XXX_INFO structures I've added to rpc_netlogon.h are quite
  nice as they give some insight into how these objects are stored in the
  SAM.
(This used to be commit 74d6dec25d6b44e26d3895f789f1958d5f4639ee)
1999-04-08 05:35:53 +00:00
Luke Leighton
bc973ffbdd Dejan Ilic: spotted "NETLOGON" bug, failure of NT_STATUS WRONG_PASSWORD.
(This used to be commit 2f02a083b2f766d2f3d3f410377da7f552739345)
1999-04-06 16:36:52 +00:00
Luke Leighton
6ce4aaad2b added SamrQueryDomainInfo call info level 0x3 for kix32.exe support
(This used to be commit ac070dfd39bfa9b60680855585155ce528ab7691)
1999-03-29 17:24:46 +00:00
Luke Leighton
068e77c861 "User Manager" - create user + change password now work.
next problem: user group adding not supported so an "access denied"
message is reported instead of "ok" when a new user is created.
(This used to be commit f5f61bd477b4910cb90675c926381342c30a5b16)
1999-03-25 21:32:04 +00:00
Luke Leighton
3b07eff9ea fixed issues with "Welcome to SAMBA Domain" for when admin user/pass is
used to add workstation to domain.  unix account db not modified: only
SAM password db is used.
(This used to be commit 129a9a4d4b74897ed753a697a3aed9b194c25568)
1999-03-25 20:56:28 +00:00
Luke Leighton
fa01e8764c added SAMR_USER_INFO_24 info level to samr_set_userinfo. this is used
by "Welcome to SAMBA Domain".
(This used to be commit 4aed18b5e1e2309c0f6931fbfdd604b01cb9498a)
1999-03-25 15:14:30 +00:00
Luke Leighton
43a460075a SAM database "set user info".
----------------------------

- removed DOM_RID4

- removed SAMR_UNKNOWN_32

- added SAMR_SET_USERINFO (opcode 0x32)

- added level 0x1 to SAMR_QUERY_DOM_INFO (needed for create user)

- fixed pwdb_gethexpwd() it was failing on XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

- added mod_sam21pwd_entry()

- preparing to call mod_sam21pwd_entry()

- added "user session key" to user_struct.dc.  this is md4(nt#) and is
  needed to decode user's clear-text passwords in SAMR_SET_USERINFO.

- split code out in chgpasswd.c to decode 516 byte password buffers.
(This used to be commit 2e58ed742435befe419aa366c4052019fede8c23)
1999-03-25 13:54:31 +00:00
Luke Leighton
cd7c530f56 removed 2 unnecessary args from make_uni_hdr.
(This used to be commit f84dede27e16a5f02ee6d02fe2d16f2661c65470)
1999-03-24 17:26:08 +00:00
Matthew Chapman
22ab15823f Fixed LSA Lookup Names. There were a few too many NULL pointers in a
negative response, which tended to crash lsass.exe.
(This used to be commit 6d03f61d2536630968007958345cf44a42b03584)
1999-03-24 12:18:28 +00:00
Luke Leighton
6b9cb3a254 dynamic memory allocation in samr enum dom users. works with 849 entries now.
(This used to be commit 103557e26b071bf1e65e025ef5a52ccdbf483d02)
1999-03-23 20:43:44 +00:00
Matthew Chapman
a4bc522a72 The line:
this_pdu_data_pos = data_pos - p->prev_pdu_file_offset;

is correct for first two PDU's only, after that it results in extra
garbage after each fragment and hence "Protocol Error" messages from
NT4 SP4. Changed to:

    this_pdu_data_pos = (pdu_data_sent == 0) ? 0 : (pdu_data_sent - 0x18);
(This used to be commit b9e8a3ef3a25a81c4bb125bdd4f4d8334a578c85)
1999-03-21 13:01:31 +00:00
Matthew Chapman
f7eaf17216 Added SVC_START_SERVICE rpc. An NT PDC will attempt to start the NETLOGON
service on its BDC's prior to initiating SAM replication. For now just
return success.
(This used to be commit 113d03a38a34e5c4115dab59349078093bcd4888)
1999-03-18 09:36:43 +00:00
Luke Leighton
7f02de406d Stefan Walters: purify spotted rverf should be alloc'd to 16 bytes not 8.
(This used to be commit 4bb74fcc714fccac791ce86c8882d19d704b17a1)
1999-03-17 19:49:14 +00:00
Matthew Chapman
517aade8bd Added SVC_QUERY_DISP_NAME (corresponding to the GetServiceDisplayName API).
Needed during preliminary part of SAM replication.
(This used to be commit 03e722cdf502491d09d4c5eb9024d837ae10ab32)
1999-03-16 06:24:24 +00:00
Luke Leighton
0aaf5a368c check for exactly _one_ key: for USRMGR.EXE.
(This used to be commit 478d9ddfcf59e3d847d83947c8d4f0bf84f26833)
1999-03-12 05:46:10 +00:00
Luke Leighton
2aadefe8cc Greg Dickie: spotted bug where smb_nt_passwd could be NULL.
(This used to be commit d8946f1cc7b77b06f346344ffdb4772e6d225396)
1999-03-10 17:06:07 +00:00
Matthew Chapman
05f772b431 Win9x user level security.
* Added SAMR_LOOKUP_DOMAIN (-> SamrLookupDomainInSamServer)

* Added real SAMR_ENUM_DOM_GROUPS (corresponding to
SamrEnumerateGroupsInDomain). The existing one is just an alias for
SamrQueryDisplayInformation (see below).

* Added three extra info levels to SAMR_QUERY_DISPINFO. Info level 3 is
what was previously SAMR_ENUM_DOM_GROUPS; info levels 4 and 5 are
simple user/group list requests used by Win9x and I suspect (haven't
checked) the "low speed connection" User Manager.

* Added another two aliases for SAMR_QUERY_DISPINFO, opcodes 0x30 and
0x33. Usually the first is with info level 3 and the second 4 but there is
some overlap so indeed these should be implemented as just aliases.

* Return ERRDOS/ERRmoredata on extra data instead of
STATUS_BUFFER_OVERFLOW for Win95's benefit. On a named pipe this results
in an SMBreadX as usual.

Still need to fix SAMR_QUERY_DOMAIN_INFO which has a hard-coded number of
users and groups - which Win95 proceeds to truncate at.
(This used to be commit 7d03e6e21908f3a759a4e65c5edd850622335e3e)
1999-02-24 01:52:30 +00:00
Matthew Chapman
2737f26ad6 Always null-terminate strings.
Also some string length and sizeof(pointer) corrections.
(This used to be commit ce24191939b82985d09eabe945199f38b0fea486)
1999-02-15 05:33:30 +00:00
Matthew Chapman
fd96929ec1 UNICODE cleanup (see lib/util_unistr.c).
No more ugly static library buffers and all functions take a destination
string length (especially unistrcpy was rather dangerous; we were only
saved by the fact that datagrams are limited in size).
(This used to be commit a1d39af1ce1d451b811dbd7c2ba391214851b87e)
1999-02-12 00:16:09 +00:00
Luke Leighton
f38bfc7d9a UNICODE issues.
(This used to be commit 6a437cfb33f24913e0c1f8484c0b08ef317e513b)
1999-02-11 22:12:49 +00:00
Luke Leighton
8b6b6b57b5 use jeremy's versions of the UNICODE routines.
(This used to be commit c5109ff782be8774db47a92b48ca6335ec8d6065)
1999-02-10 22:30:47 +00:00
Luke Leighton
7a65924133 Having Well-known Domain Groups ("Domain Admins/Guests/Users") returned
under SID_NAME_ENUM 0x5 instead of 0x2 (Well-known group instead of
Domain Group) was making it impossible to view these groups from USRMGR.EXE.
(This used to be commit 3072044134eadbf46350b32c1ed0703681b0d590)
1999-02-09 22:13:20 +00:00
Luke Leighton
4cb18cd734 groups and aliases being "manually" added which do not necessarily have
representation in the underlying database: removed this code.

for example, with the nt->unix mapping system (don't know about the ldap
one) if you want "Domain Admins" to appear you _must_ put it in the
domaingroup.map file.

the previous code was adding builtin aliases and well-known groups even
if they weren't in the domain maps.  bad idea.
(This used to be commit 56469578a1af0fbcf6edddf94c498c7bbfb385c6)
1999-02-09 21:56:06 +00:00
Luke Leighton
96983a13ba when multiple independent large rpc calls come in on the same pipe,
prev_pdu_file_offset was not being re-initialised to zero.
(This used to be commit fcaa1214412f5a417a648d4da5c4332f75f59f57)
1999-02-09 21:42:39 +00:00
Luke Leighton
748f296a76 removal of the use of unistrn2 function: replace it with unistr2_to_str
which is more appropriate.
(This used to be commit ac72fe1ab3d10f64a5945ccbd4ed3817e30f9f7b)
1999-02-09 19:51:44 +00:00
Luke Leighton
3b12477f34 pwdb_smb_to_sam was not returning NULL for nt name so that
pwdb_sam_map_names() was using a "blank" static string instead of
a NULL pointer for nt names.  NULL means over-ride, so the nt name
got left as "blank".

this causes nt clients to terminate with extreme prejudice.
(This used to be commit ddd350198202d6a1d2c715b3dce7db3a5d76a63a)
1999-02-09 16:01:28 +00:00