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

747 Commits

Author SHA1 Message Date
Günther Deschner
992ad28485 r4286: Give back 8 byte lm_session_key in Netrsamlogon-reply.
The old #ifdef JRATEST-block was copying 16 bytes and thus overwriting
acct_flags with bizarre values, breaking a lot of things.

This patch is successfully running in a production environment for quite
some time now and is required to finally allow Exchange 5.5 to access
another Exchange Server when both are running on NT4 in a
samba-controlled domain. This also allows Exchange Replication to take
place, Exchange Administrator to access other Servers in the network,
etc. Fixes Bugzilla #1136.

Thanks abartlet for helping me with that one.

Guenther
(This used to be commit bd4c5125d6)
2007-10-10 10:53:41 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Günther Deschner
d7bbbb28bd r3645: Allow deldriverex in rpcclient to delete drivers for a specific
architecture and a specific version.

Guenther
(This used to be commit a24df09386)
2007-10-10 10:53:11 -05:00
Gerald Carter
2d0f5486f0 r3639: patch from Martin Zielinski <mz@seh.de> to add DeleteDriverEx() function to rpcclient
(This used to be commit cfd51c0244)
2007-10-10 10:53:11 -05:00
Volker Lendecke
e66c8217f8 r2935: This is a long-standing one in my patch-queue: A pair of net commands
(usersidlist/allowedusers) to scan a file server's share and list all users
who have permission to connect there.

Volker
(This used to be commit f7f84aa1de)
2007-10-10 10:52:57 -05:00
Günther Deschner
bf645415f6 r2073: Adding getprinter level 7 to rpcclient.
Is there any other rpc-call to get the guid of a published printer?

Guenther
(This used to be commit 944ad569c7)
2007-10-10 10:52:30 -05:00
Günther Deschner
60727acc3b r1692: first commit :)
* add IA64 to the architecture table of printer-drivers

* add new "net"-subcommands:

  net rpc printer migrate {drivers|printers|forms|security|settings|all}
        [printer]
  net rpc share migrate {shares|files|all} [share]

  this is the first part of the migration suite. this will will (once
  feature-complete) allow to do 1:1 server-cloning in the best possible way by
  making heavy use of samba's rpc_client-functions. all migration-steps
  are implemented as rpc/smb-client-calls; net communicates via rpc/smb
  with two servers at the same time (a remote, source server and a
  destination server that currently defaults to the local smbd). this
  allows e. g. printer-driver migration including driverfiles, recursive
  mirroring of file-shares including file-acls, etc. almost any migration
  step can be called with a migrate-subcommand to provide more flexibility
  during a migration process (at the cost of quite some redundancy :) ).

  "net rpc printer migrate settings" is still in a bad condition (many
  open questions that hopefully can be adressed soon).

  "net rpc share migrate security" as an isolated call to just migrate
  share-ACLs will be added later.

  Before playing with it, make sure to use a test-server. Migration is a
  serious business and this tool-set can perfectly overwrite your
  existing file/print-shares.

* along with the migration functions had to make I the following
  changes:

        - implement setprinter level 3 client-side

        - implement net_add_share level 502 client-side

        - allow security descriptor to be set in setprinterdata level 2
          serverside

guenther
(This used to be commit 8f1716a29b)
2007-10-10 10:52:19 -05:00
Jeremy Allison
c8137eeea4 r1553: Good patch from Guenther Deschner <gd@sernet.de> to display share ACL
entries from rpcclient.
Jeremy.
(This used to be commit bd64f0c081)
2007-10-10 10:52:14 -05:00
Andrew Bartlett
9d0783bf21 r1492: Rework our random number generation system.
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

Andrew Bartlett
(This used to be commit 36741d3cf5)
2007-10-10 10:52:13 -05:00
Gerald Carter
dda9d76264 r1380: adding debug message when encouting an ASU specific bug in an rpc_bind reply
(This used to be commit c6e73ff091)
2007-10-10 10:52:08 -05:00
Gerald Carter
9dbf2e2419 r991: Allow winbindd to use the domain trust account password
for setting up an schannel connection.  This solves the problem
of a Samba DC running winbind, trusting a native mode AD domain,
and needing to enumerate AD users via wbinfo -u.
(This used to be commit e9f109d1b3)
2007-10-10 10:51:53 -05:00
Gerald Carter
41db2016ad r704: BUG 1315: fix for schannel client connections to server's that don't support 128 bit encryption
(This used to be commit 316ba5ad89)
2007-10-10 10:51:34 -05:00
Gerald Carter
7671f29d71 r485: fix compile
(This used to be commit 2cbcc07b7b)
2007-10-10 10:51:25 -05:00
Volker Lendecke
7f00878fe6 r269: Patch from Krischan Jodies <kj@sernet.de>: Implement 'net rpc group delete'.
Volker
(This used to be commit ec32167496)
2007-10-10 10:51:16 -05:00
Gerald Carter
8ad3d8c9b0 r196: merging struct uuid from trunk
(This used to be commit 911a28361b)
2007-10-10 10:51:13 -05:00
Gerald Carter
931df5850e r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
(This used to be commit a7e2730ec4)
2007-10-10 10:51:05 -05:00
Volker Lendecke
044c6f513d Implement NETLOGON GetDCName client side. You can ask a DC for the name of
a DC it trusts.

Volker
(This used to be commit ae6840320f)
2004-04-02 12:56:18 +00:00
Andrew Bartlett
59572d1297 Ensure we correctly set cli->nt_pipe_fnum on failure to correctly open the
NT session.

Andrew Bartlett
(This used to be commit 01fff20e6e)
2004-03-27 05:39:19 +00:00
Gerald Carter
f2e853d345 remove unused variable
(This used to be commit 170c443b19)
2004-03-22 23:05:02 +00:00
Gerald Carter
fd312721ea missed some of Derrel's changes
(This used to be commit 3aac1e549e)
2004-03-19 17:48:08 +00:00
Gerald Carter
aad3d8aeb0 asu/syntax/pc_netlink doesn't fill in the pipe name in the rpc_bind response so dont check for it
(This used to be commit 4d68d3d5dd)
2004-03-17 17:38:38 +00:00
Volker Lendecke
a92de03d9e Add 'net rpc group [add|del]mem' for domain groups and aliases.
Volker
(This used to be commit e597420421)
2004-02-28 18:41:16 +00:00
Volker Lendecke
f934f5d7df Add 'net rpc group add'. For this parse_samr.c had to be changed: The
group_info4 in set_dom_group_info also has the level in the record
itself. This seems not to be an align. Tested with NT4 usrmgr.exe. It can
still create a domain group on a samba machine.

Volker
(This used to be commit 76c75bb8a7)
2004-02-24 18:00:41 +00:00
Andrew Bartlett
784b05c489 This adds client-side support for the unicode/SAMR password change scheme.
As well as avoiding DOS charset issues, this scheme returns useful error
codes, that we can map back via the pam interface.

This patch also cleans up the interfaces used for password buffers, to
avoid duplication of code.

Andrew Bartlett
(This used to be commit 2a2b1f0c87)
2004-01-26 08:45:02 +00:00
Gerald Carter
1cb47a2cb7 BUG 972; check pointer in cli_ds_getprimarydominfo() before trying to copy a structure
(This used to be commit 1c15bfacb4)
2004-01-15 05:16:29 +00:00
Gerald Carter
6c39789e6f fix segfault when sid_ptr == 0 in DsEnumDomainTrusts() reply
(This used to be commit ba9dc0d9fd)
2004-01-08 22:21:29 +00:00
Andrew Bartlett
7d068355aa This merges in my 'always use ADS' patch. Tested on a mix of NT and ADS
domains, this patch ensures that we always use the ADS backend when
security=ADS, and the remote server is capable.

The routines used for this behaviour have been upgraded to modern Samba
codeing standards.

This is a change in behaviour for mixed mode domains, and if the trusted
domain cannot be reached with our current krb5.conf file, we will show
that domain as disconnected.

This is in line with existing behaviour for native mode domains, and for
our primary domain.

As a consequence of testing this patch, I found that our kerberos error
handling was well below par - we would often throw away useful error
values.  These changes move more routines to ADS_STATUS to return
kerberos errors.

Also found when valgrinding the setup, fix a few memory leaks.

While sniffing the resultant connections, I noticed we would query our
list of trusted domains twice - so I have reworked some of the code to
avoid that.

Andrew Bartlett
(This used to be commit 7c34de8096)
2004-01-08 08:19:18 +00:00
Andrew Bartlett
425699fce7 Correctly handle per-pipe NTLMSSP inside a NULL session. Previously we
would attempt to supply a password to the 'inside' NTLMSSP, which the
remote side naturally rejected.

Andrew Bartlett
(This used to be commit da408e0d5a)
2004-01-05 04:12:40 +00:00
Andrew Bartlett
614c18d24b rpc_client/cli_lsarpc.c:
rpc_parse/parse_lsa.c:
nsswitch/winbindd_rpc.c:
nsswitch/winbindd.h:
 - Add const

libads/ads_ldap.c:
 - Cleanup function for use

nsswitch/winbindd_ads.c:
 - Use new utility function ads_sid_to_dn
 - Don't search for 'dn=', rather call the ads_search_retry_dn()

