1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

46 Commits

Author SHA1 Message Date
Stefan Metzmacher
208991e497 s4:libnet: let libnet_rpc_userinfo() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
59fb19ebc4 s4:libnet: let libnet_rpc_userinfo_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Jeremy Allison
0dc6181894 CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:46 +01:00
Stefan Metzmacher
84ae92da6b s4:libnet: pass an explicit mem_ctx to libnet_rpc_userinfo_send() (bug #8889)
This hopefully fixes the flakey autobuild.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Apr 24 16:43:03 CEST 2012 on sn-devel-104
2012-04-24 16:43:03 +02:00
Andrew Bartlett
4f7666f971 s4-libnet Always return after composite_error()
This can and does cause crashes as multiple conflicting sets of callbacks run on
memory that may have been destroyed.

Andrew Bartlett
2012-04-23 20:48:02 +10:00
Andrew Bartlett
3ffd0f8423 s4-libnet: Fix continue_groupinfo_openuser to check correct state info
This meant that we would attempt to query the user that we could not open.

This is a mirror of 4ba1647d5db59e5bb4911c399111e9286aac1a8e.

Andrew Bartlett
2012-04-23 20:48:02 +10:00
Andrew Bartlett
1a5eafba13 s4-libnet: Move to talloc_get_type_abort()
The NULL pointer dereference from talloc_get_type() might be free, but the
information on the actual and expected types from talloc_get_type_abort()
is priceless! :-)

Andrew Bartlett
2012-03-01 22:04:46 +11:00
Stefan Metzmacher
a8967c378c s4:libnet/userinfo.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:44 +01:00
Stefan Metzmacher
f995e596bb s4:libnet: make use of explicit dcerpc_*_recv functions
metze
2010-03-01 16:11:53 +01:00
Jelmer Vernooij
ff26cb4b1c Fix compiler warnings in libnet. 2008-12-23 22:11:21 +01:00
Günther Deschner
09998ab89d s4-samr: merge samr_QueryUserInfo{2} from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:31 +01:00
Günther Deschner
61391d0ade s4-samr: merge samr_LookupNames from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Jelmer Vernooij
87ec1d2532 Make sure prototypes are always included, make some functions static and
remove some unused functions.
2008-10-20 18:59:51 +02:00
Rafal Szczesniak
a47313851f r24051: more monitor function calls and monitor msg names
convention change.

rafal
(This used to be commit 6ab10b2ed256fa3c55d1af8ddcc9dfdaf4598a1e)
2007-10-10 15:01:18 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
40cd2d7780 r22944: fix bug #4618:
rename private -> private_data

metze
(This used to be commit 58551f2f28fce8f1fcd04736c47ecd7458f32ea2)
2007-10-10 14:52:30 -05:00
Rafal Szczesniak
7e14a25dc6 r22811: two more memory allocation checks.
rafal
(This used to be commit d66b13f6facdba407604f33211574f43163b186c)
2007-10-10 14:52:19 -05:00
Rafal Szczesniak
6bf83794e5 r22804: convert libnet_rpc_userinfo function to use "continue" functions
instead of a single handler.

rafal
(This used to be commit c27c0523ac695ef71df9b3176a69c6fb25b02ac0)
2007-10-10 14:52:18 -05:00
Rafal Szczesniak
da7f449a07 r22763: replace talloc_zero calls with composite_create and add more
allocation checks.

rafal
(This used to be commit 621f3e567478fc8067f08f3589b54bf58ca9e1f1)
2007-10-10 14:52:16 -05:00
Rafal Szczesniak
89e4387a08 r19024: remove read-only and policy dependent fields and flags
from user modify routines.

rafal
(This used to be commit 7ca0d3dbcb9193c0f023e7c43764c7557925bb0e)
2007-10-10 14:20:29 -05:00
Rafal Szczesniak
1ba24e8680 r18657: handle the case where rpc call went fine, but the result
not necessariy did.

rafal
(This used to be commit 69c379cc636d2ccd454ea21c7ccebf27dd84e40d)
2007-10-10 14:19:00 -05:00
Rafal Szczesniak
04bc987b29 r15996: Implement a missing monitor message.
rafal
(This used to be commit 37ec35672e23c8a3e3f1f44d2fce69a0729519fb)
2007-10-10 14:08:47 -05:00
Rafal Szczesniak
95399b1e66 r15938: Extend userinfo call with one optional stage - lookup for
username to resolve it to a rid, when a sid argument is not
explicitly provided.

rafal
(This used to be commit 9bc4ef267c3d6720422e2a2f7f2c1572ba694d2d)
2007-10-10 14:08:42 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c173992dc938d537bdf1103bf519dbf)
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513752d2eafbe77f9de598de16ef84a1f)
2007-10-10 13:58:42 -05:00
Jelmer Vernooij
1060f6b3f6 r14402: Generate seperate headers for RPC client functions.
(This used to be commit 7054ebf0249930843a2baf4d023ae8f62cedb109)
2007-10-10 13:57:19 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 122835876748a3eaf5e8d31ad1abddab9acb8781)
2007-10-10 13:52:24 -05:00
Stefan Metzmacher
ba76f23df9 r12611: fix compiler warnings
metze
(This used to be commit 50940879f6e373adbc83ae6e19168486dafaec34)
2007-10-10 13:49:04 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10 13:49:03 -05:00
Rafal Szczesniak
2255f0b483 r10633: Formatting.
rafal
(This used to be commit 0e45dc3bac0e699b2da5b7f8df9d4bf7bd80a0f5)
2007-10-10 13:39:13 -05:00
Stefan Metzmacher
ab4d635b92 r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
(This used to be commit 4527815a0a9b96e460f301cb1f0c0b3964c166fc)
2007-10-10 13:38:57 -05:00
Rafal Szczesniak
b2ed6343cb r8761: Propagate changes in monitor messaging code.
rafal
(This used to be commit 5be8479d5cf119bcda4046bf1c5d7c3b876e718d)
2007-10-10 13:30:03 -05:00
Rafal Szczesniak
204722b868 r7732: Implementation of very basic lookup function (to be used in more
specific routines like resolving a pdc).
Also, couple of formatting fixes.

