1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

604 Commits

Author SHA1 Message Date
Andrew Bartlett
0746576113 Update cli_full_connection() to take a 'flags' paramater, and try to get a
few more places to use it.

Andrew Bartlett
(This used to be commit 23689b0746d5ab030d8693abf71dd2e80ec1d7c7)
2002-06-25 08:57:24 +00:00
Tim Potter
8e9a8b29f2 Fixed compiler warning.
(This used to be commit 361afd241beeda033068c7f3a976f3f69fa2ac33)
2002-06-04 03:19:20 +00:00
Tim Potter
15e5ef6ce8 Added getdompwinfo function.
(This used to be commit b3b3e45583718e5b034f6c67609523f35753c1a8)
2002-06-03 02:24:22 +00:00
Jim McDonough
f2d37f907c Update for new interface to netfileenum
(This used to be commit c3921e36071a70ab9534fe92286b361aae2336b6)
2002-06-01 01:02:23 +00:00
Jim McDonough
e011750206 Update netfileenum to new api.
(This used to be commit 70f8adf297a3979230e425126cd5868972b1d17e)
2002-05-31 17:02:44 +00:00
Tim Potter
8787088f2e Fixed crash bug in querydispinfo.
Some reformatting.
(This used to be commit 612eae45ef7b0289e0c67b331d96a351fc567e5c)
2002-05-31 04:25:00 +00:00
Tim Potter
0e3260de6f Added netfileenum (sorry - no output though (-:) command.
(This used to be commit 099b750b4ed8f04a1fd8a018508d412691e37df6)
2002-05-30 07:12:32 +00:00
Tim Potter
568deecbf0 Added netremotetod to try and figure out which srvsvc commands are denied
when using restrictanonymous.
(This used to be commit 0c65978ed07903af808da5f32cc29531aef23225)
2002-05-29 01:43:44 +00:00
Tim Potter
65a31d8dd8 Added netshareenum command at level 1 and 2.
(This used to be commit 99ac1b339c2b4ec5b85ecc3a87efa2ef508ecab1)
2002-05-28 08:40:29 +00:00
Tim Potter
3b464a1f8f Some fixes for enumerating domain groups and aliases:
- close down connect and domain policy handles when exiting
 - allow enumeration of > 65535 groups or aliases
 - error handling for non-zero return value from enumeration functions
(This used to be commit a48f362ca7ff6477d3064bc2c5c888eeb095d2ce)
2002-05-28 04:10:04 +00:00
Andrew Bartlett
9c3d5d6fd0 Remove the password length paramater from cli_full_connection - it really
didn't make any sense, and its was always just strlen(password) anyway.

This fixes it to be strlen(password)+1

Andrew Bartlett
(This used to be commit c205b18bd6b9b69200ff3db55f2c641631d4ab40)
2002-05-24 05:14:16 +00:00
Andrew Bartlett
e46a6ecc69 Given Jeremy's positive response, and a lack of one from tpot, I'll commit
this:

More code cleanup - this lot a bit more dodgy than the last:

The aim is to trim pwd_cache down to size.  Its overly complex, and a
pain to deal with.  With a header comment like this:

'obfusticaion is planned'

I think it deserved to die (at least partly).

This was being done to allow 'cli_establish_connection' to die - its
functionality has been replaced by cli_full_connection(), which does
not duplicate code everywhere for creating names etc.

This also removes the little 'init' fucntions for the various pipes,
becouse they were only used in one place, and even then it was dodgy.

(I've reworked smbcacls not to use anonymous connections any more, as
this will (should) fail with a 'restrict anonymous' PDC).

This allowed me to remove cli_pipe_util.c, which was calling
cli_establish_connection.

tpot:  I'm not sure what direction you were going with the client stuff,
and you may well have been wanting the init functions.  If thats the case,
give me a yell and I'll reimplement them against cli_full_connection.

Andrew Bartlett
(This used to be commit fa67e4626bed623333c571e76e06ccd52cba5cc5)
2002-05-23 14:02:17 +00:00
Andrew Bartlett
f9d2db36f3 Remove unused files.
The size of samba going down for once :-)