nsswitch/winbindd_ads.c:
include/rpc_ds.h:
rpc_client/cli_ds.c:
 - Fixup braindamage in cli_ds_enum_domain_trusts():
    - This function was returning a UNISTR2 up to the caller, and
      was doing nasty (invalid, per valgrind) things with memcpy()
    - Create a new structure that represents this informaiton in a useful way
      and use talloc.

Andrew Bartlett
(This used to be commit 06c3f15aa1)
2004-01-05 02:04:37 +00:00
Andrew Bartlett
1b6e6c98ba Do not add NTLM2 to the NTLMSSP flags unconditionally - allow the
defaults specified by the caller to prevail.

Don't use NTLM2 for RPC pipes, until we know how it works in signing or sealing.

Call ntlmssp_sign_init() unconditionally in the client - we setup the
session key, why not setup the rest of the data.

Andrew Bartlett
(This used to be commit 48123f7e42)
2003-11-25 11:25:38 +00:00
Gerald Carter
4e61fcbef1 strequal() returns a BOOL, not an int like strcmp(); this fixes a bug in check_bind_response()
(This used to be commit 5e062f72ba)
2003-11-24 20:22:12 +00:00
Andrew Bartlett
78404434d0 Add support for variable-length session keys in our client code.
This means that we now support 'net rpc join' with KRB5 (des based)
logins.  Now, you need to hack 'net' to do that, but the principal is
important...

When we add kerberos to 'net rpc', it should be possible to still do
user management and the like over RPC.

(server-side support to follow shortly)

Andrew Bartlett
(This used to be commit 9ecf9408d9)
2003-11-22 23:38:41 +00:00
Andrew Bartlett
fcbfc7ad06 Changes all over the shop, but all towards:
- NTLM2 support in the server
 - KEY_EXCH support in the server
 - variable length session keys.

In detail:

 - NTLM2 is an extension of NTLMv1, that is compatible with existing
domain controllers (unlike NTLMv2, which requires a DC upgrade).

 * This is known as 'NTLMv2 session security' *

(This is not yet implemented on the RPC pipes however, so there may
well still be issues for PDC setups, particuarly around password
changes.  We do not fully understand the sign/seal implications of
NTLM2 on RPC pipes.)

This requires modifications to our authentication subsystem, as we
must handle the 'challege' input into the challenge-response algorithm
being changed.  This also needs to be turned off for
'security=server', which does not support this.

- KEY_EXCH is another 'security' mechanism, whereby the session key
actually used by the server is sent by the client, rather than being
the shared-secret directly or indirectly.

- As both these methods change the session key, the auth subsystem
needed to be changed, to 'override' session keys provided by the
backend.

- There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure.  This should help the SPNEGO implementation.

- The 'names blob' in NTLMSSP is always in unicode - never in ascii.
Don't make an ascii version ever.

- The other big change is to allow variable length session keys.  We
have always assumed that session keys are 16 bytes long - and padded
to this length if shorter.  However, Kerberos session keys are 8 bytes
long, when the krb5 login uses DES.

 * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. *

- Add better DEBUG() messages to ntlm_auth, warning administrators of
misconfigurations that prevent access to the privileged pipe.  This
should help reduce some of the 'it just doesn't work' issues.

- Fix data_blob_talloc() to behave the same way data_blob() does when
passed a NULL data pointer.  (just allocate)


REMEMBER to make clean after this commit - I have changed plenty of data structures...
(This used to be commit f3bbc87b0d)
2003-11-22 13:19:38 +00:00
Volker Lendecke
5faae2df8a This fixes a bug when establishing trust against a german W2k3 AD server. In
the bind response to WKSSVC it does not send \PIPE\ntsvcs as NT4 (did not
check w2k) but \PIPE\wkssvc. I'm not sure whether we should make this check at
all, so making it a bit more liberal should hopefully not really hurt.

Volker
(This used to be commit 029dcb351b)
2003-11-17 18:00:43 +00:00
cvs2svn Import User
6440c4b34d This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit e569418861) 2003-10-24 13:38:14 +00:00
Jim McDonough
6258550534 New files for support of initshutdown pipe. Win2k doesn't respond properly
to all requests on the winreg pipe, so we need to handle this new pipe.

First part of fix for bug #534
(This used to be commit 532fab74c1)
2003-10-24 13:38:13 +00:00
Volker Lendecke
2fef82e5df Merge from 3_0:
In cli_lsa_lookup_sids don't leave the domain field uninitialized if
some sid could not be mapped. Otherwise this call is unnecessarily
complicated to call.

Volker
(This used to be commit 198b01fc54)
2003-10-22 07:31:17 +00:00
Volker Lendecke
57c1a70451 In cli_lsa_lookup_sids don't leave the domain field uninitialized if
some sid could not be mapped. Otherwise this call is unnecessarily
complicated to call.

Volker
(This used to be commit 1337338522)
2003-10-22 07:29:18 +00:00
Jeremy Allison
72569b4f1e Merge Volker's fix.
It's a perfectly valid condition to have zero alias members.

Jeremy.
(This used to be commit aa7fb71357)
2003-10-20 19:04:06 +00:00
Volker Lendecke
d6aa4b38c8 It's a perfectly valid condition to have zero alias members.
Volker
(This used to be commit ccdcd88732)
2003-10-20 15:42:09 +00:00
Jim McDonough
2702510b46 Add client side code to do endpoint map queries. Currently does one
fixed query.  Updates to come soon.
(This used to be commit 3ca8240aff)
2003-10-18 01:13:01 +00:00
Simo Sorce
b1f610ebb1 split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions)

also minor compile fixes
couldn't compile to test these due to some kerberos problems wirh 3.0,
but on HEAD they're working well, so I suppose it's ok to commit
(This used to be commit c78f2d0bd1)
2003-10-06 01:38:46 +00:00
Simo Sorce
762e7e1dff split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions)

also minor compile fixes
(This used to be commit 66074d3b09)
2003-10-06 01:24:48 +00:00
Gerald Carter
e9568f8df2 commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain
(This used to be commit 9d2e585e5e)
2003-10-01 22:00:19 +00:00
Gerald Carter
cbe69f65f6 commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain
(This used to be commit 3802f5895e)
2003-10-01 21:18:32 +00:00
Tim Potter
5400952f7f Merge from 3.0:
>Fix for #480. Change the interface for init_unistr2 to not take a length
>but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
>This is not the case. Count it after conversion.
>Jeremy.
(This used to be commit e2ab9e54cd)
2003-09-29 06:17:09 +00:00
Jeremy Allison
d3b9384308 Fix for #480. Change the interface for init_unistr2 to not take a length
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
This is not the case. Count it after conversion.
Jeremy.
(This used to be commit f82c273a42)
2003-09-25 21:26:16 +00:00
Gerald Carter
492072314b fix some warnings found by the Sun C compiler
(This used to be commit 585764305a)
2003-09-22 17:54:34 +00:00
Gerald Carter
88c95aa735 fix some warnings found by the Sun C compiler
(This used to be commit e1fac713e2)
2003-09-22 17:53:59 +00:00
Gerald Carter
4093bf7ff8 sync 3.0 into HEAD for the last time
(This used to be commit c17a7dc9a1)
2003-09-09 04:07:32 +00:00
Andrew Bartlett
f0cd6b35e5 - Fix the kerberos downgrade problem:
- When connecting to the NETOGON pipe, we make a call to auth2, in order
   to verify our identity.  This call was being made with negotiation flags
   of 0x1ff.  This caused our account to be downgraded.  If we instead make
   the call with flags > 1ff (such as 0x701ff), then this does not occour.

 - This is *not* related to the use of kerberos for the CIFS-level connection

My theory is that Win2k has a test to see if we are sending *exactly* what
NT4 sent - setting any other flags seems to cause us to remain intact.

Also ensure that we only have 'setup schannel' code in a few places, not
scattered around cmd_netlogon too.

Andrew Bartlett
(This used to be commit e10f0529fe)
2003-08-19 20:39:32 +00:00
Gerald Carter
5ba60c5608 working on fix for BUG #294. Not done yet, but this at least clears
up some of the false positives in "rpcclient -c getdriver".
Also make sure that we ask for version2 and 3 drivers on x86.
(This used to be commit 5be5151568)
2003-08-19 16:56:53 +00:00
Herb Lewis
aa39cc37da get rid of more compiler warnings
(This used to be commit 398bd14fc6)
2003-08-15 04:42:05 +00:00
Andrew Bartlett
172766eea7 Change Samba to always use extended security for it's guest logins, (ie,
NTLMSSP with "" username, NULL password), and add --machine-pass (-P) to
all of Samba's clients.

When connecting to an Active Directory DC, you must initiate the CIFS level
session setup with Kerberos, not a guest login.  If you don't, your machine
account is demoted to NT4.

