Günther Deschner
869eed76e6
s3-lanman: use samr for api_RNetUserGetInfo.
...
Following MS-RAP 3.2.5.13 NetUserGetInfo Command.
Guenther
2010-05-27 13:37:40 +02:00
Günther Deschner
229b090308
s3-lanman: remove defines now provided by IDL.
...
Guenther
2010-05-26 22:49:01 +02:00
Günther Deschner
7fa2129db6
s3-lanman: parse encrypted and min_pwd_length in api_SetUserPassword().
...
Guenther
2010-05-26 22:15:51 +02:00
Günther Deschner
a17203ba65
s3-lanman: use samr for api_SetUserPassword().
...
Guenther
2010-05-26 22:15:51 +02:00
Simo Sorce
718718d0e7
s3-lanman: Migrated to rpc_connect_spoolss_pipe().
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-26 15:07:58 +02:00
Günther Deschner
e7982bbe0b
s3-lanman: Fix various RAP printing calls according to win98 testing and MS-RAP docs.
...
Guenther
2010-05-20 13:35:49 +02:00
Günther Deschner
5a6f3a0666
s3-rpc_client: move protos to init_spoolss.h
...
Guenther
2010-05-18 21:42:48 +02:00
Günther Deschner
cc06133b0a
s3-rpc_client: move protos to cli_spoolss.h
...
Guenther
2010-05-18 21:42:45 +02:00
Günther Deschner
99a7ebc556
s3-lanman: use samr for api_SamOEMChangePassword().
...
Guenther
2010-05-12 00:22:02 +02:00
Günther Deschner
e6c4df43c8
s3-lanman: use srvsvc for api_RNetServerGetInfo().
...
Following MS-RAP 3.2.5.3 NetServerGetInfo Command.
Guenther
2010-05-09 23:42:31 +02:00
Simo Sorce
3c1e9a8c33
s3-spoolss: Make spoolss_Time_to_time_t public.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-09 23:33:40 +02:00
Günther Deschner
8528e347cb
s3-lanman: use srvsvc for api_RNetShareAdd().
...
Guenther
2010-05-05 18:29:21 +02:00
Günther Deschner
4affc58c6a
s3-lanman: before trying to call spoolss_ClosePrinter make sure we have a connection.
...
Guenther
2010-05-03 17:04:00 +02:00
Günther Deschner
fe1617a818
s3-lanman: fix api_DosPrintQEnum().
...
This was a subtile bug where the OpenPrinter call (called directly via
dispatcher table) was modifiying r->in.printername in a way that all printers on
a server had the printername stripped off the server unc. Once we switch to full
NDR marshalling in inter RAP<->RPC server communication there is no danger
anymore to have these kind of nasty effects.
Guenther
2010-05-03 14:45:26 +02:00
Günther Deschner
fe33db6c06
s3-lanman: exit early for unsupported levels in api_PrintJobInfo().
...
Guenther
2010-05-03 14:43:34 +02:00
Günther Deschner
9a313bbac0
s3-lanman: fix api_DosPrintQGetInfo().
...
Found by torture test.
Guenther
2010-04-29 13:47:33 +02:00
Günther Deschner
7e678ef0cf
s3-lanman: fix api_DosPrintQEnum.
...
Found by torture test.
Guenther
2010-04-29 12:05:42 +02:00
Günther Deschner
d53544800f
s3-lanman: support level 0 NetPrintQEnum RAP query.
...
Guenther
2010-04-28 23:23:38 +02:00
Günther Deschner
f56d9006d5
s3-lanman: use spoolss for api_WPrintDestGetInfo() and api_WPrintDestEnum().
...
With this, I think, all implemented RAP printing calls are routed over SPOOLSS.
Torture tests to follow...
Guenther
2010-04-28 01:27:40 +02:00
Günther Deschner
c88ff10d69
s3-lanman: fix debug message in api_WPrintJobEnumerate().
...
Guenther
2010-04-28 01:27:40 +02:00
Günther Deschner
566ea59b27
s3-lanman: remove a unnecessary memset in api_WPrintJobEnumerate().
...
Guenther
2010-04-28 01:27:40 +02:00
Günther Deschner
fe1f503a95
s3-lanman: remove unused code.
...
Guenther
2010-04-28 01:27:40 +02:00
Günther Deschner
f23bcb5c5e
s3-lanman: use spoolss for api_DosPrintQGetInfo and api_DosPrintQEnum.
...
Guenther
2010-04-28 01:27:40 +02:00
Günther Deschner
f4f9d54721
s3-lanman: use spoolss for api_PrintJobInfo().
...
Guenther
2010-04-28 00:10:41 +02:00
Günther Deschner
2b7002f385
s3-lanman: remove unsupported print_job_set_place().
...
Guenther
2010-04-28 00:10:40 +02:00
Günther Deschner
7259762909
s3: use generated rap header.
...
Guenther
2010-04-26 22:52:59 +02:00
Günther Deschner
bb22855af5
s3-lanman: fix uninitialized variable in api_RDosPrintJobDel().
...
Guenther
2010-04-23 15:31:21 +02:00
Günther Deschner
2033314a7c
s3-lanman: use spoolss for api_WPrintJobGetInfo().
...
Guenther
2010-04-19 11:53:55 +02:00
Günther Deschner
0c80d12656
s3-lanman: use spoolss for api_WPrintJobEnumerate().
...
Guenther
2010-04-19 11:23:44 +02:00
Günther Deschner
8d588e96d9
s3-lanman: use spoolss for api_RDosPrintJobDel().
...
Guenther
2010-04-08 16:24:33 +02:00
Günther Deschner
d5e2b43176
s3-lanman: use spoolss for api_WPrintQueueCtrl().
...
Guenther
2010-04-08 16:24:25 +02:00
Jeremy Allison
984eee7e29
Switch over to using get_currect_XXX() accessor functions.
...
Jeremy.
2010-03-15 14:49:15 -07:00
Jeremy Allison
4b85a0ea7f
Rever e80ceb1d73
"Remove more uses of "extern struct current_user current_user;"."
...
As requested by Volker, split this into smaller commits.
Jeremy.
2010-03-15 14:48:54 -07:00
Jeremy Allison
e80ceb1d73
Remove more uses of "extern struct current_user current_user;".
...
Use accessor functions to get to this value. Tidies up much of
the user context code. Volker, please look at the changes in smbd/uid.c
to familiarize yourself with these changes as I think they make the
logic in there cleaner.
Cause smbd/posix_acls.c code to look at current user context, not
stored context on the conn struct - allows correct use of these
function calls under a become_root()/unbecome_root() pair.
Jeremy.
2010-03-12 13:56:51 -08:00
Andrew Tridgell
3f0898a9f5
s3-smbd: convert lanman and notify code to TYPESAFE_QSORT()
2010-02-14 18:44:21 +11:00
Jeremy Allison
8ddc977c14
Fix bug #7122 - Reading a large browselist fails (server returns invalid values in subsequent SMBtrans replies)
...
There are two problems:
1). The server is off-by-one in the end of buffer space test.
2). The server returns 0 in the totaldata (smb_vwv1) and totalparams (smb_vwv0)
fields in the second and subsequent SMBtrans replies.
This patch fixes both.
Jeremy.
2010-02-09 15:14:38 -08:00
Stefan Metzmacher
bc8242a08e
s3:smbd: use StrCaseCmp() instead of strcasecmp
...
metze
2010-02-09 18:59:16 +01:00
Stefan Metzmacher
1686a5e7e7
s3:smbd: Fix really ugly bool vs. int bug!!!
...
A comparison function for qsort needs to return an 'int'!
Otherwise you'll get random results depending on the compiler
and the architecture...
metze
2010-02-09 18:59:15 +01:00
Stefan Metzmacher
30eec0656c
s3:smbd: implement api_RNetServerEnum3
...
This is needed to support large browse lists.
metze
2010-02-08 18:47:41 +01:00
Stefan Metzmacher
495ac46166
s3:smbd: add/improve some DEBUG messages in api_RNetServerEnum2()
...
metze
2010-02-08 18:46:57 +01:00
Stefan Metzmacher
dc58672c65
s3:smbd: rename api_RNetServerEnum => api_RNetServerEnum2
...
metze
2010-02-08 18:35:12 +01:00
Giovanni Bajo
d75d14f8de
s3-lanman: Allow a level2 descriptor for a level1 NetShareGetInfo
...
Windows seems to allow this
http://lists.samba.org/archive/samba-technical/2009-November/068116.html
has a dump of this.
2010-01-11 22:24:22 +01:00
Volker Lendecke
081573091b
s3: Remove the typedef for "auth_serversupplied_info"
2010-01-10 20:56:16 +01:00
Günther Deschner
35c50dcce3
s3-spoolss: use driver level info8 everywhere in spoolss server internally.
...
Guenther
2009-12-08 11:05:21 +01:00
Günther Deschner
3d679a3b5f
s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
...
Guenther
2009-11-26 20:03:17 +01:00
Günther Deschner
ec56895bde
s3-printing: use spoolss types and structs while getting and deleting drivers.
...
Guenther
2009-11-23 12:19:11 +01:00
Volker Lendecke
a702dea5a8
s3/lanman: Workaround for KB932762.
...
This addresses bug #6498 .
2009-06-27 10:12:51 +02:00
Stefan Metzmacher
75d03970b7
s3:smbd: move more session specific globals to struct smbd_server_connection
...
metze
2009-06-03 17:54:37 +02:00
Günther Deschner
9966541f89
s3-printing: simplify print_queue helper functions and return WERROR.
...
Guenther
2009-05-06 10:19:04 +02:00
Jeremy Allison
d9804ae3cc
Fix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+
...
What a difference a name makes... :-). Just because something is missnamed
SAMR_ACCESS_OPEN_DOMAIN, when it should actually be SAMR_ACCESS_LOOKUP_DOMAIN,
don't automatically use it for a security check in _samr_OpenDomain().
Jeremy.
2009-04-15 15:40:00 -07:00
Volker Lendecke
e07e964729
Convert api_NetUserGetGroups to use samr instead of pdb
2009-02-10 21:55:13 +01:00
Volker Lendecke
422e77f32a
Convert api_RNetGroupEnum to use samr instead of pdb
2009-02-07 19:25:34 +01:00
Volker Lendecke
2fd79e15f7
Close samr_handle if open_domain failed
2009-02-07 19:25:34 +01:00
Volker Lendecke
50ca5af9f3
Convert api_RNetUserEnum to use the srv_samr_nt.c directly
...
This is a sample for other accesses to pdb to go via samr. The goal is to
access passdb only via srv_samr_nt.c. If that is done, then we can easily swap
in another samr implementation like for example samba4's via a unix domain
socket.
2009-02-01 14:34:23 +01:00
Volker Lendecke
dba6624dca
Fix nonempty blank lines
2009-02-01 14:34:22 +01:00
Michael Adam
99ef38c84f
s3:put the browse list into cache_dir, not lock_dir.
...
Michael
2009-01-16 01:02:23 +01:00
Volker Lendecke
c2a280ac63
Pass smb_request to send_trans_reply to match with send_[nt]trans[2]_reply
2008-11-02 21:20:41 +01:00
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