1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

1145 Commits

Author SHA1 Message Date
Günther Deschner
0fe21ac560 r15442: Add some more client rpc for the querydominfo calls (from samba4 idl).
Also return the hostname for the level 6 call (to be consistent with the
server name in level 2).

Guenther
(This used to be commit 41b72e77ae)
2007-10-10 11:16:44 -05:00
Günther Deschner
46c35b17a3 r15441: cleanup older unused padding.
Guenther
(This used to be commit 6e225e0528)
2007-10-10 11:16:44 -05:00
Günther Deschner
52e778e6f8 r15438: Fix samrQueryDomainInfo level 5 where we returned our netbios
name eversince instead of the domain name when we are a DC.

Yes, there are applications relying on this call to be correct.

Guenther
(This used to be commit 26dd22c9af)
2007-10-10 11:16:43 -05:00
Günther Deschner
655b04e4f8 r15041: Adding rpc client calls to manipulate auditing policies on remote CIFS
servers. Also add a new "net rpc audit" tool. The lsa query infolevels
were taken from samb4 IDL, the lsa policy flags and categories are
partly documented on msdn. I need to cleanup the double
lsa_query_info_policy{2}{_new} calls next.

Guenther
(This used to be commit 0fed66926f)
2007-10-10 11:15:59 -05:00
Jeremy Allison
15ebf2cd29 r14829: Fix reversed test in coverity fixes.
Jeremy.
(This used to be commit f1b4e870a5)
2007-10-10 11:15:49 -05:00
Jeremy Allison
ba49732bcf r14778: Fix coverity null deref bugs #268 - #271.
Jeremy.
(This used to be commit 0a1ccfefcf)
2007-10-10 11:15:48 -05:00
Jeremy Allison
f6a1f71719 r14776: Fix coverity #263 - #267. No one was checking talloc
returns. Doh !
Jeremy.
(This used to be commit 68097e0fbb)
2007-10-10 11:15:47 -05:00
Jeremy Allison
4d9ad70060 r14774: Fix null deref coverity bugs #260, #261, #262.
Jeremy.
(This used to be commit 46e575af17)
2007-10-10 11:15:47 -05:00
Jeremy Allison
b98703ccaa r14772: Fix coverity bug #258. Seems coverity has discovered talloc :-).
Jeremy.
(This used to be commit 488b772516)
2007-10-10 11:15:47 -05:00
Jeremy Allison
621f91c693 r14770: Fix coverity bug #257. Possible null deref.
Jeremy.
(This used to be commit 4c126ef65d)
2007-10-10 11:15:47 -05:00
Günther Deschner
20204ab040 r14646: Adding samr querygroup infolevels 2 & 5.
Guenther
(This used to be commit 6c4fe819c6)
2007-10-10 11:15:42 -05:00
Günther Deschner
6e17934ee6 r14643: Merge dcerpc_errstr from Samba 4.
Might need to rework prs_dcerpc_status().

Guenther
(This used to be commit 38b18f428b)
2007-10-10 11:15:41 -05:00
Gerald Carter
1839b4be14 r14634: Many bug fixes thanks to train rides and overnight stays in airports
* Finally fix parsing idmap uid/gid ranges not to break with spaces
  surrounding the '-'
* Allow local groups to renamed by adding info level 2 to
  _samr_set_aliasinfo()
* Fix parsing bug in _samr_del_dom_alias() reply
* Prevent root from being deleted via Samba
* Prevent builting groups from being renamed or deleted
* Fix bug in pdb_tdb that broke renaming user accounts
* Make sure winbindd is running when trying to create the Administrators
  and Users BUILTIN groups automatically from smbd (and not just check the
  winbind nexted groups parameter value).
* Have the top level rid allocator verify that the RID it is about to
  grant is not already assigned in our own SAM (retries up to 250 times).
  This fixes passdb with existing SIDs assigned to users from the RID algorithm
  but not monotonically allocating the RIDs from passdb.