Andrew Bartlett
(This used to be commit 3547cb3def)
2003-08-14 01:08:00 +00:00
Tim Potter
cdf562f5b2 Memory leak fix for create_rpc_bind_req()
(This used to be commit 4d26feabd7)
2003-08-04 02:51:30 +00:00
Simo Sorce
04bf12b176 port latest changes from SAMBA_3_0 tree
(This used to be commit 3101c236b8)
2003-08-02 20:06:57 +00:00
Jim McDonough
8c64504f7c Update my copyrights according to my agreement with IBM
(This used to be commit a2bd8f0bfa)
2003-08-01 15:30:44 +00:00
Gerald Carter
0d087e3ba2 working on transtive trusts issue:
* use DsEnumerateDomainTrusts() instead of LDAP search.
    wbinfo -m now lists all trusted downlevel domains and
    all domains in the forest.

Thnigs to do:

  o Look at Krb5 connection trusted domains
  o make sure to initial the trusted domain cache as soon
    as possible
(This used to be commit 0ab00ccaed)
2003-07-31 05:43:47 +00:00
Jeremy Allison
d6ee1d167c Save us from possibly uninitialised variable (caught by gcc).
Jeremy.
(This used to be commit f3f29665bd)
2003-07-30 23:33:56 +00:00
Gerald Carter
c856d9274b add a few more tidy ups. Now onto winbindd
(This used to be commit f8abdd23e1)
2003-07-30 17:37:46 +00:00
Gerald Carter
de1a998622 add support for DsEnumerateDomainTrusted for enumerating all the
trusted domains in a forest.
(This used to be commit c691c7f7d9)
2003-07-30 17:29:00 +00:00
Gerald Carter
6ec2213bdb domain in schannel bind credentials must be the dest domain, not ours
(This used to be commit e12f6a8c13)
2003-07-25 18:00:57 +00:00
Andrew Bartlett
c9305f1c64 Schannel, once setup, may be used on *ANY* TCP/IP connection until the
connection that set it up has been shut down.

(Also, pipes still connected, and reconnections to the same pipe (eg SAMR)
may continue to use that session key until their TCP/IP connection is shut
down)

Allow further testing by printing out the session key, and allowing it's input
into rpcclient.

Next step is automatic storage in a TDB.

Andrew Bartlett
(This used to be commit fa4d7be161)
2003-07-25 01:26:19 +00:00
Tim Potter
3f3e2a8f49 Fix out of date comment.
(This used to be commit 2e5bd16654)
2003-07-23 07:14:33 +00:00
Gerald Carter
c39c02e1ae fix the build. Ifdef out some code
(This used to be commit e66541d0e1)
2003-07-17 02:49:26 +00:00
Andrew Bartlett
4c53bb6b90 In the presense of RPC fragments, schannel is not strictly request/reply,
so the shared sequence number will not be strictly odd/even.

Andrew Bartlett
(This used to be commit 77c3e69aef)
2003-07-17 01:34:05 +00:00
Gerald Carter
4a090ba06a trying to get HEAD building again. If you want the code
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE
(This used to be commit adb98e7b7c)
2003-07-16 05:34:56 +00:00
Andrew Bartlett
8a4577cc22 Fix up our auth_pipe code to always cope with fragmented datagrams,
in both SCHANNEL and NTLMSSP.

(Try not to deal with a general case as individual special cases...)

Andrew Bartlett
(This used to be commit 6ca77bd28f)
2003-07-16 03:22:43 +00:00
Gerald Carter
b8ddc6238b fix schannel processing on fragmented PDUs. 'net rpc vampire' works again.
(This used to be commit ff0c71148e)
2003-07-15 21:33:28 +00:00
Andrew Bartlett
0b0fa60900 Fix compile error noticed by Ken Cross, use the utility function instead
of an inline replacement...

Andrew Bartlett
(This used to be commit d941255a97)
2003-07-14 12:56:30 +00:00
Andrew Bartlett
456f51bcbe Jeremy requested that I get my NTLMSSP patch into CVS. He didn't request
the schannel code, but I've included that anyway. :-)

This patch revives the client-side NTLMSSP support for RPC named pipes
in Samba, and cleans up the client and server schannel code.  The use of the
new code is enabled by the 'sign', 'seal' and 'schannel' commands in
rpcclient.

The aim was to prove that our separate NTLMSSP client library actually
implements NTLMSSP signing and sealing as per Microsoft's NTLMv1 implementation,
in the hope that knowing this will assist us in correctly implementing
NTLMSSP signing for SMB packets.  (Still not yet functional)

This patch replaces the NTLMSSP implementation in rpc_client/cli_pipe.c with
calls to libsmb/ntlmssp.c.  In the process, we have gained the ability to
use the more secure NT password, and the ability to sign-only, instead of
having to seal the pipe connection.  (Previously we were limited to sealing,
and could only use the LM-password derived key).

Our new client-side NTLMSSP code also needed alteration to cope with our
comparatively simple server-side implementation.  A future step is to replace
it with calls to the same NTLMSSP library.

Also included in this patch is the schannel 'sign only' patch I submitted to
the team earlier.  While not enabled (and not functional, at this stage) the
work in this patch makes the code paths *much* easier to follow.  I have also
included similar hooks in rpccleint to allow the use of schannel on *any* pipe.

rpcclient now defaults to not using schannel (or any other extra per-pipe
authenticiation) for any connection.  The 'schannel' command enables schannel
for all pipes until disabled.

This code is also much more secure than the previous code, as changes to our
cli_pipe routines ensure that the authentication footer cannot be removed
by an attacker, and more error states are correctly handled.

(The same needs to be done to our server)

Andrew Bartlett
(This used to be commit 5472ddc9ea)
2003-07-14 08:46:32 +00:00
Jeremy Allison
ce72beb2b5 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
(This used to be commit ff222716a0)
2003-07-03 19:11:31 +00:00
Volker Lendecke
e1f4d66b73 Fix for bug#3. Show comments when doing 'net group -l'.
Volker
(This used to be commit e5664adc07)
2003-06-12 16:21:22 +00:00
Jeremy Allison
966578c615 Add some basic DEBUG statements at level 10 so we can see what is being
called. This is *essential* (and should be done on all the other cli_XX
rpc calls) to help debug winbindd problems remotely.
Jeremy.
(This used to be commit bc215612cb)
2003-06-09 23:15:34 +00:00
Tim Potter
f93f79d6ed Merge: clarify secure channel connection comment.
(This used to be commit dd063a298f)
2003-05-16 01:58:42 +00:00
Tim Potter
627aa735fb Clarify a comment: The secure channel connection must be opened on the
same session (TCP connection) as the one the challenge was requested
from.
(This used to be commit 5cb9b99f0f)
2003-05-16 01:57:57 +00:00
Tim Potter
5b776f179a Fix two bugs that were stopping net rpc vampire from working over secure
channel:

  - If the domain name passed to create_rpc_bind_req() is empty, use
    lp_workgroup()

  - Correctly set the auth_padding field when the send_size is a multiple
    of 8 bytes

I've tested with nt4sp6 and win2ksp0 and it seems to work, although
there are no password hashes transferred from win2k.  The empty
passwords are being protected by the secure channel encryption though.
(This used to be commit a8c11e8556)
2003-05-12 07:16:21 +00:00
Volker Lendecke
914ef37419 Ok, this is a hack. On a netsec bind reply I did not see anything
useful in the auth verifier yet. So this patch ignores it.

Really checking this would be a lot more intrusive: in rpc_api_pipe we
would have to distinguish between binds and normal requests, or have
more state in the netsec info of cli_state, which is also somewhat
hackish.

Volker
(This used to be commit 8de04fcf68)
2003-05-11 08:08:25 +00:00
Volker Lendecke
d1da999e0a This puts real netlogon connection caching to winbind. This becomes
important once we start doing schannel, as there would be a lot more
roundtrips for the second PIPE open and bind. With this patch logging
in to a member server is a matter of two (three if you count the
ack...) packets between us and the DC.

Volker
(This used to be commit 5b3cb7725a)
2003-05-08 08:02:52 +00:00
Andrew Bartlett
5f86a4a85f Always initialise this - it helps callers who use this in a loop...
Andrew Bartlett
(This used to be commit 97bc047434)
2003-05-07 23:09:18 +00:00
Andrew Bartlett
aa79f23d9b Turn down some DEBUG()s and remove some duplicate code spotted by dfenwick.
Andrew Bartlett
(This used to be commit 542a8b1817)
2003-05-01 02:51:49 +00:00
Jeremy Allison
512c11c445 Fixes from Ronan Waide <waider@waider.ie> for large RPC writes.
Jeremy.
(This used to be commit 30512b7d3e)
2003-04-28 18:43:46 +00:00
Jeremy Allison
fa497c6c76 Fixes from Ronan Waide <waider@waider.ie> for large RPC writes.
Jeremy.
(This used to be commit a330bf170e)
2003-04-28 18:42:34 +00:00
Tim Potter
c61ec2d10e Minor cleanup of enum domain groups/aliases:
- return NT_STATUS_NO_MEMORY instead of NT_STATUS_UNSUCESSFUL if a
      talloc fails

  - don't try and tallocate memory when the number of entries returned was
    zero

  - rename some cut&pasted variable names in enum domain aliases function