rafal
(This used to be commit b9deaa995da3a732514d5ceab0010adb58be5fe0)
2007-10-10 13:18:27 -05:00
Rafal Szczesniak
21fd11ff71 r7588: Fix lacking space in the comment.
rafal
(This used to be commit cd89cf991923ee1184af41be4d48b372ca963062)
2007-10-10 13:18:12 -05:00
Rafal Szczesniak
c29896d0ae r7490: Rename functions and prefices s/rpc_composite/libnet_rpc/
This makes more clear where the functions belong to. Also
the rule will be that lowercased function names are not
part of "official" libnet API (though it doesn't mean one
absolutely cannot use them).

rafal
(This used to be commit f6ef7b882acc6ee07422944a417a8d9013c9d8d2)
2007-10-10 13:17:59 -05:00
Rafal Szczesniak
a71af5f83f r6718: Formatting fixes.
rafal
(This used to be commit a784c46dd40ee2ea00fb67caeb358e76cdc0712f)
2007-10-10 13:16:37 -05:00
Rafal Szczesniak
c19d6aeca7 r6624: I have put monitor function pointer into userinfo call, but I haven't put
any possibility to pass such pointer from calling function... :)

rafal
(This used to be commit 08a8878436f3ba21666f43e9abafb27055a02e8a)
2007-10-10 13:16:32 -05:00
Rafal Szczesniak
7285111162 r6616: First (and totally untested) approach to monitoring userinfo
composite call.

rafal
(This used to be commit 227c9fb45bdba5ac795ee14f7e51ccaa18a2a0e1)
2007-10-10 13:16:31 -05:00
Rafal Szczesniak
d2f0a9fab9 r6384: Formatting fixes.
rafal
(This used to be commit ebf151ca6e740fb7939161de14a0adfc47f80010)
2007-10-10 13:11:35 -05:00
Andrew Tridgell
772f31797d r6165: fixed up the userinfo composite code. Fixes include:
- talloc should always be done in the right context. For example, when creating
  the userinfo_state structure, place it inside the composite
  structure, not directly on the pipe. If this isn't done then
  correct cleanup can't happen on errors (as cleanup destroys the top
  level composite context only)

- define private structures like userinfo_state in the userinfo.c
  code, not in the public header

- only keep the parameters we need in the state structure. For
  example, the domain_handle is only needed in the first call, so we
  don't need to keep it around in the state structure, but the level is
  needed in later calls, so we need to keep it

- always initialise [out,ref] parameters in RPC calls. The [ref] part
  means that the call assumes the pointer it has been given is
  valid. If you don't initialise it then you will get a segv on
  recv. This is why the code was dying.

- don't use internal strucrure elements like the pipe
  pipe->conn->pending outside of the internal rpc implementation. That
  is an internal list, trying to use it from external code will cause crashes.

- rpc calls assume that rpc call strucrures remain valid for the
  duration of the call. This means you need to keep the structures
  (such as "struct samr_Close") in the userinfo_state strucrure,
  otherwise it will go out of scope during the async processing

- need to remember to change c->state to SMBCLI_REQUEST_DONE when the
  request has finished in the close handler, otherwise it will loop
  forever trying to close

Mimir, please look at the diff carefully for more detailed info on the fixes
(This used to be commit 01ea1e7762e214e87e74d6f28d6efeb6cdea9736)
2007-10-10 13:11:23 -05:00
Rafal Szczesniak
7288298b65 r6164: More comments in the code.
rafal
(This used to be commit 01cbed98b32c2050a665aec51a99288e4afb29c1)
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
e9ca6e48ff r5775: Remove some unused functions (unions are no longer as special as they used to be)
Add oxid mapping table support in DCOM
(This used to be commit e193555f0eec2dda8c8760e9668181200fef0a1e)
2007-10-10 13:11:02 -05:00
Rafal Szczesniak
c148831783 r5677: Split structure definitions from implementation.
rafal
(This used to be commit ec177c92266713e9a486e536c2d81af4eaa2425e)
2007-10-10 13:10:59 -05:00
Rafal Szczesniak
181da32361 r5576: Bunch of fixes pointed by tridge. A few more to come...
rafal
(This used to be commit e5daf6911b49cd4aa0bff050fe8c559d6604859e)
2007-10-10 13:10:54 -05:00
Rafal Szczesniak
595228c4c3 r5474: Remove random notes put in code.
rafal
(This used to be commit bfb4dfaa8c039378b4c29f130cbcdc89eac951b9)
2007-10-10 13:10:48 -05:00
Rafal Szczesniak
dd411b005e r5472: First approach to composite rpc call fetchin user info.
It does only compile. Completely untested yet, so almost certainly
broken, but I don't want it to lay on my laptop only.

rafal
(This used to be commit dcab843da35f5dd2ffc694922ee762b3c36dbd35)
2007-10-10 13:10:48 -05:00