(This used to be commit db1162241f)
2007-10-10 11:15:41 -05:00
Jeremy Allison
e6676a9a69 r14387: Try and fix the coverity issues (#53, #54) with negative
sink by ensuring all uses of rpcstr_push are consistent
with a size_t dest size arg.
Jeremy.
(This used to be commit f65d7afe19)
2007-10-10 11:15:27 -05:00
Volker Lendecke
659eb9b71f r14298: The other half of Coverity # 217
(This used to be commit b9fb3fc0e3)
2007-10-10 11:15:24 -05:00
Volker Lendecke
f5fe12d71c r14232: Fix Coverity Bug # 218
(This used to be commit 932d769a32)
2007-10-10 11:15:18 -05:00
Volker Lendecke
79af0b91e0 r14228: Fix Coverity bug # 217
(This used to be commit 680bd1b004)
2007-10-10 11:15:18 -05:00
Jeremy Allison
e4c733f4ce r14219: Fix coverity #135. Don't deref a ptr if it can be NULL.
Jeremy.
(This used to be commit 666d427c6e)
2007-10-10 11:15:17 -05:00
Günther Deschner
c34e73cfcf r14146: Just some typos.
Guenther
(This used to be commit ade86cc787)
2007-10-10 11:15:13 -05:00
Volker Lendecke
2a7601fcb4 r14134: Fix Coverity bug # 137
(This used to be commit 62e58d939b)
2007-10-10 11:15:13 -05:00
Jeremy Allison
b19d871a1a r14115: Fix coverity bug #23. Don't deref a potentially null ptr.
Jeremy.
(This used to be commit df32eb70a4)
2007-10-10 11:11:13 -05:00
Jeremy Allison
aa3cab954e r14092: Fix coverity bug #22. Ensure no possible null
deref.
Jeremy.
(This used to be commit 0026fb0b28)
2007-10-10 11:11:11 -05:00
Jeremy Allison
d12fd8dcb7 r14090: Fix coverity bug #21, don't deref potential null.
Jeremy.
(This used to be commit 76c4d5212b)
2007-10-10 11:11:11 -05:00
Jeremy Allison
a9d1af9d31 r14083: Fix coverity bug #19. Don't deref possible NULL.
Jeremy.
(This used to be commit fc8e1e5c02)
2007-10-10 11:11:11 -05:00
Jeremy Allison
d785b61a16 r14080: Fix Coverity bug #18. Ensure non-null before ref.
Jeremy.
(This used to be commit 617c5805e5)
2007-10-10 11:11:10 -05:00
Günther Deschner
fc5a7fe064 r14061: Some debugging for the new LOGON/ACB-flags.
Guenther
(This used to be commit 7616317f9f)
2007-10-10 11:11:09 -05:00
Jeremy Allison
b05af76541 r14047: Coverity fix #17. Ensure srv_name and info cannot
be zero before deref.
Jeremy.
(This used to be commit fbf9db6624)
2007-10-10 11:11:08 -05:00
Jeremy Allison
d8ba987bfe r14045: Coverity fix #14. Ensure if len is set buf != NULL.
Jeremy.
(This used to be commit fb1a607332)
2007-10-10 11:11:07 -05:00
Jeremy Allison
8d1dd8bb96 r14043: After discussion with Jerry revert part of the
Coverity null-ref patch - put prs_rpcbuffer_p
back to the way it was (with an additional
coverity paranoia check) - move the real test
into rpcbuf_alloc_size instead.
Jeremy.
(This used to be commit f74993e65c)
2007-10-10 11:11:07 -05:00
Volker Lendecke
874a9d02de r14025: Remove unused code. When we want to export samsync, we better first port
pidl...

Fix Coverity # 15.

Volker
(This used to be commit 29b4b986cc)
2007-10-10 11:11:06 -05:00
Jeremy Allison
a3586ff60c r14014: Coverity paranoia. Shut it up by making the guarentee
in the code explicit - but this was a false positive (CID #16).
Jeremy.
(This used to be commit 43a0e869f2)
2007-10-10 11:11:05 -05:00
Jeremy Allison
cd49e2546e r13989: Fix for Coverity bug #45 and associated spoolss RPC_BUFFER
problems. Ensure that if the parse succeeds on UNMARSHALL
we have a valid (although possibly empty) RPC_BUFFER returned.
Jeremy.
(This used to be commit d319cc9c08)
2007-10-10 11:11:03 -05:00
Jeremy Allison
894358a8f3 r13915: Fixed a very interesting class of realloc() bugs found by Coverity.
realloc can return NULL in one of two cases - (1) the realloc failed,
(2) realloc succeeded but the new size requested was zero, in which
case this is identical to a free() call.

The error paths dealing with these two cases should be different,
but mostly weren't. Secondly the standard idiom for dealing with
realloc when you know the new size is non-zero is the following :

 tmp = realloc(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

However, there were *many* *many* places in Samba where we were
using the old (broken) idiom of :

 p = realloc(p, size)
 if (!p) {
    return error;
 }

which will leak the memory pointed to by p on realloc fail.

This commit (hopefully) fixes all these cases by moving to
a standard idiom of :

 p = SMB_REALLOC(p, size)
 if (!p) {
    return error;
 }

Where if the realloc returns null due to the realloc failing
or size == 0 we *guarentee* that the storage pointed to by p
has been freed. This allows me to remove a lot of code that
was dealing with the standard (more verbose) method that required
a tmp pointer. This is almost always what you want. When a
realloc fails you never usually want the old memory, you
want to free it and get into your error processing asap.

For the 11 remaining cases where we really do need to keep the
old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR,
which can be used as follows :

 tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the
pointer p, even on size == 0 or realloc fail. All this is
done by a hidden extra argument to Realloc(), BOOL free_old_on_error
which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR
macros (and their array counterparts).

It remains to be seen what this will do to our Coverity bug count :-).

Jeremy.
(This used to be commit 1d710d06a2)
2007-10-10 11:10:59 -05:00
Gerald Carter
129fd6c5c6 r13878: move PORT_DATA_1 to use static sized UNICODE strings as per MSDN
(This used to be commit c803e1b2af)
2007-10-10 11:10:57 -05:00
Günther Deschner
9f2e29799e r13864: Some cleanup and the samr set security object function client-side.
Guenther
(This used to be commit 0ae3fddf95)
2007-10-10 11:10:57 -05:00
Volker Lendecke
a787e2d124 r13841: Fix an uninitialized variable warning.
Jerry, this just fixes the warning. This routine does not seem to cope well
with !UNMARSHALLING. You might want to look...

Volker
(This used to be commit 2c0c40dfb5)
2007-10-10 11:10:56 -05:00
Gerald Carter
5df58c38f3 r13829: From the "It's not pretty but it works" category
* Finish prototype of the "add port command" implementation
  Format is "addportcommand portname deviceURI"

* DeviceURI is either
  - socket://hostname:port/
  - lpr://hostname/queue
  depending on what the client sent in the request
(This used to be commit 6d74de7a67)
2007-10-10 11:10:56 -05:00
Gerald Carter
889ff32b5e r13824: * add api table for Xcv TCPMON and LOCALMON calls starting
with the "MonitorUI" call
* Fix some parsing errors

This gets us to the Add Port Wizard dialog.
(This used to be commit a444aa7f00)
2007-10-10 11:10:56 -05:00
Gerald Carter
e33b728c7b r13815: "Into the blind world let us now descend,"
Began the poet, his face as pale as death.
"I will go first, and you will follow me."
---

Adding XcvDataPort() to the spoolss code for remotely
add ports.  The design is to allow an intuitive means
of creating a new CUPS print queue from the Windows 2000/XP
APW without hacks like specifying the deviceURI in the
location field of the printer properties dialog.

Also set 'default devmode = yes' as the new default
since it causes no harm and only is executed when you
have a NULL devmode anyways.
(This used to be commit 123e478ce5)
2007-10-10 11:10:55 -05:00
Jeremy Allison
a7552e677e r13802: I *knew* ASU on sparc had to be good for *something* ! :-).
Fix incorrect size understanding of sid name type (yes it's
already correct in the Samba4 IDL :-).
Jeremy.
(This used to be commit 305a774d28)
2007-10-10 11:10:54 -05:00
Günther Deschner
e54786b535 r13711: * Correctly handle acb_info/acct_flags as uint32 not as uint16.
* Fix a couple of related parsing issues.
* in the info3 reply in a samlogon, return the ACB-flags (instead of
  returning zero)

Guenther
(This used to be commit 5b89e8bc24)
2007-10-10 11:10:25 -05:00
Jeremy Allison
115996503c r13585: Sorry Gunther, had to revert this. It's got a buffer
overrun. Spoke to Jerry about the correct fix. Will add
this after.
Jeremy.
(This used to be commit 33e13aabd3)
2007-10-10 11:10:16 -05:00
Günther Deschner
4ea92f3098 r13581: Correctly parse a non-null terminated, little-endian UCS2 string in the
PAC_LOGON_NAME structure. This was broken on big-endian machines
(Solaris SPARC and ppc). Fixes Bug #3330.

Jerry, this should be in 3.0.21c.

Guenther
(This used to be commit 9732490811)
2007-10-10 11:10:16 -05:00
Gerald Carter
2203bed32c r13576: This is the beginnings of moving the SAM_ACCOUNT data structure
to make full use of the new talloc() interface.  Discussed with Volker
and Jeremy.

* remove the internal mem_ctx and simply use the talloc()
  structure as the context.
* replace the internal free_fn() with a talloc_destructor() function
* remove the unnecessary private nested structure
* rename SAM_ACCOUNT to 'struct samu' to indicate the current an
  upcoming changes.  Groups will most likely be replaced with a
  'struct samg' in the future.

Note that there are now passbd API changes.  And for the most
part, the wrapper functions remain the same.

While this code has been tested on tdb and ldap based Samba PDC's
as well as Samba member servers, there are probably still
some bugs.  The code also needs more testing under valgrind to
ensure it's not leaking memory.

But it's a start......
(This used to be commit 19b7593972)
2007-10-10 11:10:15 -05:00
Gerald Carter
fb5362c069 r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
(This used to be commit b65be8874a)
2007-10-10 11:10:14 -05:00
Günther Deschner
6a6f2463f6 r13522: Add SAMR_GET_USRDOM_PWINFO client-side.
Guenther
(This used to be commit 290a581b75)
2007-10-10 11:10:09 -05:00
Jeremy Allison
8d5ef34aa3 r13521: Implement LOOKUPNAME3 and 4.
Jeremy.
(This used to be commit 6ec0e9124a)
2007-10-10 11:10:09 -05:00
Jeremy Allison
85160e654e r13458: Add parsing functions - but stub internals for lookupnames3 and 4.
Jeremy.
(This used to be commit f1a362580a)
2007-10-10 11:10:04 -05:00
Jeremy Allison
e22d38bdde r13455: Prepare to add lookupnames2.
Jeremy.
(This used to be commit 2274709587)
2007-10-10 11:10:04 -05:00
Jeremy Allison
06cf1e18e5 r13447: Added LSA_LOOKUPSIDS2 and LSA_LOOKUPSIDS3.
Jeremy.
(This used to be commit a164cfab42)
2007-10-10 11:10:03 -05:00
Günther Deschner
a48f4e832f r13445: We already made the decision whether to include the dominfo and
changereject.

Guenther
(This used to be commit 98d3c63e04)
2007-10-10 11:10:03 -05:00
Günther Deschner
e83c7d0141 r13442: Implement samr_chgpasswd_user3 server-side.
Guenther
(This used to be commit f60eddc0a4)
2007-10-10 11:10:03 -05:00
Jeremy Allison
e493d32912 r13439: Fix NET_SAM_LOGON_EX.
Jeremy.
(This used to be commit 9437ffc84f)
2007-10-10 11:10:02 -05:00
Jeremy Allison
74bc039f1e r13433: Get ready to implement NET_SAM_LOGON_EX.
Jeremy.
(This used to be commit 666b03b4a9)
2007-10-10 11:10:01 -05:00
Jeremy Allison
ad8b47a2ba r13407: Change the credentials code to be more like the Samba4 structure,
makes fixes much easier to port. Fix the size of dc->sess_key to
be 16 bytes, not 8 bytes - only store 8 bytes in the inter-smbd
store in secrets.tdb though. Should fix some uses of the dc->sess_key
where we where assuming we could read 16 bytes.
Jeremy.
(This used to be commit 5b3c2e63c7)
2007-10-10 11:09:59 -05:00
Jeremy Allison
cf7c47aac9 r13399: Get closer to passing RPC-SCHANNEL test.
Jeremy.
(This used to be commit 8ae70122b7)
2007-10-10 11:09:59 -05:00
Jeremy Allison
86358fc10b r13396: Add in userinfo26, re-enable userinfo25 - took the knowledge
from Samba4 on how to decode the 532 byte password buffers.
Getting closer to passing samba4 RPC-SCHANNEL test.
Jeremy.
(This used to be commit 205db6968a)
2007-10-10 11:09:59 -05:00
Jeremy Allison
1b14d3b697 r13386: Fix parsing of SAMR_Q_CONNECT_ANON.
Jeremy.
(This used to be commit 6f8334ad31)
2007-10-10 11:09:58 -05:00
Volker Lendecke
da979c9e7e r13350: Implement rpccli_samr_set_domain_info. Weird that it was not around :-)
Implement 'net rpc shell account' -- An editor for account policies