(This used to be commit aa748e1da5)
2003-04-25 02:02:01 +00:00
Tim Potter
cc5121f9e5 Minor cleanup of enum domain groups/aliases:
- return NT_STATUS_NO_MEMORY instead of NT_STATUS_UNSUCESSFUL if a
    talloc fails

  - don't try and tallocate memory when the number of entries returned was
    zero

  - rename some cut&pasted variable names in enum domain aliases function
(This used to be commit cb94b2b2d1)
2003-04-25 01:52:52 +00:00
Andrew Bartlett
95d47c474b Merge from HEAD - always initailise this to zero - helps callers in loops.
(This used to be commit f200a5b858)
2003-04-24 13:55:51 +00:00
Andrew Bartlett
80d5a106bf Always initialise this, to assist callers doing loops over this call.
Andrew Bartlett
(This used to be commit 6da9fd157b)
2003-04-22 12:57:30 +00:00
Andrew Bartlett
f071020f5e Merge from HEAD - save the type of channel used to contact the DC.
This allows us to join as a BDC, without appearing on the network as one
until we have the database replicated, and the admin changes the configuration.

This also change the SID retreval order from secrets.tdb, so we no longer
require a 'net rpc getsid' - the sid fetch during the domain join is sufficient.
Also minor fixes to 'net'.

Andrew Bartlett
(This used to be commit 876e00fd11)
2003-04-21 14:09:03 +00:00
Jeremy Allison
e156cf7df4 Fixes for multi-PDU schannel - based on Volker's code. This code needs
tidying up. Samsync still doesn't work due to bad parsing of net_io_sam_alias_info
with a blank description. Still working on this....
Jeremy.
(This used to be commit 942fede9a5)
2003-04-16 21:09:48 +00:00
Jeremy Allison
8f25fd3d72 Fixes to make SCHANNEL work against a W2K DC. Still need to fix
multi-PDU encode/decode with SCHANNEL. Also need to test against WNT DC.
Jeremy.
(This used to be commit ec82e8e9f4)
2003-04-16 15:54:00 +00:00
Jeremy Allison
09a50497d1 Fixes to make SCHANNEL work in 3.0 against a W2K DC. Still need to fix
multi-PDU encode/decode with SCHANNEL. Also need to test against WNT DC.
Jeremy.
(This used to be commit ff66d40970)
2003-04-16 15:39:57 +00:00
Andrew Bartlett
2cb0b91ed1 Store the type of 'sec channel' that we establish to the DC. If we are a
workstation, we have to use the workstation type, if we have a BDC account,
we must use the BDC type - even if we are pretending to be a workstation
at the moment.

Also actually store and retreive the last change time, so we can do
periodic password changes again (for RPC at least).

And finally, a couple of minor fixes to 'net'.

Andrew Bartlett
(This used to be commit 6e6b7b79ed)
2003-04-16 10:20:14 +00:00
Tim Potter
e9a4e1bb2e Merge: remove unused variables.
(This used to be commit dfa9412da5)
2003-04-14 05:28:09 +00:00
Tim Potter
19164790b0 Merge: incorrect arg to debug.
(This used to be commit 800b79e836)
2003-04-14 05:24:59 +00:00
Tim Potter
3f772c182a Removed unused variables.
(This used to be commit 27a608d6a3)
2003-04-14 05:13:15 +00:00
Tim Potter
0f9e64d447 Fixed incorrect argument to debug.
(This used to be commit a4704754d9)
2003-04-14 05:12:53 +00:00
Tim Potter
cb621ec3a6 Merge of samr lookup domain rpc client call from HEAD.
(This used to be commit 5b1807dddf)
2003-04-14 01:17:05 +00:00
cvs2svn Import User
a47d06a2c2 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 381649916e) 2003-04-13 13:50:46 +00:00
Tim Potter
065561932c A new RPC pipe! The \pipe\echo named pipe is for testing large RPC
requests and responses and is only compiled in when --enable-developer
is passed to configure.  It includes server and client side code for
generating and responding to functions on this pipe.  The functions are:

 - AddOne: add one to the uint32 argument and return ig
 - EchoData: echo back a variable sized char array to the caller
 - SourceData: request a variable sized char array
 - SinkData: send a variable sized char array and throw it away

There's a win32 implementation of the client and server in the
junkcode CVS repository in the rpcecho-win32 subdirectory.
(This used to be commit 4ccd34ef83)
2003-04-11 04:09:14 +00:00
Volker Lendecke
7238bf5f40 This is the netlogon schannel client code. Try a
rpcclient -S pdc -U% -c "samlogon user password"

and it should work with the schannel. Needs testing against platforms
different from NT4SP6.

Volker
(This used to be commit eaef0d8aef)
2003-04-09 15:54:17 +00:00
Volker Lendecke
803e23f403 This is the netlogon schannel client code. Try a
rpcclient -S pdc -U% -c "samlogon user password"

and it should work with the schannel. Needs testing platforms
different from NT4SP6.

Volker
(This used to be commit ecd0ee4d24)
2003-04-09 15:47:06 +00:00
Volker Lendecke
f88a3ebde4 Auth2, not also Auth3 sends us flags back, although all the callers
ignore it.

Volker
(This used to be commit 1e03e95545)
2003-04-09 10:10:13 +00:00
Volker Lendecke
a6e09de2fb Auth2, not also Auth3 sends us flags back, although all the callers
ignore it.

Volker
(This used to be commit 6ac6b0f4c0)
2003-04-09 10:09:32 +00:00
Tim Potter
0bcc0c343f SAMR lookupdomain rpc client patches from amber palekar <amber@nu3.net>
(This used to be commit 67bc6bccc2)
2003-04-04 00:52:42 +00:00
Andrew Bartlett
53beee9e56 (merge from HEAD)
NTLM Authentication:

- Add a 'privileged' mode to Winbindd.  This is achieved by means of a directory
  under lockdir, that the admin can change the group access for.

- This mode is now required to access with 'CRAP' authentication feature.
- This *will* break the current SQUID helper, so I've fixed up our ntlm_auth
  replacement:
 - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a
   challenge.
 - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5
   servers.
 - Tested - works for Win2k clients, but not Win9X at present.  NTLMSSP updates
   are needed.
 - Now uses fgets(), not x_fgets() to cope with Squid environment (I think
   somthing to do with non-blocking stdin).

- Add much more robust connection code to wb_common.c - it will not connect to
  a server of a different protocol version, and it will automatically try and
  reconnect to the 'privileged' pipe if possible.
  - This could help with 'privileged' idmap operations etc in future.

- Add a generic HEX encode routine to util_str.c,
- fix a small line of dodgy C in StrnCpy_fn()

- Correctly pull our 'session key' out of the info3 from th the DC.  This is
  used in both the auth code, and in for export over the winbind pipe to
  ntlm_auth.

- Given the user's challenge/response and access to the privileged pipe,
  allow external access to the 'session key'.  To be used for MSCHAPv2
  integration.

Andrew Bartlett
(This used to be commit ec071ca3dc)
2003-03-24 09:54:13 +00:00
Andrew Bartlett
1f5e93e2e7 NTLM Authentication:
- Add a 'privileged' mode to Winbindd.  This is achieved by means of a directory
  under lockdir, that the admin can change the group access for.

- This mode is now required to access with 'CRAP' authentication feature.
- This *will* break the current SQUID helper, so I've fixed up our ntlm_auth
  replacement:
 - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a
   challenge.
 - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5
   servers.
 - Tested - works for Win2k clients, but not Win9X at present.  NTLMSSP updates
   are needed.
 - Now uses fgets(), not x_fgets() to cope with Squid environment (I think
   somthing to do with non-blocking stdin).

- Add much more robust connection code to wb_common.c - it will not connect to
  a server of a different protocol version, and it will automatically try and
  reconnect to the 'privileged' pipe if possible.
  - This could help with 'privileged' idmap operations etc in future.

- Add a generic HEX encode routine to util_str.c,
- fix a small line of dodgy C in StrnCpy_fn()

- Correctly pull our 'session key' out of the info3 from th the DC.  This is
  used in both the auth code, and in for export over the winbind pipe to
  ntlm_auth.

- Given the user's challenge/response and access to the privileged pipe,
  allow external access to the 'session key'.  To be used for MSCHAPv2
  integration.

