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

1876 Commits

Author SHA1 Message Date
Gerald Carter
78bf4042dd r21635: Don't free talloc()'d memory. I wish people would check the callers
when changing how memory is allocated.
2007-10-10 12:18:19 -05:00
Jeremy Allison
8d45f1f3b5 r21569: Fix bug reported by Martin Zielinski <mz@seh.de>
where return value was incorrectly initialized.
Jeremy.
2007-10-10 12:18:14 -05:00
Volker Lendecke
4423880ff4 r21563: Fix a memleak: We only need dispinfo structs for "our" and for the builtin
domain. Without this patch we leaked a DISPINFO for the (NULL) domain per
samr_connect*() call.

Volker
2007-10-10 12:18:14 -05:00
Volker Lendecke
f63189907e r21551: Ok, this is more subtle. More tomorrow :-) 2007-10-10 12:18:12 -05:00
Volker Lendecke
fad2ee8aa3 r21550: make disp_info_list static to get_samr_dispinfo_by_sid(), add a comment :-) 2007-10-10 12:18:12 -05:00
Volker Lendecke
0aceda68a8 r21549: Only create DISP_INFO structs for domain handles, the others don't need
them. It just does not make sense to do a querydispinfo on an alias handle...

This fixes a memleak: Every samr_connect*() call leaked a DISP_INFO for the
(NULL) sid.

More cleanup pending: Essentially, we only need the DISP_INFO cache for the
get_global_sam_sid() domain. BUILTIN is fixed and small enough, and there are
no other domains around where enumerations could happen.

This also removes the explicit builtin_domain flags. I don't think this is
worth it. If this makes a significant difference, then we have a *VERY* tuned
RPC layer...

Jeremy, please check this. If it's ok, we might want to merge it across.

Volker
2007-10-10 12:18:12 -05:00
Gerald Carter
6a69caf690 r21507: Fix some "cannot access LDAP when no root" bugs.
The two culprits were

* pdb_get_account_policy()
* pdb_get_group_sid()
2007-10-10 12:18:09 -05:00
Jelmer Vernooij
e73a418b5b r21462: Fix EnumValue (?) 2007-10-10 12:18:06 -05:00
Jelmer Vernooij
b84370513f r21385: Regenerate IDL after pidl changes, sync winreg.idl from samba4. 2007-10-10 12:18:00 -05:00
Volker Lendecke
b419a34075 r21265: Fix some valgrind errors -- not in 3_0 2007-10-10 12:17:52 -05:00
Jeremy Allison
83dbbdff34 r21191: Add in the POSIX open/mkdir/unlink calls.
Move more error code returns to NTSTATUS.
Client test code to follow... See if this
passes the build-farm before I add it into
3.0.25.
Jeremy.
2007-10-10 12:17:47 -05:00
Jeremy Allison
b16707a861 r21164: Fix from Martin Zielinski <mz@seh.de> for EnumprinterdataEX
on Vista.
Jeremy.
2007-10-10 12:17:45 -05:00
Jeremy Allison
0e9ad2b29f r21129: Fix from Martin Zielinski <mz@seh.de> - ensure
the hand marshalled container size is a multiple
of 4 bytes for RPC alignment.
Jeremy.
2007-10-10 12:17:41 -05:00
Volker Lendecke
3f620d181d r21115: notify_internal.c needs to remove the table entry if a process has crashed. So
it needs the specific error message.

Make messages.c return NTSTATUS and specificially NT_STATUS_INVALID_HANDLE if
sending to a non-existent process.

