1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-27 08:23:49 +03:00
Commit Graph

5845 Commits

Author SHA1 Message Date
Andrew Tridgell
e4ca36bda3 r9377: made winreg a user tool (I find it quite useful). I expect it to get the ability
to add/remove keys and values in the future.

add it to the standard tests, ensuring that we know if winreg
breaks. This is particularly important as winreg uses such unusual IDL
constructs
2007-10-10 13:33:30 -05:00
Andrew Tridgell
57e6bd6139 r9374: HPUX is also missing setegid() 2007-10-10 13:33:29 -05:00
Stefan Metzmacher
1a2b836958 r9373: - create a hierachical memory tree with recursiv ndr_pull_* functions
- with this it's also possible to talloc_free() the ndr_pull structure
  and talloc_steal(ndr->current_mem_ctx); to fetch the whole data of the hierachical tree
- if the toplevel struct is a valid talloc pointer it's also possible to use
  NDR_PULL_SET_MEM_CTX(ndr, mem_ctx); to the the toplevel pointer with the struct pointer

(NOTE: no callers are using this yet, but they shortly will)

metze
2007-10-10 13:33:29 -05:00
Stefan Metzmacher
09de7e0af7 r9372: - make the subcontext handling autogenerated code look nicer,
- unify the handling of subcontext, compression and obfucation

metze
2007-10-10 13:33:29 -05:00
Stefan Metzmacher
9b9635833f r9371: add the usefull trick hack for NT_STATUS_NO_MEMORY too
metze
2007-10-10 13:33:29 -05:00
Andrew Tridgell
5a38b9a10b r9370: need a configure test for setresuid() 2007-10-10 13:33:28 -05:00
Andrew Tridgell
e8260a81cf r9369: an attempt to fix the build on HPUX. This is based on work by Don
McCall, but takes a slightly different approach that I hope will be
more generic
2007-10-10 13:33:28 -05:00
Andrew Tridgell
8aff6a0bd8 r9360: fixed the IDL for winreg_SetValue() 2007-10-10 13:33:28 -05:00
Andrew Tridgell
17f3250dd6 r9359: don't check for size overflow if value is NULL
this gets viewing the product options in smbd HKLM from w2k3 regedit
working
2007-10-10 13:33:28 -05:00
Andrew Tridgell
bcef9e592a r9358: - opening a winreg key of "" is the same as re-opening the hive. The
w2k3 regedit does this.

- w2k3 expects null termination is string lengths
2007-10-10 13:33:27 -05:00
Tim Potter
8d376d56c7 r9357: Remove DBGC_CLASS cruft copied over from Samba 3. I would like to
replace this with something funkier.
2007-10-10 13:33:27 -05:00
Andrew Tridgell
56769b4b1d r9356: a better way of coping with NULL arrays in the array bounds checking. This copes with the
case of size_is(*size) where size is NULL, and the array is NULL
2007-10-10 13:33:27 -05:00
Andrew Tridgell
3a9c63923f r9355: return the EnumKey and EnumValue list we have so far when we get a rpc fault 2007-10-10 13:33:27 -05:00
Andrew Tridgell
ad1b9867a5 r9347: this array bounds checking is harder than it looks ...
this copes with 2 more situations:

1) where the array is NULL, which would previously be coped with by a
   if (ptr) check, but now in the deferred array bounds checking needs
   to look at the array variable in the ndr code. Not nice.

2) nest the array checking along with the SCALARS vs BUFFERS checks, ensuring we don't
   do array bounds checking for a buffer when in scalars only mode
2007-10-10 13:33:27 -05:00
Andrew Tridgell
3ad02091f6 r9346: allow test_ldap.sh to be called when $CONFFILE is not set 2007-10-10 13:33:26 -05:00
Andrew Tridgell
cc5a3e9cc3 r9344: started adding calls for manipulation of data blobs in ejs
added:

  blobToArray()
  blobFromArray()
  blobCompare()