Andrew Bartlett
(This used to be commit dcdc75ebd8)
2003-03-23 13:03:25 +00:00
cvs2svn Import User
74d3be0218 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit f0d009c3e9) 2003-03-18 07:09:24 +00:00
Martin Pool
8cfec8554e Ignore .po and .po32 files.
(This used to be commit 8d64419625)
2003-03-18 05:51:41 +00:00
Tim Potter
681c932a75 Merge of exit path cleanup for EnumDomainUsers.
(This used to be commit c2e9673328)
2003-02-26 00:06:59 +00:00
Tim Potter
1788f806e7 Merge: const fixes.
(This used to be commit a20aba0999)
2003-02-25 23:51:56 +00:00
Tim Potter
991f6cc3c1 More const fixes and flow on fixes from yesterday's const-fest.
(This used to be commit 018733eedd)
2003-02-25 23:34:57 +00:00
Tim Potter
e25aa22a8f Merge:
> Exit path cleanup for cli_samr_enum_dom_users()
(This used to be commit 655c1e0351)
2003-02-24 02:12:39 +00:00
Tim Potter
ae8d3538c7 Exit path cleanup for cli_samr_enum_dom_users()
(This used to be commit 0bc1dfc68b)
2003-02-21 04:26:58 +00:00
Tim Potter
7024ab8dca Merge NTSTATUS vs WERROR return for cli_srvsvc_net_srv_get_info()
(This used to be commit 7edaf93796)
2003-02-19 22:52:50 +00:00
Tim Potter
e486396267 Return a WERROR instead of a NTSTATUS like the rest of the srvsvc
rpc calls.
(This used to be commit 619af61644)
2003-02-17 04:35:32 +00:00
Jeremy Allison
4cd6e31bd3 Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later.
Jeremy.
(This used to be commit 4c3ee228fc)
2003-02-14 23:04:03 +00:00
Jeremy Allison
8fc1f1aead Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later.
Jeremy.
(This used to be commit a823fee5b4)
2003-02-14 22:55:46 +00:00
Andrew Tridgell
faf30e69ae initial server side privileges implementation, using a tdb. This needs to be hooked into pdb, and we need some access control on changing privileges. That's next
(This used to be commit f4f1f84a6b)
2003-02-12 09:14:35 +00:00
Andrew Tridgell
6c66e42d2c added the 'lsaenumacctwithright' command to rpcclient. This allows you
to lookup what SIDs have a particular privilege (that is how
privileges are stored).
(This used to be commit 3ddb5fb0dd)
2003-02-10 11:31:23 +00:00
Andrew Bartlett
df3acbadf8 One more signed/unsigned fix
(This used to be commit 013fa87473)
2003-02-01 06:25:08 +00:00
Jeremy Allison
f8601187ca Merge tpot's changes to request the correct sizes for user dispinfo
from HEAD. I had to do this for him as he was *so* tired, the poor
chap, plus he has this bad leg, plus the dog ate his homework etc. etc.
Jeremy.
(This used to be commit 1e752b48a1)
2003-01-29 20:15:35 +00:00
Tim Potter
c21af45555 Pass down max_size parameter to cli_samr_query_dispinfo() instead of
using a hardcoded value later on.

Added a helper function that returns the observed values for
max_entries and max_size for each cli_samr_query_dispinfo() call.
These values were obtained from watching the NT4 user manager
application with ethereal and are the only ones that can enumerate a
60k user domain reliably under Windows 2000.
(This used to be commit 2eea2813d9)
2003-01-29 06:20:08 +00:00
Jeremy Allison
438b5c92d4 Merge tridge's client priv code from HEAD.
Jeremy
(This used to be commit 49739be1e2)
2003-01-29 02:24:12 +00:00
Andrew Tridgell
79b26867c0 added LsaRemoveAccountRights
this now gives us complete remove privileges control in the client
libs, so we are in good shape for starting on the server side.
(This used to be commit bf99440398)
2003-01-28 21:31:45 +00:00
Jeremy Allison
734c6d8a51 Merging tridge's privillage client changes from HEAD.
Jeremy.
(This used to be commit 30a33920b4)
2003-01-28 21:09:56 +00:00
Andrew Tridgell
5f9112ac1b cleaned up the lsa_enum_acct_rights function and added a
lsa_add_acct_rights function.

This allows us to add privileges remotely to accounts using rpcclient.
(This used to be commit 2e5e659e09)
2003-01-28 12:52:51 +00:00
Tim Potter
f27d292efc Merge: remove dead function.
(This used to be commit 648307ab3d)
2003-01-22 23:33:18 +00:00
Andrew Tridgell
96c795cea7 reverted this patch till I sort out the craziness with UNIHDR
(This used to be commit e3d00fa47d)
2003-01-17 06:15:18 +00:00
Andrew Tridgell
ec879eacc2 This removes the 3rd argument from init_unistr2(). There were 240
calls to init_unistr2() in the code and every one of them got the 3rd
argument incorrect, so I thought it best just to remove the argument.

The incorrect usage was caused by callers using strlen() to determine
the length of the string. The 3rd argument to init_unistr2() was
supposed to be the character length, not the byte length of the
string, so for non-english this could come out wrong.

I also removed the bogus 'always allocate at least 256 bytes'
hack. There may be some code that relies on this, but if there is then
the code is broken and needs fixing.
(This used to be commit b9eff31b14)
2003-01-17 04:58:45 +00:00
Tim Potter
5183aada24 Let's clean up client side ntlmssp!
Removed a dead function.
(This used to be commit a1c790b5ea)
2003-01-17 04:05:28 +00:00
Gerald Carter
4242eda183 merging some rpcclient and net functionality from HEAD
(This used to be commit 7a4c874842)
2003-01-15 17:22:48 +00:00
Andrew Tridgell
eb6312af9f added cli_lsa_enum_account_rights() call. Note that this is in
principal similar to the existing cli_lsa_enum_privsaccount() call,
except that cli_lsa_enum_account_rights() doesn't require a call to
open_account first. There is also the minor matter that
cli_lsa_enum_account_rights() works whereas
cli_lsa_enum_privsaccount() doesn't!

this call can be used to find what privileges an account or group
has. This is a first step towards proper privileges support in Samba.
(This used to be commit 65bac11d71)
2003-01-15 07:40:40 +00:00
Tim Potter
3c23522863 Added comment about a SMB_ASSERT()
(This used to be commit 056bdfbce7)
2003-01-14 05:25:08 +00:00
Richard Sharpe
5bbac9dd80 Make sure that those cleanups actually went in.
(This used to be commit 9a38e37811)
2003-01-13 20:30:28 +00:00
Richard Sharpe
16925589eb Now that I am running config.developer, I decided to get rif of some warnings:
1. reboot in parse_reg and cli_reg was shadowing a definition on FreeBSD
   4.3 from system includes.

2. Added a bit of const to places.

3. Made sure internal functions were declared where needed.
(This used to be commit fd847aa936)
2003-01-13 20:04:40 +00:00
Gerald Carter
071af8f007 [merge] make sure to update print queue cache during timeout_processing() to send notify events; CR 1491
(This used to be commit f8a915b14d)
2003-01-11 02:38:36 +00:00
Gerald Carter
47873e781d [merge] make sure to updatre print queue cache during timeout_processing() to send notify events; CR 1491
(This used to be commit 142c5029c7)
2003-01-11 02:29:23 +00:00
Andrew Bartlett
b327f5ba53 Merge from HEAD - idra's fix for the fact that the shutdown command takes two 1
byte boolean flags, not a 16 bit bitmask.

Andrew Bartlett
(This used to be commit a4f7777ca0)
2003-01-04 07:50:04 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f947)
2003-01-03 08:28:12 +00:00
Andrew Bartlett
6d66fb308a BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
(This used to be commit 92a777d0ea)
2003-01-02 09:07:17 +00:00
Simo Sorce
60667264b7 the shutdown call does not have a 16 bit flags, but 2 byte representing booleans
this commit change the structure and code to reflect this

some test revelead I'm right.

some other revelead currently the abort shutdown does not work against my test machine even if it returns successfully ... need investigation
(This used to be commit c5892b656d)
2002-12-30 04:41:27 +00:00
Simo Sorce
e8c80081b5 fix rpcclient querygroup command (from 2.2 and head)
(This used to be commit ea2154b269)
2002-12-08 12:03:42 +00:00
Simo Sorce
a543e6ea62 make querygroup in rpcclient working, same fix as per 2.2 tree
(This used to be commit 8877ff2482)
2002-12-08 11:56:45 +00:00
Jeremy Allison
1c8e1e0448 Ensure callid is not used uninitialized.
Jeremy.
(This used to be commit ddd7099595)
2002-12-02 23:51:53 +00:00
Gerald Carter
e6f956f9b4 fix cli_ds_getprimarydominfo(); merge from SAMBA_3_0
(This used to be commit 481a8a8aa9)
2002-11-27 02:23:25 +00:00
Gerald Carter
0c1a06dfad * finializnig RedHat package for alpha21 release
* fix cli_ds_getprimarydominfo() (bad memcpy() )
(This used to be commit e6184bbd8f)
2002-11-27 02:22:53 +00:00
Tim Potter
b2201f2f39 Merge from appliance:
>Fix memory leak in cli_ds_getprimarydominfo()
(This used to be commit e643003dd4)
2002-11-19 01:14:00 +00:00
Tim Potter
1c5ffbd0ac Merge from appliance:
>Fix memory leak in cli_ds_getprimarydominfo()
(This used to be commit ca689916da)
2002-11-19 01:12:44 +00:00
Tim Potter
e0d81b7728 A cool idea from mbp: create a big shared library of all Samba objects
which we can use to link against Samba unit test programs.  Now we can
compile and link unit tests without having to create 4MB executables
for each program

