1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

2152 Commits

Author SHA1 Message Date
Jean-François Micouleau
bee11f8889 don't leak printer handles,
don't coredump when adding forms,
and a small non obvious memory leak in the rpc buffers

	J.F.
-
Jean-François Micouleau
f328ae8024 Don't duplicate forms anymore, just update the definition.
Many memory leaks fixed.

	J.F.
-
Jean-François Micouleau
a893df5c00 Correctly handle the dependent files in the printer_driver_info_3 struct
It means complex printer drivers should now download fine.

	J.F.
-
Luke Leighton
f9a0ea0948 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.
-
Luke Leighton
001b53866c matthew chapman identified 4 previously unknown samr functions. -
Luke Leighton
1cde47ba6a debugged enumgroups -g option -
Luke Leighton
e90e38c66d patch from michael glauche to add session enum code into smbd. -
Luke Leighton
91a66dd5c3 patch from Michael Glauche to list connections from STATUS..LCK. -
Jean-François Micouleau
bf9b639bf9 - 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
-
Luke Leighton
1a211bafeb renaming AUTH VERIFIER to AUTH NTLMSSP VERIFIER. ready for adding
another RPC authentication system.
-
Luke Leighton
fd886af331 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.
-
Luke Leighton
30620b93e5 Tim Potter spotted compile error: matthew had added BDC support to smbd,
which i didn't know about!
-
Luke Leighton
80d3677843 code from bertl to allow remap of default built-in names to anything.
parameter is "builtin rid file".
Copyright 1999 Bertl <bp@vpnet.at>
-
Luke Leighton
e6d43ddb1b oops, set password lengths to a boolean value. -
Jean-François Micouleau
bda429eb73 many small bugs...
J.F.
-
Luke Leighton
ab1a6aa42d improving authentication code (tidyup). -
Jean-François Micouleau
8d73f83b6c 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
-
Matthew Chapman
c3c25e762f 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.
-
Jean-François Micouleau
7fc8659e83 last part of RPC api change.
and of rpcclient eventlog funtion

	Jean Francois
-
Jean-François Micouleau
4c515804b7 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
-
Jean-François Micouleau
9e8192cc67 Adding RPC spoolss code support and some new low-level printing functions.
Jean Francois
-
Matthew Chapman
52b4fd5b55 Added new define NT_STATUS_MORE_ENTRIES = 0x105. -
Matthew Chapman
74d6dec25d 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.
-
Luke Leighton
2f02a083b2 Dejan Ilic: spotted "NETLOGON" bug, failure of NT_STATUS WRONG_PASSWORD. -
Luke Leighton
ac070dfd39 added SamrQueryDomainInfo call info level 0x3 for kix32.exe support -
Luke Leighton
f5f61bd477 "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.
-
Luke Leighton
129a9a4d4b 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.
-
Luke Leighton
4aed18b5e1 added SAMR_USER_INFO_24 info level to samr_set_userinfo. this is used
by "Welcome to SAMBA Domain".
-
Luke Leighton
2e58ed7424 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.
-
Luke Leighton
f84dede27e removed 2 unnecessary args from make_uni_hdr. -
Matthew Chapman
6d03f61d25 Fixed LSA Lookup Names. There were a few too many NULL pointers in a
negative response, which tended to crash lsass.exe.
-
Luke Leighton
103557e26b dynamic memory allocation in samr enum dom users. works with 849 entries now. -
Matthew Chapman
b9e8a3ef3a 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);
-
Matthew Chapman
113d03a38a 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.
-
Luke Leighton
4bb74fcc71 Stefan Walters: purify spotted rverf should be alloc'd to 16 bytes not 8. -
Matthew Chapman
03e722cdf5 Added SVC_QUERY_DISP_NAME (corresponding to the GetServiceDisplayName API).
Needed during preliminary part of SAM replication.
-
Luke Leighton
478d9ddfcf check for exactly _one_ key: for USRMGR.EXE. -
Luke Leighton
d8946f1cc7 Greg Dickie: spotted bug where smb_nt_passwd could be NULL. -
Matthew Chapman
7d03e6e219 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.
-
Matthew Chapman
ce24191939 Always null-terminate strings.
Also some string length and sizeof(pointer) corrections.
-
Matthew Chapman
a1d39af1ce 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).
-
Luke Leighton
6a437cfb33 UNICODE issues. -
Luke Leighton
c5109ff782 use jeremy's versions of the UNICODE routines. -
Luke Leighton
3072044134 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.
-
Luke Leighton
56469578a1 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.
-
Luke Leighton
fcaa121441 when multiple independent large rpc calls come in on the same pipe,
prev_pdu_file_offset was not being re-initialised to zero.
-
Luke Leighton
ac72fe1ab3 removal of the use of unistrn2 function: replace it with unistr2_to_str
which is more appropriate.
-
Luke Leighton
ddd3501982 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.
-
Matthew Chapman
30a085bf80 Fix for NT BSOD problem. There's no reason to have two "NT usernames" running
around anyway.

The real problem is, once again, the brokenness of pwdb_sam_map_names et al.
This time it is deciding to return blank NT usernames, which NT's redirector
objects to.

I'm currently working on improving the pwdb/mapping code, should be ready in a
couple of weeks.
-
Luke Leighton
9084b7e33d UNICODE byte ordering issue: typecast to uint16* replaced with SSVAL() -