2007-10-10 13:33:26 -05:00
Andrew Tridgell
a7a1752ca4 r9340: print the [in] contents when debugging even if the marshalling
failed. This makes it easier to track down marshalling bugs.
2007-10-10 13:33:25 -05:00
Andrew Tridgell
a8bca2e8e2 r9339: treat arrays of uint8 values as a special DATA_BLOB type in the ejs
interfaces to RPC. This makes large blobs of data much saner. Tim, you
will probably want to do the same for the smb_interfaces.h generated
code.

Next we will need ways of extracting different data types from these
blobs, for example asking for the blob to be interpreted as a utf16
string, or as a little-endian integer. That will allow for registry
scripting to be quite sane.
2007-10-10 13:33:25 -05:00
Andrew Tridgell
8354b01612 r9338: fixed the winreg IDL to be correct for the EnumKey and EnumValue
calls. The previous IDL was just a workaround for the limitations of
our older rpc infrastructure. Now that Jelmer has added much improved
string support using the charset keyword we can correctly implemenent
the unusual winreg string buffers.

Jelmer, note the little comment I put on winreg_StringBuf() about why
I couldn't use [value()] for the length field.

This also fixes EnumKey() and EnumValue() to use NTTIME fields for the
last_changed_time. I don't know why we were using a pair of uint32's,
as it is just a NTTIME.
2007-10-10 13:33:25 -05:00
Andrew Tridgell
127ed0cfe2 r9337: defer the checking of array sizes until the end of the
function/structure, as the checks might involve variables that have
not yet been unmarshalled. This is needed to cope with the correct IDL
for the winreg pipe.

Jelmer, can you look at this when you get a chance and see if you
think this is a reasonable approach? Sorry its wrecks the nice
indentation in the generated code.
2007-10-10 13:33:25 -05:00
Andrew Tridgell
6cf20e7adb r9335: only copy the in side of an array to the out side of an array when the
array is a [ref] pointer. For non-ref arrays it is quite valid for a
server to return a larger response array then the client gave (as can
happen with winreg) in which case this memcpy() will fault.
2007-10-10 13:33:25 -05:00
Alexander Bokovoy
95d96c79a5 r9321: Fix potential bug found by Coverity. src_len has to be int but later we do pass it as size_t. In case src_len is negative, we need to register a failure and return to the caller 2007-10-10 13:33:24 -05:00
Alexander Bokovoy
127e06492a r9320: Fix premature dereference bug found by Coverty and also get rid of non-used memory context 2007-10-10 13:33:24 -05:00
Andrew Tridgell
3f30c6118b r9319: updated newuser script for new OO style for nss object
thanks to Hotarut for spotting this
2007-10-10 13:33:24 -05:00
Stefan Metzmacher
2a107472c3 r9318: fix searches with scope ONE and SUB,
the problem was that ldb_dn_compare_base() just looked at if
both dn's mtach some how, and the following happens:

basedn: CN=bar,DC=foo,DC=com
dn: DC=foo,DC=com

and dn: DC=foo,DC=com was return as result of a sub and base search

and also the ONE search with
basedn: DC=foo,DC=com

returned this

dn: CN=bla,CN=bar,DC=foo,DC=com

metze
2007-10-10 13:33:23 -05:00
Steve French
ae7b073af3 r9311: Missing null pointer check in ejsLib
Found by coverity
2007-10-10 13:33:23 -05:00
Steve French
3b707b9289 r9310: Add two missing return statements after null pointer checks to fix potential oops in kdc code.
Found by coverity.
2007-10-10 13:33:23 -05:00
Steve French
bafd3afbef r9309: Incorrect null pointer check in return from talloc.
Found by coverity.
2007-10-10 13:33:23 -05:00
Andrew Bartlett
aa36b2adad r9305: Use the check-var.m4 from roken to really, really detect h_errno correctly.
This fixes the build on Fedora Core 4.