Andrew Bartlett
(This used to be commit 00ef4aad88f4ba9f2e242578c37933eac001c351)
2002-05-18 13:50:59 +00:00
Andrew Bartlett
3fe27b7f9d A few more trusted domains updates from mimir.
I think we may still need to look at our server enumeration code, but
other than that, its much better in the tree than out.

Andrew Bartlett
(This used to be commit d57a1b4629d12a0374cc6d74dfc6f5d4793fcef8)
2002-05-17 13:49:01 +00:00
Tim Potter
1df5f81247 The cli_spoolss_setprinterdata() function interface changed slightly.
(This used to be commit 79d7bcf42e568b8fe75818c1d2344bff738afd70)
2002-05-14 05:27:58 +00:00
Tim Potter
ee2306d881 Merge from HEAD:
>Added cli_spoolss_enumjobs() function.

>Added cmd_spoolss_enumjobs() function to rpcclient.
>
>The semantics of the src_len argument to rpcstr_pull() seem to have changed
>breaking most of the spoolss commands in rpcclient.  Changed a bunch of
>0's to -1's to fix it.
(This used to be commit dce534d4373cc0f204d82e0876bb94db8dfeb628)
2002-05-07 06:36:22 +00:00
Tim Potter
5f0a3bf295 Added cmd_spoolss_enumjobs() function to rpcclient.
The semantics of the src_len argument to rpcstr_pull() seem to have changed
breaking most of the spoolss commands in rpcclient.  Changed a bunch of
0's to -1's to fix it.
(This used to be commit f32e3f2087c44f27bcfc8a8b1c76ee2b29f01dea)
2002-05-07 06:30:10 +00:00
Tim Potter
a04166f35e Fixed more compiler warnings.
(This used to be commit fa5c1ba12b4cae0c03f1adbc38e7ad5eeca0e895)
2002-05-07 04:38:33 +00:00
Tim Potter
535779e9fc Fixed compile warning.
(This used to be commit 671607a3eefc58673bdd4cb8fc8d3a3f65542f03)
2002-05-07 04:31:56 +00:00
Tim Potter
67d99a88c4 Fixed command line argument parsing.
(This used to be commit 28c1fae4d89399ec4d15bfb3ccd17d8b5b0495fc)
2002-04-17 06:43:47 +00:00
Gerald Carter
1d49e9bc71 merges from SAMBA_2_2
(This used to be commit 91929afbb0cad422cc6d05f9a10ba5c3d797d779)
2002-04-16 16:49:08 +00:00
Tim Potter
d9cfe0f3eb Merge of lsa lookup names/sids patch from HEAD.
(This used to be commit e57c162897d4a7e66bb87091d179ac138f751c64)
2002-04-15 05:02:22 +00:00
Tim Potter
d0386372b2 The cli_lsa_lookup_{names,sids} functions were returning useless
information when one or more of the names/sids being queried were not
resolvable.  We now return a list the same length as the parameters passed
instead of an array of just the resolvable names/sids.
(This used to be commit 245468dbabb7c849ce423cc3cb586fa913d0adfe)
2002-04-14 11:21:25 +00:00
Tim Potter
f8b1f9608f Fixed comment.
(This used to be commit 06df6c79ae91cb4b1427a2a230fee288cff50e10)
2002-04-14 04:57:02 +00:00
Tim Potter
29e67cad05 Free popt context after argument parsing.
(This used to be commit f287f62962feca6dac8747d16676dc64723eb5b1)
2002-04-04 04:29:09 +00:00
Gerald Carter
d843380398 removing unused files....
(This used to be commit 3d542abdb1805bf746eb9a7ef41fc904534f4edb)
2002-04-03 03:06:22 +00:00
Gerald Carter
f624d6f3ae added "list <pipe>" command to display the available commands
one a single pipe
(This used to be commit b73a8416d31c0ec7975ba022f5c425a581497b72)
2002-04-02 23:28:40 +00:00
Gerald Carter
9cb6a94406 some mergee from SAMBA_2_2. Does compile, but needs some more testing.
This is an intermediate check-in.  More to come....
(This used to be commit 5b9b152971aa635d484cde45413a7880424ee22d)
2002-04-02 01:10:41 +00:00
Tim Potter
ab13654dc9 Renamed get_nt_error_msg() to nt_errstr().
(This used to be commit 1f007d3ed41c1b71a89fa6be7d173e67e927c302)
2002-03-17 04:36:35 +00:00
Jim McDonough
bc6959c6f6 Swap order of close brace and done: tag to appease AIX compiler. Order shouldn't matter for logic...if anyone disagrees whack me over the head and explain why...
(This used to be commit 4081ce40dda886aeb01f590f00bfe50e0e4e8ae4)
2002-03-08 03:36:03 +00:00
Jim McDonough
f3df73c0cf One more fix to get popt to work for some compilers...this is the downside to popt. Every option has to be in fixed storage.
(This used to be commit e5e7132e80bfe599d56809bf47a13d2028ee9c86)
2002-03-08 03:31:01 +00:00
Jim McDonough
6e6318525a Convert rpcclient to use popt instead of getopt. Includes changing of got_pass from BOOL to int. Also includes long option names...anyone want those different before I update the doc? Please try this out. I've tried to test all the flags, but the more times we kick the tires...
(This used to be commit cd34897749dc5819dd7239269fbd5dcef5bea5c0)
2002-03-07 18:56:51 +00:00
Tim Potter
fd7cdf6da4 Cosmetic fixup for enum_printers
(This used to be commit bb0ef8bc305da7490a19a6f4efd2aa60bf14aef1)
2002-03-07 04:29:13 +00:00
Tim Potter
6fbd44c77a Fixed a bunch of crash bugs for enumprinters at various info levels.
(This used to be commit d9df00e2b1764619491900b7dbd7d5af34feed1b)
2002-03-07 04:22:16 +00:00
Tim Potter
b89b7d4d12 argc == 0 is an impossible condition.
(This used to be commit 5b195f8bf14b11edca74db5fd9658916447b363d)
2002-03-07 04:03:21 +00:00
Andrew Bartlett
81b2d66c97 Allow Samba to trust NT4 Domains.
This commit builds on the auth subsystem to give Samba support for trusting NT4
domains.  It is off by default, but is enabled by adding 'trustdomain' to the
'auth methods' smb.conf paramater.