It's called libbigballofmud.so both to discourage casual usage and
also to reflect what the dependencies within Samba have become.
(This used to be commit fdce4be719)
2002-11-15 00:20:55 +00:00
Jeremy Allison
2f194322d4 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit f755711df8)
2002-11-12 23:20:50 +00:00
Jeremy Allison
250c980119 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit 82b8f749a3)
2002-11-12 23:15:52 +00:00
Jim McDonough
397873f0c4 Sync with HEAD to get enumprinterkey api.
(This used to be commit f6e21ba4c7)
2002-11-08 20:36:31 +00:00
Jeremy Allison
98f9e758f0 Merge Jim's new rpc client code to 3.0.
Jeremy.
(This used to be commit 121c456d43)
2002-11-07 18:54:02 +00:00
Jim McDonough
e4a5ae5259 What is wrong with you, Jim? Check in the final version, not an interim one...
(This used to be commit 1fd6d34526)
2002-11-07 15:43:04 +00:00
Jim McDonough
2b37e87bb9 Allow multiple fragment RPC's to be sent.
(This used to be commit d423e6424b)
2002-11-07 14:40:25 +00:00
Jeremy Allison
47955b2f6c Merge of scalable printing code fix... Needs testing.
Also tidied up some of Richard's code (I don't think he uses the compiler
flags -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual like
I do :-) :-).
Jeremy.
(This used to be commit 10024ed06e)
2002-11-07 02:38:42 +00:00
Jeremy Allison
9304248788 Merge of scalable printing code fix... Needs testing.
Jeremy.
(This used to be commit d030df7643)
2002-11-07 02:15:35 +00:00
Tim Potter
904649b6f0 Client side functions for enumprinterkey.
(This used to be commit f56ce473b6)
2002-11-06 23:38:39 +00:00
Tim Potter
84ef8d47a1 Display pipe name in rpc bind failure debug.
(This used to be commit 62ab0f8cbe)
2002-11-02 00:45:19 +00:00
Tim Potter
c49573e59f Display pipe name in rpc bind failure debug.
(This used to be commit 70838b33a6)
2002-11-02 00:43:38 +00:00
Tim Potter
3a225c0785 Tidyup of some DCERPC pipe connection debugs. The new LSA_DS stuff
generates some errors we haven't seen before which are inappropriately
logged at level 0.
(This used to be commit bd64de3716)
2002-11-01 00:38:26 +00:00
Tim Potter
5dd341d647 Tidyup of some DCERPC pipe connection debugs. The new LSA_DS stuff
generates some errors we haven't seen before which are inappropriately
logged at level 0.
(This used to be commit 40d5112048)
2002-11-01 00:37:45 +00:00
Tim Potter
346c9845a8 Fix a silly memset typo.
Change a int* to a uint32* in the cli_spoolss_enum_ports() function.
(This used to be commit 41a22b3a00)
2002-10-21 04:07:56 +00:00
Tim Potter
aed3a9f343 Fix a silly memset typo.
Change a int* to a uint32* in the cli_spoolss_enum_ports() function.
(This used to be commit 4663d79d3e)
2002-10-21 04:03:49 +00:00
Tim Potter
1188b37d6a Zero tallocated memory in decode_printer_info, decode_driver_info,
decode_port_info and decode_printerdriver functions.
(This used to be commit e28a719f04)
2002-10-21 02:49:55 +00:00
Tim Potter
47cf2825f8 Zero tallocated memory in decode_printer_info, decode_driver_info,
decode_port_info and decode_printerdriver functions.
(This used to be commit bf2d9dd5ba)
2002-10-21 02:48:55 +00:00
Tim Potter
14a85b0008 Merge of SMB_ASSERT.
(This used to be commit 1094e1ffde)
2002-10-17 05:23:14 +00:00
Tim Potter
e7c011412b Do a SMB_ASSERT() in cli_nt_session_open() when the pipe index is out
of range instead of silently failing.
(This used to be commit b5111f47b5)
2002-10-17 05:08:34 +00:00
Gerald Carter
bfa93735ab merge from APP_HEAD of winbindd's domain local group fix
(This used to be commit 09c6f6329d)
2002-10-08 18:32:42 +00:00
Gerald Carter
876afb5d0f merge from APP_HEAD
* s/driverlocation/comment
* detect native mode domain and enumerate local groups

Also

* Added sendfile stats from SAMBA_2_2
(This used to be commit 764b58e2c0)
2002-10-08 18:29:57 +00:00
Gerald Carter
055e6d1491 * merge native_mode flag in winbindd_domain struct from app-head
* add some files missing from a previous commit
(This used to be commit 29159c9737)
2002-10-04 21:42:04 +00:00
Gerald Carter
d2eae2a299 merge native_mode flag in winbindd_domain struct from app-head
(This used to be commit dd948a302a)
2002-10-04 21:39:09 +00:00
Gerald Carter
9c1b62c0fd merge of working dsrolegetprimdominfo() client code from APP_HEAD
(This used to be commit 028477e352)
2002-10-04 19:33:41 +00:00
cvs2svn Import User
326a429d46 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 7950dfc795) 2002-10-04 19:11:37 +00:00
Gerald Carter
d2ea6d5ae7 merge of working dsrolegetprimdominfo() client code from APP_HEAD
(This used to be commit f70caa25e4)
2002-10-04 19:11:36 +00:00
Gerald Carter
36ef82a529 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
(This used to be commit 1cfd2ee433)
2002-10-04 04:10:23 +00:00
Gerald Carter
83e58265b5 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
(This used to be commit 38c9e42998)
2002-10-04 03:51:43 +00:00
Gerald Carter
ef6f8197a3 remove files not in HEAD
(This used to be commit 9d9f7bbf87)
2002-09-26 18:53:51 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Gerald Carter
5793e15a27 change notify merge from APP_HEAD
(This used to be commit b5227f0a64)
2002-09-10 02:38:15 +00:00
Tim Potter
18c3436f9d Return WERR_UNKNOWN_LEVEL for unknown info levels.
(This used to be commit d30da51956)
2002-09-09 03:22:39 +00:00
Tim Potter
1f919364f4 Return WERR_UNKNOWN_LEVEL for getprinterdriver level 6 as we don't
know how to decode a printer driver into a DRIVER_INFO_6 structure.
(This used to be commit 1338f623c2)
2002-09-09 01:13:27 +00:00
Tim Potter
c9e550f765 cli_spoolss_enumprinterdrivers:
Return WERR_UNKNOWN_LEVEL if we can't decode the returned buffer.
(This used to be commit 0379a32d82)
2002-09-06 01:12:52 +00:00
Tim Potter
7616f86a63 Conver cli_spoolss routines to use REGISTRY_VALUE and REGVAL_CTR code. Nice one jerry!
(Hey I thought I checked this in already?)
(This used to be commit f0c6303beb)
2002-09-03 05:35:47 +00:00
Tim Potter
70a132c2d9 Change JOB_INFO_CTR to return a pointer to an array rather than array of pointers.
Implemented client function for deleteprinterdataex.
(This used to be commit f7641c8fd1)
2002-09-03 03:18:19 +00:00
Tim Potter
882ff84daa Return data from enumprinterdataex by deep copying on passed in tdb context.
(This used to be commit 1f629aa54e)
2002-09-03 00:26:19 +00:00
Tim Potter
45fc6b503e Implemented some more client side spoolss functions:
- getprinterdataex(), setprinterdataex(), enumprinterdataex()

Pass data type down to setprinterdata() fn instead of hardcoding REG_SZ
(This used to be commit 62a6078253)
2002-09-02 07:37:35 +00:00
Jean-François Micouleau
cfb5e91178 added cli_net_auth_3 client code.
changed cli_nt_setup_creds() to call cli_net_auth_2 or cli_net_auth_3 based on a switch.
pass also the negociation flags all the way.
all the places calling cli_nt_setup_creds() are still using cli_net_aut2(), it's just for future use and for rpcclient.

in the future we will be able to call auth_2 or auth_3 as we want.

	J.F.
(This used to be commit 4d38caca40)
2002-08-30 10:46:59 +00:00
Tim Potter
dbbb157b2e Don't try to convert enumprinters name to a unc name.
(This used to be commit e09007dd5d)
2002-08-27 01:48:00 +00:00
Tim Potter
83c5985880 Pass the object name down to the enum_printers rpc. By default this is the
server name and everything works as advertised.  See the MSDN doco for details.
(This used to be commit d6b10fe969)
2002-08-27 00:38:55 +00:00
Tim Potter
55315b4b4e Moved calculation of secure channel type into a new function.
(This used to be commit b8dba26978)
2002-08-23 13:38:00 +00:00
Andrew Tridgell
2a505d023f added a 'net rpc samdump' command for dumping the whole sam via
samsync operations (as a BDC)
(This used to be commit e4cb106d2e)
2002-08-22 22:48:54 +00:00
Shirish Kalele
d9a4055174 The "max data count" value in SMB transacts indicates how much the other end can
send us. As it stands, we incorrectly set it to the number of bytes we are
sending. Correcting this by setting a static value of 1024 (This could even be
something larger). Improves RPC client performance.
(This used to be commit b0bd42c946)
2002-08-20 19:58:23 +00:00
Jelmer Vernooij
1f7d18a99c Sync 3.0 branch with HEAD
(This used to be commit 3823a2ff5a)
2002-08-17 16:05:44 +00:00
cvs2svn Import User
592dd24957 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 6938b5b98a) 2002-08-17 07:09:23 +00:00
Jim McDonough
ae6cb0fb31 Add lsa 0x2e (queryinfo2) client side
(This used to be commit c3b05b21a0)
2002-08-12 13:40:59 +00:00
Jim McDonough
4a822be1d3 Add client side support for samr connect4 (0x3e). Seems to have one
additional parm compared to samr connect, but I've only seen 0x00000002
in that field...
(This used to be commit ed2370b91f)
2002-08-12 08:25:02 +00:00
Tim Potter
335aa54b46 Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD.
(This used to be commit fe43c2ac2d)
2002-08-08 04:58:19 +00:00
Andrew Tridgell
ab9ff0fa73 This fixes a number of ADS problems, particularly with netbiosless
setups.