nt_time_to_unix_abs changed its argument which to me seems wrong, and I could
not find a caller that depends on this. So I changed it. Applied some more
const in time.c.

Volker
(This used to be commit fc73690a70)
2007-10-10 11:06:26 -05:00
Gerald Carter
0af1500fc0 r13316: Let the carnage begin....
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed)
2007-10-10 11:06:23 -05:00
Alexander Bokovoy
a02415bf36 r12935: After discussion with Volker fix bug #3397 using a variant of the patch by Alex Deiter (tiamat@komi.mts.ru).
Introduces level 9 of getuserinfo and allows to successfully install MS SMS2003
on a member of a Samba domain. Also added support for this level in rpcclient.

The code for infolevel 9 is modelled upon Samba-TNG by Alex Deiter.

Jerry, we need this in 3.0.21b.
(This used to be commit 93461646ce)
2007-10-10 11:06:08 -05:00
Gerald Carter
e7a1a0ead2 r12914: adding query/set ops for security descriptors on services.
(This used to be commit cefd2d7cb6)
2007-10-10 11:06:07 -05:00
Gerald Carter
7cd1af4a63 r12176: fix type mismatch after rpc structure change in rpc_svcctl.h
(This used to be commit ba67d3ae04)
2007-10-10 11:05:48 -05:00
Jeremy Allison
d1f91f7c72 r12043: It's amazing the warnings you find when compiling on a 64-bit
box with gcc4 and -O6...
Fix a bunch of C99 dereferencing type-punned pointer will break
strict-aliasing rules errors. Also added prs_int32 (not uint32...)
as it's needed in one place. Find places where prs_uint32 was being
used to marshall/unmarshall a time_t (a big no no on 64-bits).
More warning fixes to come.
Thanks to Volker for nudging me to compile like this.
Jeremy.
(This used to be commit c65b752604)
2007-10-10 11:05:42 -05:00
Günther Deschner
6ffd82ea77 r11964: rename flag to password_properties in SAM_UNK_INFO_1 because that's what
it is. (SAM_UNK_INFO_1 should get a better name as well).