Tested against NT4 only - there are still some issues with the join code for
Win2k servers (spnego stuff).

The main work TODO involves enumerating the trusted domains (including the RPC
calls to match), and getting winbind to run on the PDC correctly.

Similarly, work remains on getting NT4 to trust Samba domains.

Andrew Bartlett
(This used to be commit ac8c24a9a888a3f916e8b40238b936e6ad743ef7)
2002-03-02 08:25:44 +00:00
Herb Lewis
361d0f9f7b merge from 2.2 - fix parsing of options
(This used to be commit c849e93392e3206b010949566a65a339f5064031)
2002-02-26 20:04:54 +00:00
Tim Potter
bb117fdca7 Implemented client side functions for SPOOLSS addform, getform, setform and
enumforms.
(This used to be commit e69222f0816878e3211e3dedb049de50ca90fed0)
2002-02-25 06:43:31 +00:00
Tim Potter
e026103a97 Converted remaining spoolss rpcclient functions to werror/needed/offered.
I couldn't test some of these because I didn't know the right magic
arguments to pass to rpcclient (familiar anyone? (-:) so there may be some
bugs lurking.
(This used to be commit 029e2b307d91171168040e71d2e5d5e0d01b7633)
2002-02-20 18:41:07 +00:00
Tim Potter
902cc03807 Converted {cmd,cli}_spoolss_getprinter() to WERROR and offered/neede.
(This used to be commit fccfa034e92bca145b8e0639e405f6af5bb1a50b)
2002-02-19 02:12:01 +00:00
Tim Potter
9a0a35d09a Converted cmd_spoolss_enumprinterdrivers() to use new
cli_spoolss_enumprinterdrivers() function.
(This used to be commit ae38fcf62c4b9503d4df02761dadb1bb7d166a9c)
2002-02-19 01:06:55 +00:00
Tim Potter
1b70d2769a Added addform, setform and deleteform commands. The only one I could get
to actually work was addform.  )-:

Removed a whole bunch of calls to werror_to_ntstatus() because there isn't
a one-to-one mapping of NTSTATUS values to WERROR values.  This function
maps WERR_ACCESS_DENIED to NTSTATUS_INVALID_LOCK_SEQUENCE or something
silly like that.
(This used to be commit 825b5c8bd6d0f114faf3b0fd91eb374cbfb8c8b7)
2002-01-31 11:36:30 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-30 06:08:46 +00:00
Andrew Bartlett
ba8c1c6e45 Back out some of the less well thought out ideas from last weeks work on
winbind default domains, particulary now I understand whats going on a lot
better.  This ensures that the RPC client code does as little 'magic' as
possible - this is up to the application/user.  (Where - for to name->sid code
- it was all along).  This leaves the change that allows the sid->name code to
return domains and usernames in seperate paramaters.

Andrew Bartlett
(This used to be commit 5dfba2cf536f761b0aee314ed9e30dc53900b691)
2002-01-26 11:48:42 +00:00
Andrew Bartlett
84ce7ec0a4 Make a talloc'ed copy of this strings so we can pass the right kind of pointer
to the function.  This fixes a nice little segfault the brute-force-casting
created. :-)

Andrew Bartlett
(This used to be commit c84fa7f5fd62940e397d3353fb688f283349393e)
2002-01-26 10:06:23 +00:00
Andrew Bartlett
93a8358910 This patch makes the 'winbind use default domain' code interact better with
smbd, and also makes it much cleaner inside winbindd.

It is mostly my code, with a few changes and testing performed by Alexander
Bokovoy <a.bokovoy@sam-solutions.net>.  ab has tested it in security=domain and
security=ads, but more testing is always appricatiated.

The idea is that we no longer cart around a 'domain\user' string, we keep them
seperate until the last moment - when we push that string into a pwent on onto
the socket.

This removes the need to be constantly parsing that string - the domain prefix
is almost always already provided, (only a couple of functions actually changed
arguments in all this).

Some consequential changes to the RPC client code, to stop it concatonating the
two strings (it now passes them both back as params).

I havn't changed the cache code, however the usernames will no longer have a
double domain prefix in the key string.  The actual structures are unchanged
 - but the meaning of 'username' in the 'rid' will have changed.  (The cache is
invalidated at startup, so on-disk formats are not an issue here).

Andrew Bartlett
(This used to be commit e870f0e727952aeb8599cf93ad2650ae56eca033)
2002-01-20 01:24:59 +00:00
Simo Sorce
7019bfe546 fixes (asprintf) from 2.2
(This used to be commit 6b123adda901ff05b0271eeda060297448f64eec)
2002-01-19 17:29:32 +00:00
Tim Potter
9a02c6b4e8 Converted getprinterdriver to WERROR - it always returns dos error 6
(invalid handle) though.  )-:
(This used to be commit 7bfd1f35e4e194f8a2f07046e4a6c005c256c05b)
2002-01-07 03:33:46 +00:00
Tim Potter
2f25e5118f Converted enumprinters and enumports cmd functions to use WERROR
values returned from cli functions.  They are converted to NTSTATUS codes
using the error map functions.

Do buffer size loop checks by setting offered = 0 and using the return
value of needed in the next call.
(This used to be commit 4efbdda3fcfd1fad2f2b8909d250735382497836)
2002-01-06 09:03:48 +00:00
Tim Potter
cd0772e51e spoolss rpc client cleanup:
- converted OpenPrinterEx and ClosePrinter to WERROR instead of NT_STATUS
 - doc
(This used to be commit 248d114f856f1adb76c903b683e0927530771443)
2002-01-06 03:54:40 +00:00