- split up the ads structure into logical pieces. This makes it much
  easier to keep things like the authentication realm and the server
  realm separate (they can be different).

- allow ads callers to specify that no sasl bind should be performed
(used by "net ads info" for example)

- fix an error with handing ADS_ERROR_SYSTEM() when errno is 0

- completely rewrote the code for finding the LDAP server. Now try DNS
  methods first, and try all DNS servers returned from the SRV DNS
  query, sorted by closeness to our interfaces (using the same sort code
  as we use in replies from WINS servers). This allows us to cope with
  ADS DCs that are down, and ensures we don't pick one that is on the
  other side of the country unless absolutely necessary.

- recognise dnsRecords as binary when displaying them

- cope with the realm not being configured in smb.conf (work it out
  from the LDAP server)

- look at the trustDirection when looking up trusted domains and don't
  include trusts that trust our domains but we don't trust
  theirs.

- use LDAP to query the alternate (netbios) name for a realm, and make
  sure that both and long and short forms of the name are accepted by
  winbindd. Use the short form by default for listing users/groups.

- rescan the list of trusted domains every 5 minutes in case new trust
  relationships are added while winbindd is running

- include transient trust relationships (ie. C trusts B, B trusts A,
  so C trusts A) in winbindd.

- don't do a gratuituous node status lookup when finding an ADS DC (we
  don't need it and it could fail)

- remove unused sid_to_distinguished_name function

- make sure we find the allternate name of our primary domain when
  operating with a netbiosless ADS DC (using LDAP to do the lookup)

- fixed the rpc trusted domain enumeration to support up to approx
  2000 trusted domains (the old limit was 3)

- use the IP for the remote_machine (%m) macro when the client doesn't
  supply us with a name via a netbios session request (eg. port 445)

- if the client uses SPNEGO then use the machine name from the SPNEGO
  auth packet for remote_machine (%m) macro

- add new 'net ads workgroup' command to find the netbios workgroup
  name for a realm
(This used to be commit e358d7b24c)
2002-08-05 02:47:46 +00:00
Tim Potter
e9360f1a45 Moved rpc client routines from libsmb back to rpc_client where they belong.
(This used to be commit cb946b5dad)
2002-08-02 07:20:56 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Jeremy Allison
452eb38df0 Proper merge of all the working printing stuff from APPLIANCE_HEAD.
Now let's keep this in sync !
Jeremy.
(This used to be commit 3603cd4947)
2002-06-28 00:17:15 +00:00
Simo Sorce
a60e37096d more debug classess activated
(This used to be commit 897e64d2e0)
2002-06-18 09:20:13 +00:00
Jim McDonough
d4fa62868e Add user name to netsessenum RPC to stop 1783 messages
(This used to be commit 18854bcd2d)
2002-06-03 22:12:44 +00:00
Jeremy Allison
6542738568 More cleanup work preparing for SMB signing.
Jeremy.
(This used to be commit 3c05f7c06f)
2002-06-01 00:10:08 +00:00
Tim Potter
43b35364ff Cleaned up srvsvc constants a bit.
(This used to be commit ca61f68d5c)
2002-05-29 00:49:26 +00:00
Andrew Bartlett
f9d2db36f3 Remove unused files.
The size of samba going down for once :-)

Andrew Bartlett
(This used to be commit 00ef4aad88)
2002-05-18 13:50:59 +00:00
Gerald Carter
83ece07995 WERROR merge from SAMBA_2_2
(This used to be commit 32dc5dbbfb)
2002-04-11 01:50:18 +00:00
Tim Potter
ab13654dc9 Renamed get_nt_error_msg() to nt_errstr().
(This used to be commit 1f007d3ed4)
2002-03-17 04:36:35 +00:00
Gerald Carter
65c007b583 syncing up printing code with SAMBA_2_2 (already done some merges
in the reverse).

  * add in new printer change notify code from SAMBA_2_2

  * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex()

  * sync up the _print_queue_struct in smb.h (why did someone change the
    user/file names in fs_user/fs_file (or vice-versa) ? )

  * sync up some cli_spoolss_XXX functions
(This used to be commit 5760315c1d)
2002-03-15 08:14:10 +00:00
Gerald Carter
8cd8cfd4cf merge from 2.2
(This used to be commit 50fa21c995)
2002-02-13 16:44:49 +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 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Martin Pool
4f3a2be2b9 Add prs_dump_before to dump everything from the start of the prs
buffer up to the current position, and use this to dump pipe buffers
just before parsing.
(This used to be commit 92a3ab274e)
2002-01-02 07:48:07 +00:00
Martin Pool
05ae7ca1cb Also capture received data
(This used to be commit 93fadcd111)
2002-01-02 06:08:02 +00:00
Martin Pool
f23cc6ab25 struct cli_state remembers the pipe name that it's talking to, if any,
so that we can print it in later debug messages.

Call prs_dump to dump out requests sent by the client at sufficiently
high debug levels.
(This used to be commit 9973b22b34)
2002-01-02 05:39:49 +00:00
Andrew Bartlett
4a6d1318bd A farily large commit:
- Move rpc_client/cli_trust.c to smbd/change_trust_pw.c
  - It hasn't been used by anything else since smbpasswd lost its -j

 - Add a TALLOC_CTX to the auth subsytem.  These are only valid for the length
   of the calls to the individual modules, if you want a longer context hide it
   in your private data.

   Similarly, all returns (like the server_info) should still be malloced.

 - Move the 'ntdomain' module (security=domain in oldspeak) over to use the new
   libsmb domain logon code.  Also rework much of the code to use some better
   helper functions for the connection - getting us much better error returns
   (the new code is NTSTATUS).

   The only remaining thing to do is to figure out if tpot's 0xdead 0xbeef for
   the LUID feilds is sufficient, or if we should do random LUIDs as per the old
   code.

   Similarly, I'll move winbind over to this when I get a chance.

This leaves the SPOOLSS code and some cli_pipe code as the only stuff still in
rpc_client, at least as far as smbd is concerned.

While I've given this a basic rundown, any testing is as always appriciated.

Andrew Bartlett
(This used to be commit d870edce76)
2002-01-01 03:10:32 +00:00
Andrew Tridgell
5d378a280f added internal sasl/gssapi code. This means we are no longer dependent on cyrus-sasl which makes the code much less fragile. Also added code to auto-determine the server name or realm
(This used to be commit 435fdf276a)
2001-12-08 11:18:56 +00:00
Andrew Bartlett
8ba00d147b OK. Smbpasswd -j is DEAD.
This moves the rest of the functionality into the 'net rpc join' code.

Futhermore, this moves that entire area over to the libsmb codebase, rather
than the crufty old rpc_client stuff.

I have also fixed up the smbpasswd -a -m bug in the process.

We also have a new 'net rpc changetrustpw' that can be called from a
cron-job to regularly change the trust account password, for sites
that run winbind but not smbd.

With a little more work, we can kill rpc_client from smbd entirly!
(It is mostly the domain auth stuff - which I can rework - and the
spoolss stuff that sombody else will need to look over).

Andrew Bartlett
(This used to be commit 575897e879)
2001-12-05 11:00:26 +00:00
Tim Potter
ff27a326f1 I think the lookup_pdc_name() should be called lookup_dc_name() and the
name_status_find() call here should look up a #1c name instead of #1d.
This fixes some bugs currently with BDC authentication in winbindd and in
smbd as you can't query the #1d name with the ip address of a BDC.

Who is Uncle Tom Cobbley anyway?
(This used to be commit 4215048f7b)
2001-11-29 05:50:32 +00:00
Andrew Bartlett
d0a2faf78d This is another rather major change to the samba authenticaion
subystem.

The particular aim is to modularized the interface - so that we
can have arbitrary password back-ends.

This code adds one such back-end, a 'winbind' module to authenticate
against the winbind_auth_crap functionality.  While fully-functional
this code is mainly useful as a demonstration, because we don't get
back the info3 as we would for direct ntdomain authentication.

This commit introduced the new 'auth methods' parameter, in the
spirit of the 'auth order' discussed on the lists.  It is renamed
because not all the methods may be consulted, even if previous
methods fail - they may not have a suitable challenge for example.

Also, we have a 'local' authentication method, for old-style
'unix if plaintext, sam if encrypted' authentication and a
'guest' module to handle guest logins in a single place.

While this current design is not ideal, I feel that it does
provide a better infrastructure than the current design, and can
be built upon.