Volker
2007-10-10 12:17:39 -05:00
Jeremy Allison
d18a3f8b72 r21100: Add the RPC hack fix to adddriver as well as adddriverex.
Thanks to Martin Zielinski <mz@seh.de>.
Jeremy.
2007-10-10 12:17:37 -05:00
Jeremy Allison
fbab8e4ba9 r21099: Protect ourselves from null pointer deref. This isn't
the correct fix for the Vista bug, but it needed as
protection against invalid RPC. Thanks to Martin Zielinski <mz@seh.de>
for pointing this out.
Jeremy.
2007-10-10 12:17:37 -05:00
Volker Lendecke
c8ae60ed65 r21064: The core of this patch is
void message_register(int msg_type,
                      void (*fn)(int msg_type, struct process_id pid,
-                                void *buf, size_t len))
+                                void *buf, size_t len,
+                                void *private_data),
+                     void *private_data)
 {
        struct dispatch_fns *dfn;

So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.

Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.

Volker
2007-10-10 12:17:32 -05:00
Jeremy Allison
01c659692c r21047: Hand marshalling hack from Martin Zielinski <mz@seh.de>
to allow Vista to upload printer drivers (it wants level 8
which we don't support yet). Downgrade in the same way
that Windows servers do.
Jeremy.
2007-10-10 12:17:29 -05:00
Volker Lendecke
a7a66eb4eb r20876: Fix bug 4346 -- Thanks to YAMASAKI Hiroyuki 2007-10-10 12:17:17 -05:00
Jelmer Vernooij
0596badb41 r20875: Pass DCE/RPC server call arguments as a struct rather than as separate arguments.
This makes it a bit more similar to the Samba4 code.
2007-10-10 12:17:16 -05:00
Jeremy Allison
6133a694aa r20844: Somewhat radical change - this may break the build (I will
watch carefully - so I'm doing it in one transaction so I can
roll back).

Change check_name(), reduce_name() and dptr_create() to
return NTSTATUS. This helps a lot in error path processing
and especially in reduce_name() allows us to ditch the flaky
and error-prone saving of errno and return errors directly.

Jeremy.
2007-10-10 12:17:12 -05:00
Jelmer Vernooij
580f2a7197 r20832: Remove extra pointers previously added to unique [out] pointers. Instead,
add [ref] pointers where necessary (top-level [ref] pointers,
by spec, don't appear on the wire).

This brings us closer to the DCE/RPC standard again.
2007-10-10 12:17:11 -05:00
Volker Lendecke
3c879745cf r20824: Send access to the trusted domain passwords through the pdb backend, so that
in the next step we can store them in LDAP to be replicated across DCs.

Thanks to Michael Adam <ma@sernet.de>

Volker
2007-10-10 12:17:10 -05:00
Jeremy Allison
f4474edf6a r20718: Sync up the filename path parsing changes from SAMBA_3_0_24.
The only difference between the two trees now w.r.t file
serving are the changes to smbd/open.c in this branch I need
to review.
Jeremy.
2007-10-10 12:17:04 -05:00
Volker Lendecke
8f67efd582 r20546: Fix some IBM checker errors 2007-10-10 12:16:56 -05:00
Herb Lewis
41be182f78 r20269: merge -r20264:20267 from SAMBA_3_0_24
more no previous prototype warnings
2007-10-10 12:16:38 -05:00
Volker Lendecke
ad1e00430b r20020: Arglll... eventlogadm links against reg_db but not the rest of the registry
stuff. Revert the last change.

This needs better fixing.

Volker
2007-10-10 12:16:21 -05:00
Volker Lendecke
cab5ccbbe4 r20019: Replace one set of tricky code by calls to another set of tricky code:
Initializing the reg_db now uses reg_createkey and reg_setvalue.

Volker
2007-10-10 12:16:21 -05:00
Volker Lendecke
fc29a283cc r20017: Make srvsvc_NetShareAdd & friends take care of registry shares 2007-10-10 12:16:21 -05:00
Volker Lendecke
0afd696f88 r20015: We have to zero out handle on key_close, otherwise the NT4 regedit will re-use the handle 2007-10-10 12:16:20 -05:00
Volker Lendecke
0104371dd6 r20013: Fix segfaults: parm_error is a unique in/out ptr 2007-10-10 12:16:20 -05:00
Volker Lendecke
b32c65cb62 r20012: Reformatting 2007-10-10 12:16:20 -05:00
Volker Lendecke
3da37287ca r20007: Fix a const warning just introduced 2007-10-10 12:16:19 -05:00
Volker Lendecke
fea52801de r19991: Sorry for this 2000-liner...
The main thing here is a rewrite of srv_winreg_nt.c. The core functionality
has moved to registry/reg_api.c which is then usable by the rest of Samba as
well.

On that way it fixes creating keys with more than one element in the
path. This did not work before.

Two things that sneaked in (sorry :-) is the change of some routines from
NTSTATUS to WERROR the removed "parent" argument to regkey_open_internal.

Volker
2007-10-10 12:16:18 -05:00
Volker Lendecke
6cab254c49 r19963: Add 'registry shares = yes' and registry key security descriptors. 2007-10-10 12:16:16 -05:00
Volker Lendecke
a177bbb2d5 r19947: Change regkey_open_internal to take the parent key and a talloc_ctx as
arguments. This also replaces regkey_close_internal by TALLOC_FREE.

Volker
2007-10-10 12:16:14 -05:00
Volker Lendecke
978a6196bf r19930: Revert the winreg idl changes. At least enumkey does not work anymore today.
With more than 5 different trees I can't swear that I did test this properly
yesterday. Sorry for the noise.

Volker
2007-10-10 12:16:10 -05:00
Volker Lendecke
2369ad0852 r19929: Fix indentation 2007-10-10 12:16:10 -05:00
Volker Lendecke
b714b51884 r19919: Convert winreg_EnumKey to use ref ** instead of a unique *.
Volker
2007-10-10 12:16:10 -05:00
Volker Lendecke
1b460d6cdf r19918: Convert winreg_CreateKey to use a ref ** instead of a unique *. W2k3 can still
create keys on Samba and vice versa.

Jelmer, please check.

Thanks,

Volker
2007-10-10 12:16:09 -05:00
Volker Lendecke
f1266475da r19915: Fix two type-punned warnings 2007-10-10 12:16:09 -05:00
Volker Lendecke
b148cde7f3 r19914: The "default" value with the name "" need different 0-length treatment as the
other StringBufs, otherwise clicking on a key with this value being set leads
to regedit.exe on w2k3 chew all memory.
2007-10-10 12:16:09 -05:00
Volker Lendecke
01a53590a6 r19912: Move the subkey cache to srv_winreg_nt.c 2007-10-10 12:16:08 -05:00
Volker Lendecke
81bd816fa2 r19872: Move the value cache to srv_winreg_nt.c. Fix some minor issues found while
playing with regedit.exe.

Volker
2007-10-10 12:16:03 -05:00
Volker Lendecke
0ed3a21fcc r19867: Introduce struct regkey_info in srv_winreg_nt.c to be able to re-add the
QueryValue and later the QueryKey cache independent of the backend.

Volker
2007-10-10 12:16:03 -05:00
Volker Lendecke
c8c81f0e86 r19860: Streamline _winreg_QueryValue a bit. We've been pushing around memory
considerably here.

This temporarily removes a cache for the tdb based registry, I'll re-add that
in srv_winreg_nt.c in the next step.

This fixes creating/renaming values from the windows regedit.exe, as "New
Value #1" was not entering the cache after being created.

Volker
2007-10-10 12:16:03 -05:00
Volker Lendecke
cd14b7f052 r19824: Fix the max value calculation in QueryInfoKey 2007-10-10 12:16:00 -05:00
Volker Lendecke
c1083216c8 r19819: Windows returns an empty string instead of NULL here 2007-10-10 12:15:59 -05:00
Volker Lendecke
8df6544fa8 r19803: Fix problem reported by Chetan S: QueryInfoKey needs to report the max name
length in *bytes* for UTF-16, not the string length. This got lost during the
conversion.

This took a while to figure out :-)

Thanks to Chetan!

Volker
2007-10-10 12:15:56 -05:00
Volker Lendecke
f808182346 r19780: Ok, regkey_open_internal needs a regkey_close_internal. Giving a talloc ctx is
misleading here. This needs fixing properly :-)

Volker
2007-10-10 12:15:55 -05:00