Guenther
(This used to be commit d94aaeb625)
2007-10-10 11:05:40 -05:00
Günther Deschner
41eb1127fd r11963: add rpccli_samr_chgpasswd3 from samba4.
Guenther
(This used to be commit 0705fed566)
2007-10-10 11:05:40 -05:00
Günther Deschner
1b624b69bd r11858: Fill in the clientside TRUSTED_DOMAIN_INFO_EX query.
Guenther
(This used to be commit 02f13dee6d)
2007-10-10 11:05:31 -05:00
Günther Deschner
2770e98aec r11856: Replace unknown1 with group_attr.
Can anyone remember why we initialize groups only with 0x03 instead of 0x07 ?

Guenther
(This used to be commit 3282c7c458)
2007-10-10 11:05:30 -05:00
Günther Deschner
63addcb4d7 r11853: Add Dsr_GetSiteName (handy for experimenting with GPOs).
Guenther
(This used to be commit c54430a7b5)
2007-10-10 11:05:30 -05:00
Günther Deschner
e09cc27d3b r11852: Fill in samr_get_dom_pwinfo based on Samba4.
Guenther
(This used to be commit a8bc4bc902)
2007-10-10 11:05:30 -05:00
Jeremy Allison
9be0ce4422 r11793: Fix the SAMR cache so it works across completely insane
client behaviour (ie.:
open pipe/open SAMR handle/enumerate 0 - 1024
close SAMR handle, close pipe.
open pipe/open SAMR handle/enumerate 1024 - 2048...
close SAMR handle, close pipe.
And on ad-nausium. Amazing.... probably object-oriented
client side programming in action yet again.
This change should *massively* improve performance when
enumerating users from an LDAP database.
Jeremy.
(This used to be commit 8ce705d9cc)
2007-10-10 11:05:28 -05:00
Jeremy Allison
d09beee040 r11769: Looking at a performance problem enumerating accounts, wondered
if changing to support samr_connect5 might help so quickly coded
it up. No it doesn't :-(. Don't merge this for 3.0.21 please.
Jeremy.
(This used to be commit bff1df678a)
2007-10-10 11:05:27 -05:00
Gerald Carter
70cac98b6e r11760: fix sequential reads in the eventlog; event viewer is behaving better now as well but needs more testing
(This used to be commit ba2f94aeae)
2007-10-10 11:05:26 -05:00
Volker Lendecke
32cf16f3cf r11706: Implement dsr_getdcname client code. It's handy: It not only gives you the IP
address but also the fqdn of the remote dc and site info.

Volker
(This used to be commit 62d01ce7e6)
2007-10-10 11:05:24 -05:00
Jeremy Allison
9d4760d119 r11446: Remove unused fn. Remove unneeded strncpy use.
Jeremy.
(This used to be commit d202aae3c8)
2007-10-10 11:05:16 -05:00
Gerald Carter
e1ffd2d612 r11332: eventlog API uses NTSTATUS, not WERROR for return codes
(This used to be commit f5f40633bc)
2007-10-10 11:05:13 -05:00
Volker Lendecke
354124efb7 r11326: Fix alignment in getdc response
(This used to be commit 9741818d2c)
2007-10-10 11:05:12 -05:00
Jeremy Allison
8d7c886671 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
(This used to be commit d720867a78)
2007-10-10 11:05:02 -05:00
Günther Deschner
8cbe35f6f8 r10782: Only parse the group rid_array in net_user_info3() when num_group is > 0.
This fixes the PAC parsing for win2k DCs up to SP3. (Where full SIDs
are stored in the PAC instead of RIDs).

Guenther
(This used to be commit 3d5d5ddce2)
2007-10-10 11:04:54 -05:00
Gerald Carter
0bf72b6e33 r10781: merging eventlog and svcctl code from trunk
(This used to be commit f10aa9fb84)
2007-10-10 11:04:53 -05:00
Jelmer Vernooij
8c9ad87af2 r10720: Add helper function that does prs alignment on a specified number of bytes.
(This used to be commit 4576e6843b)
2007-10-10 11:04:50 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Gerald Carter
c923e981ca r10432: BUG 3080: fix 'net rpc shutdown' for XP clients
(This used to be commit e877a51487)
2007-10-10 11:03:41 -05:00
Gerald Carter
fbaa3fb8d8 r10278: more fixes for bug 3080. Ensure the length on the message string is correct. Windows 2000 is very senstive io this apparently
(This used to be commit 0fd02f1477)
2007-10-10 11:03:40 -05:00
Gerald Carter
9d7a70f3a4 r10243: fix net rpc shutdown (missing alignments and sending an invalid UNISTR4 for this request)
(This used to be commit cf99e1716d)
2007-10-10 11:03:39 -05:00
Günther Deschner
b515676248 r10205: fix obvious typo in the NET_USER_INFO_3 parsing
Guenther
(This used to be commit fdba056a2f)
2007-10-10 11:03:37 -05:00
Jeremy Allison
adfd5cddf7 r9935: Make it easier to find overruns.
Jeremy.
(This used to be commit e68872d147)
2007-10-10 11:03:28 -05:00
Gerald Carter
be36d74ec2 r9893: fix REG_CREATE_KEY_EX parsing error caused by WinXP clients
looking for an not finding a 'Terminal Server' key.
Claims to make problems with usrmgr.exe support as well
according the Samba ml.

Posted on samba@samba.org for review.  Reviewed by
Thomas Bork (comments integrated into the reg_db.c patch
coming up next).
(This used to be commit ee54d1abf9)
2007-10-10 11:03:26 -05:00
James Peach
8c072021ef r9780: Clean up a bunch of compiler warnings.
(This used to be commit 623d2e6931)
2007-10-10 11:03:26 -05:00
Gerald Carter
44707ad2e0 r9739: conver the reg_objects (REGSUBKEY_CTR & REGVAL_CTR) to use
the new talloc() features:

 Note that the REGSUB_CTR and REGVAL_CTR objects *must* be talloc()'d
 since the methods use the object pointer as the talloc context for
 internal private data.

 There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy()
 pair of functions.  Simply TALLOC_ZERO_P() and TALLOC_FREE() the
 object.

Also had to convert the printer_info_2->NT_PRINTER_DATA field
to be talloc()'d as well.  This is just a stop on the road to
cleaning up the printer memory management.
(This used to be commit ef721333ab)
2007-10-10 11:03:25 -05:00
Gerald Carter
be0f3f159f r9660: real fix for group enumeration bug in 3.0.20; only affected the ldapsam code
(This used to be commit 62f9fb5e3a)
2007-10-10 11:03:24 -05:00
Gerald Carter
1487a72da2 r9593: fix enumerated group name (should be full name (i.e. mapped name) and not unix name)
(This used to be commit 8928575abd)
2007-10-10 11:03:22 -05:00
Gerald Carter
ac42cd59f2 r9086: * fix invalid read in parse_spoolss when writing a devmode to
the wire
* fix dup_a_regval() when size is 0
* ensure we pass a pstring to unlink_internals (fixes delete_driver
  code)
(This used to be commit 353e63ff42)
2007-10-10 11:00:25 -05:00
Gerald Carter
4ff44ae90e r8956: fix segfault caused by trying to parse a UNISTR2
and not a UNISTR2*
(This used to be commit f775fc7209)
2007-10-10 11:00:22 -05:00
Gerald Carter
14a9d52832 r8899: various compiler warning fixes reported by Jason Mader <jason@ncac.gwu.edu>
(This used to be commit d8ae9f2b3e)
2007-10-10 11:00:19 -05:00
Volker Lendecke
8c05cc8a2e r8869: Get rid of a warning.
Volker
(This used to be commit dbcc1de3f8)
2007-10-10 11:00:18 -05:00
Jeremy Allison
8b2b177a8e r8805: Merge a duplicate struct. Get ready to support SPNEGO rpc binds.
Jeremy.
(This used to be commit fd6e342746)
2007-10-10 11:00:18 -05:00
Tim Potter
46e7935d25 r8597: Use UNI_STR_TERMINATE (an enum value) instead of STR_TERMINATE (a
#define) to quieten a warning.  Bugzilla #2892.
(This used to be commit 4e91f29621)
2007-10-10 11:00:12 -05:00
Jeremy Allison
263a51cd62 r8564: Sometimes we're too dumb to live... Fix samr calls where we were
using USER_INFO_XX structs and functions where XX was sometimes
in hex and sometimes in decimal. Now it's all in decimal (should
be no functionality change).
Jeremy.
(This used to be commit 84651aca04)
2007-10-10 11:00:09 -05:00
Jeremy Allison
be964085d2 r8553: Another compile warning fix from jason@ncac.gwu.edu.
Jeremy.
(This used to be commit 99937d99b6)
2007-10-10 11:00:08 -05:00
Gerald Carter
a5868d58c7 r8507: BUG 2557: don't give and rpc fault when you get an unsupported SetPrinter() level
(This used to be commit f617ca33f4)
2007-10-10 11:00:07 -05:00
Günther Deschner
40035db926 r8398: Fix segfault in the client addprinterex-call. Found with "net rpc
printer"-functions.

Thanks to Thomas Di Naro (Novell) for the detailed debug-logs.

Guenther
(This used to be commit b532553b06)
2007-10-10 11:00:04 -05:00
Gerald Carter
270b90e25f r7995: * privileges are local except when they're *not*
printmig.exe assumes that the LUID of the SeBackupPrivlege
  on the target server matches the LUID of the privilege
  on the local client.  Even though an LUID is never guaranteed
  to be the same across reboots.  How *awful*!  My cat could
  write better code! (more on my cat later....)

* Set the privelege LUID in the global PRIVS[] array

* Rename RegCreateKey() to RegCreateKeyEx() to better match MSDN

* Rename the unknown field in RegCreateKeyEx() to disposition
  (guess according to MSDN)

* Add the capability to define REG_TDB_ONLY for using the reg_db.c
  functions and stress the RegXXX() rpc functions.
(This used to be commit 0d6352da48)
2007-10-10 10:58:07 -05:00
Gerald Carter
bd509a81cb r7908: * change REGISTRY_HOOK api to use const (fix compiler warning
in init_registry_data()
* Add means of storing registry values in registry.tdb
* add builtin_registry_values[] array for REG_DWORD and REG_SZ
  values needed during startup
* Finish up RegDeleteValue() and RegSetValue()
* Finish up regdb_store_reg_values() and regdb_fetch_reg_values()

I can now create and retrieve values using regedit.exe on Win2k.

bin/net -S rain -U% rpc registry enumerate 'hklm\software\samba'
Valuename  = Version
Type       = REG_SZ
Data       = 3.0.20

Next is to do the virtual writes in reg_printing.c and I'll be
done with Print Migrator (yeah!  finally)
(This used to be commit 3d837e58db)
2007-10-10 10:58:03 -05:00
Gerald Carter
b8e787bcac r7890: * add Reg[SG]etKeySec() server stubs
* merge a compile warning fix from trunk to SAMBA_3_0
(This used to be commit 71eb018a05)
2007-10-10 10:58:01 -05:00
Jeremy Allison
19ca97a70f r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
(This used to be commit 9506b8e145)
2007-10-10 10:58:00 -05:00
Gerald Carter
8387af752f r7880: fix a typo and memleak on failures cases (patch from marcin)
(This used to be commit 6ff0fa0b43)
2007-10-10 10:58:00 -05:00
Gerald Carter
2fb7ff7d9d r7878: mostly just a rename of REG_INFO to REG_QUERY_VALUE for better clarity
(This used to be commit d50f0ba07e)
2007-10-10 10:58:00 -05:00
Gerald Carter
bc8954c4fc r7839: remove C++ style comment
(This used to be commit e04fd56e00)
2007-10-10 10:57:59 -05:00
Gerald Carter
ef34e3336b r7789: fix overparanoid assert() call when checking spolss buffer pointers
(This used to be commit e81e6e653a)
2007-10-10 10:57:21 -05:00
Jeremy Allison
5c9963c287 r7696: Don't try and be clever and read an 8 byte int and 3 pad bytes
as a uint32 - you'll just get it wrong (as I did :-).
Second attempt to fix the Apple client issues.
Jeremy.
(This used to be commit d2aa5bc7aa)
2007-10-10 10:57:19 -05:00
Gerald Carter
2129d3c711 r7691: * add .gdbinit to the svn:ignore files
* start adding write support to the Samba registry
  Flesh out the server implementations of
  RegCreateKey(), RegSetValue(), RegDeleteKey() and RegDeleteValue()

I can create a new key using regedit.exe now but the 'New Key #1'
key cannot be deleted yet.
(This used to be commit e188fdbef8)
2007-10-10 10:57:19 -05:00
Gerald Carter
2102f6bff9 r7664: add access check hooks to _reg_open_entry which are passed off
to the reg_XXX backend.  If the backend does not define
a regkey_access_check() function, we default to using the
standard registry_access_check()
(This used to be commit 2f08a904ee)
2007-10-10 10:57:19 -05:00
Gerald Carter
b2db8a9bd3 r7649: * fix compile breakage (sorry, should have done a make clean before the
last checking).
* rename unknown field in REG_GETVERSION
* add server stubs for RegDeleteKey() and RegDeleteValue()
(This used to be commit 023728c059)
2007-10-10 10:57:18 -05:00
Gerald Carter
bb2616d018 r7645: adding server stubs for RegCreateKey() and RegSetValue()
(This used to be commit ce82566bad)
2007-10-10 10:57:18 -05:00
Gerald Carter
d559edcce2 r7563: svcctl patches from Marcin; have cleaned up formating and am checking the code in to snapshot it before I start changing more things
(This used to be commit 560ce111ce)
2007-10-10 10:57:14 -05:00
Gerald Carter
fed660877c r7415: * big change -- volker's new async winbindd from trunk
(This used to be commit a0ac9a8ffd)
2007-10-10 10:57:08 -05:00
Günther Deschner
4bc39f05b7 r7391: - Added client-support for various lsa_query_trust_dom_info-calls and a
rpcclient-tester for some info-levels.

  Jerry, I tried to adopt to prs_pointer() where possible and to not
  interfere with your work for usrmgr.

- Add "net rpc trustdom vampire"-tool.

  This allows to retrieve Interdomain Trust(ed)-Relationships from
  NT4-Servers including cleartext-passwords (still stored in the local
  secrets.tdb).

  The net-hook was done in cooperation with Lars Mueller
  <lmuelle@suse.de>.

  To vampire trusted domains simply call:

        net rpc trustdom vampire -S nt4dc -Uadmin%pass

Guenther
(This used to be commit 5125852939)
2007-10-10 10:57:07 -05:00
Jeremy Allison
04e07e8cc9 r7385: Rewrite the RPC bind parsing functions to follow the spec. I haven't yet
tested this so I may have screwed this up - however it now follows the
DCE spec. valgrinded tests to follow....
Jeremy.
(This used to be commit 877e0a61f5)
2007-10-10 10:57:07 -05:00
Gerald Carter
f24d88cf9d r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241)
2007-10-10 10:57:02 -05:00
Gerald Carter
d5e79de595 r6995: * fixing segfault when writing out registry values of zero length
* add RegSaveKey() client function
* add 'net rpc registry save' subcommand
(This used to be commit f35e0a0a8d)
2007-10-10 10:57:00 -05:00
Gerald Carter
f0c650a382 r6942: * merging the registry changes back to the 3.0 tree
* removing the testprns tool
(This used to be commit 81ffb0dbbb)
2007-10-10 10:56:57 -05:00
Gerald Carter
839dc8e59b r6683: remove log messages about unknown specversions since I think we are fairly safe at this point
(This used to be commit 6eaefa1a9a)
2007-10-10 10:56:51 -05:00
Gerald Carter
cf4005a78d r6680: event log patches from Marcin
(This used to be commit a71e104af8)
2007-10-10 10:56:51 -05:00
Gerald Carter
28824fb197 r6601: fixing query and set alias info calls (level 1 from the
MMC manage computer plugin.
(This used to be commit c43c1ec80c)
2007-10-10 10:56:46 -05:00
Jeremy Allison
7b9d6ac23e r6595: This is Volkers new-talloc patch. Just got the go-ahead from
Volker to commit. Woo Hoo !
Jeremy.
(This used to be commit 316df944a4)
2007-10-10 10:56:46 -05:00
Gerald Carter
d65f313fa7 r6491: BUG 2653: patch from Olaf Imig <Olaf.Imig@bifab.de>; allocate memory for user1* in make_spoolss_q_open_printer_ex()
(This used to be commit f04232cce7)
2007-10-10 10:56:43 -05:00
Volker Lendecke
2e0cac8e3e r6445: Make us survive the PARANOID_MALLOC_CHECKER. Should we enable that for
--enable-developer=yes?

Volker
(This used to be commit 61d40ac60d)
2007-10-10 10:56:41 -05:00
Volker Lendecke
d3d6126d94 r6351: This is quite a large and intrusive patch, but there are not many pieces that
can be taken out of it, so I decided to commit this in one lump. It changes
the passdb enumerating functions to use ldap paged results where possible. In
particular the samr calls querydispinfo, enumdomusers and friends have
undergone significant internal changes. I have tested this extensively with
rpcclient and a bit with usrmgr.exe. More tests and the merge to trunk will
follow later.

The code is based on a first implementation by Günther Deschner, but has
evolved quite a bit since then.

Volker
(This used to be commit f0bb44ac58)
2007-10-10 10:56:38 -05:00
Gerald Carter
14ce1ed40c r6243: Yes. I *will* hate myself in the morning for this one.
I need to gather some more information to know if these
extra context id's may be used later.  But for now,
pw changes via CTL+ALT+DEL from win2k3sp1 clients work.
(This used to be commit e7189a4e4b)
2007-10-10 10:56:32 -05:00
Gerald Carter
466a825ce7 r6232: more cleanups; remove BUFFER3; rename BUFFER4 -> RPC_DATA_BLOB; rename REG_CREATE_VALE -> REG_SET_VALUE
(This used to be commit 28d433351c)
2007-10-10 10:56:30 -05:00
Gerald Carter
b137b7cc47 r6228: remove BUFHDR2 and clean up LsaEnumTrustedDomains()
Tested client and server code.
(This used to be commit efb3ac4c69)
2007-10-10 10:56:30 -05:00
Gerald Carter
b4c7204129 r6218: * fix a segv in EnumPrinters():rpc_buffer_alloc when the caller does not provide an
RPC_BUFFER in the request

* add initial (but wire untested) support for RegRestoreKey()
(This used to be commit 22855c7aae)
2007-10-10 10:56:29 -05:00
Gerald Carter
0aa89db947 r6071: * clean up UNISTR2_ARRAY ( really just an array of UNISTR4 + count )
* add some backwards compatibility to 'net rpc rights list'
* verify privilege name in 'net rpc rights privileges <name>' in order
  to give back better error messages.
(This used to be commit 0e29dc8aa3)
2007-10-10 10:56:20 -05:00
Gerald Carter
dbb5a1fdab r6046: $ net -S block -U % -W VALE rpc service status spooler
spooler service is SVCCTL_RUNNING.
Configuration details:
        Service Type         = 0x110
        Start Type           = 0x2
        Error Control        = 0x1
        Tag ID               = 0x0
        Executable Path      = C:\WINNT\system32\spoolsv.exe
        Load Order Group     = SpoolerGroup
        Dependencies         = RPCSS/
        Start Name           = LocalSystem
        Display Name         = Print Spooler
(This used to be commit b921bf5688)
2007-10-10 10:56:18 -05:00
Gerald Carter
259d44dbb2 r6038: adding more flesh to 'net rpc service'
open and close the service control manager.

Also experimenting with ideas for cli_xxx() interface.
(This used to be commit 4da89ef17b)
2007-10-10 10:56:17 -05:00
Gerald Carter
5d1cb8e79e r6014: rather large change set....
pulling back all recent rpc changes from trunk into
3.0.  I've tested a compile and so don't think I've missed
any files.  But if so, just mail me and I'll clean backup
in a couple of hours.

Changes include \winreg, \eventlog, \svcctl, and
general parse_misc.c updates.

I am planning on bracketing the event code with an
#ifdef ENABLE_EVENTLOG until I finish merging Marcin's
changes (very soon).
(This used to be commit 4e0ac63c36)
2007-10-10 10:56:15 -05:00
Simo Sorce
bece9417d2 r6004: Let's make server manager able to kill a user session.
This will send a shutdown command to the right process by pid read from the sessions list.
(This used to be commit 5d3d025db7)
2007-10-10 10:56:15 -05:00
Gerald Carter
d2b8348fef r5946: BUG 2497: fix bug in rpcclient's deletedriverex when asking to delete all versions of a driver
(This used to be commit 1f00602786)
2007-10-10 10:56:10 -05:00
Gerald Carter
c8e0202277 r5809: try to catch NULL pointers during developerment for rpcbuf_move()
(This used to be commit f9e9a42c07)
2007-10-10 10:56:02 -05:00
Gerald Carter
76f3e5a90f r5808: removing unneeded structure field from RPC_BUFFER
(This used to be commit 9b0bfd7e6f)
2007-10-10 10:56:02 -05:00
Gerald Carter
61dfab9f70 r5805: merging spoolss parsing changes from trunk and cleaning up resulting segvs
(This used to be commit 25121547ca)
2007-10-10 10:56:01 -05:00
Gerald Carter
66df8431ec r5726: merge LsaLookupPrivValue() code from trunk
(This used to be commit 277203b535)
2007-10-10 10:55:57 -05:00
Jim McDonough
180fa12026 r5580: Fix "net rpc trustdom add". Much closer to what windows does. Also stop
referencing unknown_6 from sam, because it's just fixed at 1260, the max
len of LOGON_HRS.  Need to go in and mark it as "remove me" from passdb.
(This used to be commit ffac752875)
2007-10-10 10:55:48 -05:00
Andrew Bartlett
8d06233d11 r5536: Avoid intermediate copy of NT and LM responses in NETLOGON client.
This copy was length-limited, which broke when the NTLMv2 response was
more than 128 bytes in length.

Andrew Bartlett
(This used to be commit bae18aaaff)
2007-10-10 10:55:45 -05:00
Günther Deschner
e98f56373b r5262: Fix server_role in the samr_query_dom_info calls. When we are a BDC we
should not say we are a PDC.

Guenther
(This used to be commit 6cdf3b97de)
2007-10-10 10:55:34 -05:00
Volker Lendecke
c23c9bfd67 r5125: Fix bug 2113 -- thanks to jason@ncac.gwu.edu
(This used to be commit 0c205bcc86)
2007-10-10 10:55:28 -05:00
Volker Lendecke
fcfc94a66a r4946: Our notion the other_sids in the info3 SamLogon struct was
...hmmm... completely bogus. This does not affect us as a domain controller,
as we never set other_sids, but I have *no* idea how winbind got away with it.

Please review thoroughly, samba4 idl looks closer to reality here.

Test case: Member of w2k3 domain, authenticate as a user who is member of one
or more domain local groups. Easiest review with 'client schannel = no'.

Thanks,

Volker
(This used to be commit a0a6388830)
2007-10-10 10:55:08 -05:00
Jeremy Allison
b3b315078e r4875: Fix for bugid #221, inspired by Mrinal Kalakrishnan <mail@mrinal.net>.
NT sometimes send garbage bytes in NT security descriptor linearizations
when sending well-known sids. Cope with these.
Jeremy.
(This used to be commit 51b34bb536)
2007-10-10 10:55:06 -05:00
Günther Deschner
725edd20f1 r4868: Add "net rpc user RENAME"-command.
Note that Samba3 does not yet support it server-side.

Guenther
(This used to be commit b2c8220931)
2007-10-10 10:55:05 -05:00