The following parameters have changed:
 - use rhosts =

  This has been replaced by the 'rhosts' authentication method,
 and can be specified like 'auth methods = guest rhosts'

 - hosts equiv =

  This needs both this parameter and an 'auth methods' entry
  to be effective.  (auth methods = guest hostsequiv ....)

 - plaintext to smbpasswd =

  This is replaced by specifying 'sam' rather than 'local'
  in the auth methods.

The security = parameter is unchanged, and now provides defaults
for the 'auth methods' parameter.

The available auth methods are:

guest
rhosts
hostsequiv
sam (passdb direct hash access)
unix (PAM, crypt() etc)
local (the combination of the above, based on encryption)
smbserver (old security=server)
ntdomain (old security=domain)
winbind (use winbind to cache DC connections)


Assistance in testing, or the production of new and interesting
authentication modules is always appreciated.

Andrew Bartlett
(This used to be commit 8d31eae52a)
2001-11-24 12:12:38 +00:00
Jeremy Allison
e74c51dfeb I *love* removing code :-). Removed 4 files that weren't being used.
All this stuff was being pulled in due to *one* unneeded call to
fetch a domain SID which smbpasswd already puts in the database...
Jeremy.
(This used to be commit 6bf2505cce)
2001-11-16 18:32:32 +00:00
Tim Potter
c87c352699 Removed duplicate debug.
(This used to be commit 5c3521c937)
2001-11-05 00:12:23 +00:00
Jeremy Allison
f8e2baf39e Added NT_USER_TOKEN into server_info to fix extra groups problem.
Got "medieval on our ass" about const warnings (as many as I could :-).
Jeremy.
(This used to be commit ee5e7ca547)
2001-11-03 23:34:24 +00:00
Andrew Bartlett
60f0627afb This is a farily large patch (3300 lines) and reworks most of the AuthRewrite
code.

In particular this assists tpot in some of his work, becouse it provides the
connection between the authenticaion and the vuid generation.

Major Changes:
	- Fully malloc'ed structures.
	  - Massive rework of the code so that all structures are made and destroyed
	    using malloc and free, rather than hanging around on the stack.
	- SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them
	   to be declared 'invalid' without the chance that people might get ROOT by
	   default.

	- kill off some of the "DOMAIN\user" lookups.  These can be readded at a more
	  appropriate place (probably domain_client_validate.c) in the future. They
	  don't belong in session setups.

	- Massive introduction of DATA_BLOB structures, particularly for passwords.

	- Use NTLMSSP flags to tell the backend what its getting, rather than magic
	  lenghths.

	- Fix winbind back up again, but tpot is redoing this soon anyway.

	- Abstract much of the work in srv_netlog_nt back into auth helper functions.

This is a LARGE change, and any assistance is testing it is appriciated.

Domain logons are still broken (as far as I can tell) but other functionality
seems
intact.

Needs testing with a wide variety of MS clients.

Andrew Bartlett
(This used to be commit f70fb819b2)
2001-10-31 10:46:25 +00:00
Tim Potter
d607fe0474 Don't accidentally return success when sending a broken NET_SAMLOGON
request.  This exposes a domain authentication bug with win2k where a rpc
fault is returned but not propagated up as an error.
(This used to be commit 27cd7ac857)
2001-10-31 04:42:16 +00:00
Tim Potter
d16ce1910b Fixed typo in debug message.
(This used to be commit 26fa0374bb)
2001-10-30 00:19:43 +00:00
Andrew Tridgell
a689b24db1 the next step in the intl changeover. This should get us compiling agian,
and also completes the switch to lang_tdb.c. SWAT should now work
with a po file in the lib/ directory

also removed useless SYSLOG defines in many files
(This used to be commit 5296b20ad8)
2001-10-14 12:10:29 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Tim Potter
15a6649c01 Converted cli_net_auth2() and cli_nt_setup_creds() to return NTSTATUS.
(This used to be commit e0bdcbc599)
2001-09-18 02:49:35 +00:00
Simo Sorce
941a3a5d3a move to SAFE_FREE()
(This used to be commit 549fe42bd4)
2001-09-17 09:41:30 +00:00
Andrew Bartlett
dec3cbcaf0 Fix up workstaion and kickoff time checks, moved to auth_smbpasswd.c where
they can have general effect.

Fixed up workstaion support in the rest of samba, so that we can do these
checks.

Pass through the workstation for cli_net_logon(), if supplied.
(This used to be commit 7f04a139b2)
2001-09-16 06:35:35 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Tim Potter
b9e7eeaf4f More status32 conversions.
(This used to be commit 031a19639c)
2001-08-24 20:31:00 +00:00
Tim Potter
f3aeaa8c90 Fixed typo in debug message.
(This used to be commit ea8c0a75af)
2001-08-24 18:37:06 +00:00
Tim Potter
90b1f17585 Set secure channel type depending on server role.
(This used to be commit 7d5440a7ae)
2001-08-24 17:15:54 +00:00
Andrew Bartlett
6ad80352dd This patch does a number of things, mostly smaller than they look :-)
In particuar, it moves the domain_client_validate stuff out of
auth_domain.c to somwhere where they (I hope) they can be shared
with winbind better.  (This may need some work)

The main purpose of this patch was however to improve some of the
internal documentation and to correctly place become_root()/unbecome_root()
calls within the code.

Finally this patch moves some more of auth.c into other files, auth_unix.c
in this case.

Andrew Bartlett
(This used to be commit ea1c547ac8)
2001-08-12 11:19:57 +00:00
Tim Potter
5836e1f7fe Use new client error api.
(This used to be commit b196a52483)
2001-08-10 06:11:31 +00:00
Tim Potter
62f7f6a022 Use the new client error api.
(This used to be commit 688da3c41d)
2001-08-10 06:01:11 +00:00
Tim Potter
af0af3d42a Removed nt_error field from cli_state as it was not used anywhere.
(This used to be commit 589aaa5fb1)
2001-08-10 05:50:20 +00:00
Andrew Bartlett
986372901e This is my 'Authentication Rewrite' version 1.01, mostly as submitted to
samba-technical a few weeks ago.

The idea here is to standardize the checking of user names and passwords,
thereby ensuring that all authtentications pass the same standards.  The
interface currently implemented in as

nt_status = check_password(user_info, server_info)

where user_info contains (mostly) the authentication data, and server_info
contains things like the user-id they got, and their resolved user name.

The current ugliness with the way the structures are created will be killed
the next revision, when they will be created and malloced by creator functions.

This patch also includes the first implementation of NTLMv2 in HEAD, but which
needs some more testing.  We also add a hack to allow plaintext passwords to be
compared with smbpasswd, not the system password database.

Finally, this patch probably reintroduces the PAM accounts bug we had in
2.2.0, I'll fix that once this hits the tree.  (I've just finished testing
it on a wide variety of platforms, so I want to get this patch in).
(This used to be commit b30b6202f3)
2001-08-03 13:09:23 +00:00
Tim Potter
648528196c Held a shoot-out between NT_STATUS_NO_PROBLEMO and NT_STATUS_NOPROBLEMO.
According to the incorruptible judges find and grep, the latter won.

Mmm - procrastination.  (-:
(This used to be commit 2e33940360)
2001-07-25 06:42:05 +00:00
Andrew Bartlett
e4b6f641e8 This fixes security=domain, which has been broke since the big charset
changeover.  For my own sainity I have created a new function to fill out both
the header and buffer for a string in an RPC struct.  This DOES NOT take a
length argument, only the actual string to be placed.

The RPC code is currently littered with code that does init_uni_hdr() followed
immidiatly by init_unistr2(), and often the length argument is wrong.  (It was
for the code I changed, even before the charset stuff).  Another bug where we
made strings AT LEAST MAX_UNICODE_LEN long hid this bug.

This works for loopback connections to Samba, and can't be any more broke than
it was before :-).  (We had double and revese conversions, fun...).

In particular this makes us multibyte complient.

In any case, if there are no objections I will slowly convert other bits of
code to the same system.
(This used to be commit cf1d1cd9d6)
2001-07-10 17:02:02 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
5fb9a869b7 Use a logical cli_read(), removed the cli_read_one() hack.
Jeremy.
(This used to be commit 2999eab5ab)
2001-06-29 00:22:22 +00:00
Tim Potter
024250d6ca Use cli_read_one() for reading DCE/RPC reply fragments. We need to check
for and ignore ERRmoredata errors as the client library doesn't support
32-bit error messages.

Added some annotations for the RPC pipe code to make it a bit clearer
maybe.
(This used to be commit f179e0ff61)
2001-06-22 01:19:45 +00:00
Tim Potter
1aa05a31ac Fixed some return code checks for cli_initialise() from False to NULL.
Spotted by Joe Doran <joed@interlude.eu.org>
(This used to be commit 3e3b9bc538)
2001-06-14 00:08:42 +00:00
Tim Potter
3bc291f55d Removed irritating and unecessary debug message.
(This used to be commit b49c4cd441)
2001-06-02 05:33:43 +00:00
Tim Potter
dd0cca5c21 Broke out change trust account password routines into separate file
since they're only used in one place anyway (timeout_processing() in
process.c)
(This used to be commit d1e5d5d62f)
2001-05-17 02:52:45 +00:00