Andrew Bartlett
2007-10-10 13:33:23 -05:00
Andrew Tridgell
1ae255aba4 r9300: cope with zero length in ndr_pull_charset() 2007-10-10 13:33:22 -05:00
Andrew Tridgell
17679676d4 r9299: fixed the evaluation of pointer expressions that evaluate to boolean 2007-10-10 13:33:22 -05:00
Andrew Tridgell
9526f2a510 r9298: pull non-array elements before array elements to overcome the problem
of arrays that have length_is() or size_is() properties that refer to
later elements
2007-10-10 13:33:22 -05:00
Tim Potter
e8d53d15e4 r9297: Add a NDR_CHECK() around each ejs push/pull.
Some experimentation with the top level function calls.
2007-10-10 13:33:22 -05:00
Tim Potter
72420f24e6 r9296: Reinstate generation of push/pull functions for each field in a struct
or union.
2007-10-10 13:33:22 -05:00
Tim Potter
a7504ebf95 r9295: Tridge had some good suggestions for simplifying the smb_interfaces ejs
code.  I will try and get just the push/pull functions working rather than
getting in a mess with trying to do everything at once.
2007-10-10 13:33:21 -05:00
Tim Potter
13a101653e r9292: More compiles fixes for autogenerated smb_interfaces ejs wrappers.
Add some code to try and work out whether a smb_interface requires a
TALLOC_CTX in the function signature.  I'm not sure whether this is
going to work as the raw api is a bit inconsistent I think.
2007-10-10 13:33:21 -05:00
Tim Potter
9e5ce3a288 r9291: Add a stub for smb_raw_lpq() which is in smb_interfaces.h but doesn't
seem to be used anywhere yet.
2007-10-10 13:33:21 -05:00
Tim Potter
6a7922a02c r9284: Whitespace. (-: 2007-10-10 13:33:21 -05:00
Tim Potter
2215cc08b7 r9279: In Samba3 debuglevel 10 used to print RPC debugs. I think this should
apply to Samba4 as well so change the DEBUGLEVEL > 10 to DEBUGLEVEL >= 10.
2007-10-10 13:33:21 -05:00
Stefan Metzmacher
b5626c978f r9260: only overwrite destination files when the temp files was created correct
metze
2007-10-10 13:33:20 -05:00
Stefan Metzmacher
3b99c36857 r9258: return is only supported in function, not in plain shell scripts
metze
2007-10-10 13:31:38 -05:00
Stefan Metzmacher
8c8fd4cfc6 r9257: - I assume we don't need unistd.h in this file,
that sould fixes the build on aix
- use "" instead of <> for includes in our tree

metze
2007-10-10 13:31:38 -05:00
Stefan Metzmacher
83d65d0d7e r9240: - move struct security_token to the idl file, with this we can
the ndr_pull/push/print functions for it in the ntacl-lsm module

- fix compiler warnings in the ldap_encode_ndr_* code

metze
2007-10-10 13:31:37 -05:00
Tim Potter
3b2476e0a0 r9239: I think this is the right IDL for the eventlog record. Pidl is
generating incorrect code for arrays of strings here.
2007-10-10 13:31:37 -05:00
Tim Potter
d0225f1079 r9238: Some test code to do user-unmarshalling of eventlog_Record data. 2007-10-10 13:31:36 -05:00
Tim Potter
2543f78df6 r9237: Fix eventlog_Record typedef so it decodes records source and computer
names.  Need to get working with SIDs and extra data.
2007-10-10 13:31:35 -05:00
Andrew Bartlett
cf8bf1e9f3 r9235: Remove attribute search we no longer reference.
Andrew Bartlett
2007-10-10 13:31:35 -05:00
Andrew Bartlett
c96f8594b1 r9234: Ensure we always change the end of the PAC, no matter what it is. Fix
typo in comment.

Andrew Bartlett
2007-10-10 13:31:35 -05:00
Andrew Bartlett
ab75cd53e7 r9233: Ensure that the output variable is initialised in this conversion from
error to non-error case.

Andrew Bartlett
2007-10-10 13:31:35 -05:00
Andrew Tridgell
ceb7669e59 r9227: cleanup and simplify the AJAJ code 2007-10-10 13:31:34 -05:00