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

179 Commits

Author SHA1 Message Date
Jelmer Vernooij
1b99d8fbb5 Use common util_file code. 2008-10-12 17:34:43 +02:00
Volker Lendecke
cf9665016f Let send_trans_reply work on only the inbuf
It does not really need the whole smb_request
(This used to be commit d3facf4cbd)
2008-06-28 10:38:51 +02:00
Volker Lendecke
e2585b73e9 remove unused extern current_user from lanman.c
(This used to be commit e2009c0b8d)
2008-06-26 13:13:23 +02:00
Volker Lendecke
a3c0be6325 Change print_access_check to take auth_serversupplied_info instead of current_user
Reason: This is the main user of p->current_user which I would like to remove
(This used to be commit fd43059b3d)
2008-06-26 13:13:23 +02:00
Volker Lendecke
40f5eab5eb Wrap the unix token info in a unix_user_token in auth_serversupplied_info
No functional change, this is a preparation for more current_user ref removal
(This used to be commit dcaedf345e)
2008-06-19 18:51:37 +02:00
Volker Lendecke
50ab871813 Remove some references to get_current_username() and current_user_info
(This used to be commit 344d69f95e)
2008-05-25 11:43:57 +02:00
Volker Lendecke
f4d8141174 Remove reference to current_user_info from lanman.c
(This used to be commit f52d7c3fab)
2008-05-25 11:43:56 +02:00
Tim Prouty
fb37f15600 Cleanup size_t return values in callers of convert_string_allocate
This patch is the second iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
(This used to be commit 6b189dabc5)
2008-05-20 22:40:13 +02:00
Volker Lendecke
5bda9a8af0 Remove "user" from connection_struct
(This used to be commit 368454a27c)
2008-05-10 11:17:01 +02:00
Volker Lendecke
53a623d8a6 Remove the unix token info from connection_struct
(This used to be commit 2834dacc8d)
2008-05-10 11:17:01 +02:00
Volker Lendecke
bec1dfab27 Remove "userdom_struct user" from "struct user_struct"
(This used to be commit 420de03523)
2008-05-05 18:28:59 +02:00
Volker Lendecke
71ff1ba2de Remove "guest" from "struct user_struct"
(This used to be commit 570a6b80fe)
2008-05-05 18:28:59 +02:00
Volker Lendecke
c6d209f834 Remove the unix token info from "struct user_struct"
(This used to be commit aa2299d42a)
2008-05-05 18:28:58 +02:00
Volker Lendecke
faa5e8e12c Remove "logon_script" from "struct user_struct"
(This used to be commit b36fd84186)
2008-05-05 18:28:58 +02:00
Volker Lendecke
1b2bf00fb9 Remove "homedir" from "struct user_struct"
(This used to be commit 41f9afd62d)
2008-05-05 18:28:58 +02:00
Volker Lendecke
a4c0812af0 Fix some "ignoring asprintf result" warnings
(This used to be commit 155d62ddfd)
2008-04-14 13:13:46 +02:00
Karolin Seeger
55af880341 Fix typo.
Karolin
(This used to be commit 3745e398b1)
2008-02-05 16:22:59 +01:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec)
2007-12-15 22:09:36 +01:00
Jeremy Allison
7faee02d0d Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
(This used to be commit 52dc5eaef2)
2007-12-10 11:30:37 -08:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
b9342eaaa6 Remove unused wpstring and macros. Stop using pstrcpy in smbd/*.c
Jeremy.
(This used to be commit e72bce5b62)
2007-12-03 15:19:22 -08:00
Volker Lendecke
d4bfafa29c Fix bug 5055
(This used to be commit 8bcd2df841)
2007-11-26 15:28:13 +01:00
Jeremy Allison
cae4c742a8 Always check return from push_ascii.
Jeremy.
(This used to be commit 9c3d10521e)
2007-11-19 17:43:28 -08:00
Jeremy Allison
d5791deefa Remove pstrings from lanman.c
Jeremy.
(This used to be commit 7bfd25c756)
2007-11-12 17:59:18 -08:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Jeremy Allison
eacd314057 r25138: More pstring elimination. Add a TALLOC_CTX parameter
to unix_convert().
Jeremy.
(This used to be commit 39c211a702)
2007-10-10 12:30:44 -05:00
Jeremy Allison
327ca9167e r25103: Ensure we don't return unwritten memory (valgrind caught).
Jeremy.
(This used to be commit b3f0d39d11)
2007-10-10 12:30:40 -05:00
Volker Lendecke
ff0947fbed r24949: Remove some static buffers
(This used to be commit df648d47ff)
2007-10-10 12:30:29 -05:00
Volker Lendecke
929e1d9920 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Volker Lendecke
b0ed26faf0 r24244: Complete the conversion of reply_trans[s]
Remove reply_prep/post_legacy from send_trans_replies
(This used to be commit c08366f840)
2007-10-10 12:29:20 -05:00
Volker Lendecke
d274724ebb r24243: Remove reply_prep_legacy from api_reply
(This used to be commit b01664b43b)
2007-10-10 12:29:20 -05:00
Volker Lendecke
6c6fed5e65 r24130: Explicitly pass flags2 to srvstr_push
This is in preparation of the trans2 conversion: srvstr_push should not
look at inbuf directly.
(This used to be commit 5fd7e6a382)
2007-10-10 12:29:09 -05:00
Volker Lendecke
16443996b5 r23967: Memleak fix from Atsushi Nakabayashi <nakabayashi@miraclelinux.com>
Thanks!

Volker
(This used to be commit 46997a7019)
2007-10-10 12:28:50 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
ac3f08ddbe r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
(This used to be commit eaefd00563)
2007-10-10 12:22:17 -05:00
Volker Lendecke
8c3f8e5697 r22911: Pass a messaging_context to message_send_all
(This used to be commit cc92ce665d)
2007-10-10 12:22:07 -05:00
Volker Lendecke
4aa44f7475 r22761: This introduces lib/conn_tdb.c with two main functions: connections_traverse
and connections_forall. This centralizes all the routines that did individual
tdb_open("connections.tdb") and direct tdb_traverse.

Volker
(This used to be commit e43e94cda1)
2007-10-10 12:21:55 -05:00
Volker Lendecke
e26dee48f0 r22561: Fix a memleak in lanman.c: Nobody would free the session_list.
Volker
(This used to be commit 5d428400f7)
2007-10-10 12:19:45 -05:00
Jeremy Allison
0829e1ad1c r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
(This used to be commit 2d80a96120)
2007-10-10 12:19:30 -05:00
Jeremy Allison
97e3cb896f r22065: First logic change I've found :-(. We were being too
restrictive about strings being NULL. If an info level
doesn't use a subformat the subformat string may be
missing (null). Add debug statements to help track
this.
Jeremy
(This used to be commit 70875f92a2)
2007-10-10 12:19:08 -05:00
Jeremy Allison
afd637e926 r22050: Fix a couple of off-by-one errors in the rap
call patch. Jerry, this works now for displaying
shares on Win9x (and hopefully everything else
as well :-).
Jeremy.
(This used to be commit 728a4cc713)
2007-10-10 12:19:06 -05:00
Jeremy Allison
0a2cc569a1 r22045: As Volker noticed, skip_string's last argument is
redundent. Remove it.
Jeremy.
(This used to be commit 140881cfbb)
2007-10-10 12:19:05 -05:00
Volker Lendecke
8990b13d2f r22044: Remove the only skip_string(...,2) caller
(This used to be commit 08ea2b83b2)
2007-10-10 12:19:05 -05:00
Volker Lendecke
7371762dae r22043: Comparing lanman.c with -r22013 is now MUCH easier, thanks! This looks much
easier to review! Damn close to what I had in my tree, just the fn names were
slightly different.

This removes one unnecessary dupe.

Next thing is to get rid of the parameter "n" of skip_string, there is only
one (!) caller that does not pass in 1....

Volker
(This used to be commit 2878c1e93a)
2007-10-10 12:19:05 -05:00
Jeremy Allison
e5358d6c55 r22042: Try and clean up my own mess using the API Volker
suggested. I now use :

BOOL is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off)
char *get_safe_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off)
char *get_safe_str_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off)
int get_safe_SVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval)
int get_safe_IVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval)

Volker, please criticize and comment. Thanks,

Jeremy.
(This used to be commit d47af7c926)
2007-10-10 12:19:04 -05:00
Jeremy Allison
730bfd9ced r22017: After changing 2000 lines of this I think this is needed :-).
Jeremy.
(This used to be commit 99092e8841)
2007-10-10 12:19:02 -05:00
Jeremy Allison
261c004d7b r22014: Make us pass RANDOMIPC test again :-(. This is an ugly check-in,
but I've no option.
Jeremy.
(This used to be commit c3a565081d)
2007-10-10 12:19:01 -05:00
Volker Lendecke
575845ccbe r19963: Add 'registry shares = yes' and registry key security descriptors.
(This used to be commit 6cab254c49)
2007-10-10 12:16:16 -05:00