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

1008 Commits

Author SHA1 Message Date
Gerald Carter
500c28974d fix some warnings from the Sun compiler
(This used to be commit ebabf72a78)
2004-01-09 14:54:33 +00:00
Gerald Carter
fb1c0450f2 commiting jra's fix for Exchange clear test auth
(This used to be commit 344e113368)
2004-01-07 19:57:08 +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
d90e416006 Add the alignment required before all 2-byte quantities in NDR. Allows us
to correctly parse plaintext netlogon calls with odd-length passwords

Andrew Bartlett
(This used to be commit de3c3cbeeb)
2003-12-29 04:21:32 +00:00
Gerald Carter
ae8d35b2a2 Fix UNISTR2 length bug in LsaQueryInfo(3) that cause SID resolution to fail on local files on on domain members; bug 875
(This used to be commit c6594e3557)
2003-12-10 21:13:44 +00:00
Andrew Tridgell
1d4978d722 fixed a problem with "net rpc vampire" mis-parsing the alias member
info reply

Thanks to a bug report by 'musb'
(This used to be commit 310f90f368)
2003-12-05 11:30:47 +00:00
Gerald Carter
3d929b1ce6 * fix RemoveSidForeignDomain() ; bug 252
* don't fall back to unmapped UNIX group for
  get_local_group_from_sid()
* remove an extra become/unbecome_root() pair
  from group enumeration
(This used to be commit da12bbdb0d)
2003-12-04 03:35:46 +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
Jeremy Allison
e0fd9d28e9 Fix from Andrew Bartlett to fix up the munged-dial problem.
Jeremy.
(This used to be commit 703b1b76e2)
2003-11-17 22:07:47 +00:00
Gerald Carter
281e293331 * Fix from SATOH Fumiyasu for bug 660 (failing to view print
jobs) by only enforce the 'max reported print jobs' parameter
  when it is non-zero.

* Fixed bug 338 by making sure that data values are written
  out when we are marshalling an EnumPrinterDataEx() reply.
  This probably fixes other bugs reported against point-n-print
  feature in 3.0.0
(This used to be commit fd98af75d6)
2003-11-13 20:15:17 +00:00
Gerald Carter
b64c6355b0 fix crash bug due to empyrt munged dial string; patch from metze
(This used to be commit ccd5665a65)
2003-11-11 19:22:00 +00:00
Jeremy Allison
5cfe36d09d Handle munged dial string. Patch from Aur?lien Degr?mont <adegremont@idealx.com>with memory leak fixes by me.
Jeremy.
(This used to be commit e591854eda)
2003-11-07 18:32:23 +00:00
Tim Potter
490dbaec81 Fix some uninitialised variable warnings.
(This used to be commit 68945027b5)
2003-11-03 14:21:10 +00:00
Jim McDonough
3d8e3f314b Add initshutdown pipe commands to rpcclient. Second part of fix to bug
#534
(This used to be commit 4e86243ea1)
2003-10-24 13:49:29 +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
Jim McDonough
bca9e7d325 Be sure referent ID is updated for incoming structures, too.
(This used to be commit 00e0aba2cf)
2003-10-22 20:59:46 +00:00
Jim McDonough
7186340179 Fix typo
(This used to be commit 26956cdef9)
2003-10-21 16:27:46 +00:00
Jim McDonough
6fe9423fc6 Update structures after ethereal showed some marshalling/unmarshalling
errors.
(This used to be commit 9d0f322a85)
2003-10-20 21:10:18 +00:00
Jim McDonough
2cfb3e9b70 Several updates:
- add support for named pipe and netbios queries in parse code
- fix map request structure...unknown byte was alignment
- add sample of named pipe over netbios query in rpcclient (comment only)
(This used to be commit 71dcdf54e6)
2003-10-20 18:35:12 +00:00
Jim McDonough
ba0c899510 Fix tower length calculations and add some const
(This used to be commit 2f84c6c9a1)
2003-10-18 01:07:37 +00:00
Jim McDonough
e6900132ca uuid itself might not be aligned (as is the case in epm map requests), so
it needs to be aligned outside the smb_io_rpc_uuid() call if a specific
rpc or struct needs it that way.
(This used to be commit e9fc15d58c)
2003-10-17 19:47:06 +00:00
Jim McDonough
d807bc12fb Add epmapper pipe
(This used to be commit 041c17bd66)
2003-10-17 15:07:23 +00:00
Jim McDonough
a6ff6254da Add (un)marshalling code for endpoint mapper map operation
(This used to be commit bdd5158d9a)
2003-10-17 15:03:46 +00:00
Tim Potter
58153961e4 Merge from 3.0:
>Remove duplicate function (now in rpc_parse/parse_prs.c) and fix a RPC debug
>(I renamed the element of the structure).
>
>Andrew Bartlett
(This used to be commit 2aaafa5007)
2003-10-09 06:29:08 +00:00
Jeremy Allison
2c1030d755 Max warnings with gcc.
Jeremy.
(This used to be commit cdba166e31)
2003-10-07 17:23:59 +00:00
Jeremy Allison
764c03b9b8 Tut tut - always run with max warnings on gcc...
Jeremy.
(This used to be commit 3ebbd67dec)
2003-10-07 05:06:58 +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
Jeremy Allison
c81c09d66f Grrr. compile patches before you apply !
Jeremy.
(This used to be commit dfbde4be71)
2003-10-03 20:13:11 +00:00
Gerald Carter
8ae168b46d abstract UUID parsing code to an individual function; patch from Anthony
(This used to be commit 6cbdbdf9e1)
2003-10-03 15:08:16 +00:00
Gerald Carter
faca10b35d abstract UUID parsing code to an individual function; patch from Anthony
(This used to be commit 9365c619d6)
2003-10-03 15:07:15 +00:00
Andrew Bartlett
ad12b87aeb Remove duplicate function (now in rpc_parse/parse_prs.c) and fix a RPC debug
(I renamed the element of the structure).

Andrew Bartlett
(This used to be commit 641652cad9)
2003-10-01 23:04:34 +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
Jeremy Allison
8139c5fcfa Ensure that dup_sec_desc copies the 'type' field correctly. This caused
me to expose a type arguement to make_sec_desc(). We weren't copying
the SE_DESC_DACL_AUTO_INHERITED flag which could cause errors on
auto inherited checks.
Jeremy.
(This used to be commit 546b2271c0)
2003-09-19 21:57:46 +00:00
Jeremy Allison
0551426657 Ensure that dup_sec_desc copies the 'type' field correctly. This caused
me to expose a type arguement to make_sec_desc(). We weren't copying
the SE_DESC_DACL_AUTO_INHERITED flag which could cause errors on
auto inherited checks.
Jeremy.
(This used to be commit 28b315a750)
2003-09-19 21:57:43 +00:00
Jeremy Allison
30fd359914 The "unknown_5" 32 bit field in the user structs is actually 2 16-bit
fields, bad_password_count and logon_count. Ensure this is stored/fetched
in the various SAMs. As it replaces the unknown_5 field this fits
exactly into the tdb SAM without any binary problems. It also is added
to the LDAP SAM as two extra attributes. It breaks compatibility with
the experimental SAMs xml and mysql. The maintainers of these SAMs must
fix them so upgrades like this can be done transparently. I will insist
on the "experimental" status until this is solved.
Jeremy.
(This used to be commit 71ecd10181)
2003-09-18 23:54:12 +00:00
Jeremy Allison
3a48e4b287 The "unknown_5" 32 bit field in the user structs is actually 2 16-bit
fields, bad_password_count and logon_count. Ensure this is stored/fetched
in the various SAMs. As it replaces the unknown_5 field this fits
exactly into the tdb SAM without any binary problems. It also is added
to the LDAP SAM as two extra attributes. It breaks compatibility with
the experimental SAMs xml and mysql. The maintainers of these SAMs must
fix them so upgrades like this can be done transparently. I will insist
on the "experimental" status until this is solved.
Jeremy.
(This used to be commit cd7bd8c2da)
2003-09-18 23:53:48 +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
Tim Potter
b42500299c Fix for bug #334. We don't unmarshall the trusted domain or secrets
info delta correctly and thus crash when doing a net rpc samdump.

The easiest thing at the moment it to comment out these functions as
they seriously don't correspond with reality (netmon/ethereal) and the
data in the containers aren't used anyway.
(This used to be commit 695aa39c5d)
2003-09-08 02:13:38 +00:00
Gerald Carter
65409a49fe Fix bug #252. Implement missing SAMR_REMOVE_USER_FOREIGN_DOMAIN
call.
(This used to be commit dd2cf4897e)
2003-08-20 16:07:19 +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
Herb Lewis
062f89bc28 get rid of some sompiler warnings on IRIX
(This used to be commit a6a39c61e8)
2003-08-15 01:42:30 +00:00
Andrew Bartlett
225048e2e6 Fix comment
(This used to be commit 024d32f793)
2003-08-12 05:01:24 +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
Jim McDonough
f210ee9b99 Fix copyright statements for various pieces of Anthony Liguori's work.
(This used to be commit 15d2bc4785)
2003-08-01 14:47:39 +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
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
Tim Potter
7d833de662 More printf portability fixes. Got caught out by some gcc'isms last
time.  )-:
(This used to be commit 59dae1da66)
2003-07-25 04:24:40 +00:00
Tim Potter
77373f1f8e More printf fixes - size_t is long on some architectures.
(This used to be commit ba4d334b82)
2003-07-24 23:46:27 +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
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
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
Tim Potter
9e51951e6e Don't bomb out when trying to unmarshall a zero length printerdata value.
Fixes remote printer publishing of shared printers from a Samba server.
(This used to be commit 7f363fa32d)
2003-07-14 05:13:30 +00:00
Jeremy Allison
4072006fec Get rid of DISP_USER_INFO/DISP_GROUP_INFO as they serve no useful
purpose. Replace with an array of SAM_ACCOUNT/DOMAIN_GRP entries.
ZERO struct's in smbd/uid.c stops core dumps when sid_to_XX
functions fail. Getting ready to add caching.
Jeremy.
(This used to be commit 9d0692a54f)
2003-07-09 00:23:42 +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
Andrew Bartlett
61116049ca This patch takes the work the jerry did for beta2, and generalises it:
- The 'not implmented' checks are now done by all auth modules
 - the ntdomain/trustdomain/winbind modules are more presise as to
   what domain names they can and cannot handle
 - The become_root() calls are now around the winbind pipe opening only,
   not the entire auth call
 - The unix username is kept seperate from the NT username, removing the
   need for 'clean off the domain\' in parse_net.c
 - All sid->uid translations are now validated with getpwuid() to put a very
   basic stop to logins with 'half deleted' accounts.

Andrew Bartlett
(This used to be commit 85f88191b9)
2003-07-03 14:36:42 +00:00
Gerald Carter
a31a2c159c well this was easy...
When winbindd is running on a PDC the SAM_ACCOUNT for a trusted user
has a username of DOMAIN\user.  Make sure to trim the domain part
from the username when filling in the net_sam_logon reply.
This fixes the browsing issues i was seen across domain trusts.
(This used to be commit 62e36e6ede)
2003-07-03 03:56:16 +00:00
Jeremy Allison
58fca50742 Adding jcmd's share ACL on XP patch. Thanks Jim !
Jeremy.
(This used to be commit 7ed1118ae6)
2003-07-01 21:47:13 +00:00
Jeremy Allison
9fda812d01 Finally ! Fixed the ACL ordering bug reported by jcmd. I realised we were
not sorting returned ACE's correctly w.r.t. W2K - implemented the correct
algorithm.
Jeremy.
(This used to be commit fa23a4158e)
2003-06-30 18:53:48 +00:00
Gerald Carter
fb82535d1f fix bug #178; available space in devmode should be int
(This used to be commit 944480b89a)
2003-06-23 17:47:25 +00:00
Jeremy Allison
bf50387f49 Never second guess tridge.... (always talloc an internal pointer... ).
Jeremy.
(This used to be commit 72ecdb387d)
2003-06-05 02:44:24 +00:00
Jeremy Allison
bcf59e2575 Fix for previous checkin. Only use talloc on unmarshalling or we'll
leak memory.
Jeremy.
(This used to be commit 07a76eb2e0)
2003-06-04 06:22:44 +00:00
Andrew Tridgell
894b003ce6 fixed the arbitrary 256 limit on the size of aliases in parse_samr
(This used to be commit 7f8634c35a)
2003-06-04 04:42:33 +00:00
Gerald Carter
e1e363e4e9 * set winbind cache time to 5 minutes
* quit obsessing over the sequence number so much
* share the updated sequence number between parent
  and child winbindd processes in dual mode
(This used to be commit 6fb5bdb30e)
2003-06-03 16:19:31 +00:00
Jeremy Allison
ead7ad7f80 Fix debug message merge.
Jeremy.
(This used to be commit d6f2316642)
2003-06-03 07:21:09 +00:00
Jeremy Allison
545e8d4999 Change get_nt_acl() to include security_info wanted. Only return this.
This gets us closer to W2k+ in what we return for file ACLs. Fix horribly
broken make_sec_desc() that screwed up the size when given a SD with no
owner or group (how did it get this bad... ?).
Jeremy.
(This used to be commit 183c9ed405)
2003-05-29 23:49:31 +00:00
Tim Potter
0842573b51 Merge of secchan fix from 3.0 that was eaten by CVS yesterday. I think
it was becuase I ran out of disk quota.
(This used to be commit 10cbec05a7)
2003-05-27 00:30:29 +00:00
John Terpstra
b311be4a01 Metze's patches:
here's a small patch which renames the symbol 'log' to some better names
to avoid compiler warnings about shodow global var 'log'
in proto.h

we now have a GLOBAL_SECTION_SNUM -1

so we should use it in swat too:-)
(This used to be commit a4733a0748)
2003-05-26 16:54:39 +00:00
Tim Potter
0d3097c135 This fixes net rpc vampire when talking to win2k (<sp3). win2k sends
back a different sized blob of encrypted password data then we were
expecting.  There's an extra 32 bytes of unknown stuff.
(This used to be commit 285952fd62)
2003-05-26 06:59:38 +00:00
Volker Lendecke
42954dc084 Fix an insufficient alloc when querying alias members.
Volker
(This used to be commit 9d2d570caa)
2003-05-24 14:53:15 +00:00
Volker Lendecke
169a42b249 Fix an insufficient alloc when querying alias members.
Volker
(This used to be commit 47c36290db)
2003-05-24 14:52:48 +00:00
Tim Potter
03412f056d Whitespace syncup.
(This used to be commit 7fd7af121e)
2003-04-28 05:47:07 +00:00
Andrew Bartlett
ca103a076a This function is a duplicate.
(This used to be commit fd0cd6200b)
2003-04-25 05:29:55 +00:00
Andrew Bartlett
2a3a9f0bf4 Merge the 'safe' parts of my StrnCpy patch - many of the users really wanted
a pstrcpy/fstrcpy or at most a safe_strcpy().

These have the advantage of being compiler-verifiable.

Get these out of the way, along with a rewrite of 'get_short_archi' in the
spoolss client and server.  (This pushes around const string pointers, rather
than copied strings).

Andrew Bartlett
(This used to be commit 32fb801ddc)
2003-04-23 13:27:35 +00:00
Volker Lendecke
0865120fca parse_string is only used for the authentication negotiators.
It can itself determine the length of the string it has to
transfer. Andrew B., could you take a look at the length calculation?
Is that safe?

Thanks,

Volker
(This used to be commit d5f1082753)
2003-04-22 15:55:07 +00:00
Volker Lendecke
e15dfd44c9 parse_string is only used for the authentication negotiators.
It can itself determine the length of the string it has to
transfer. Andrew B., could you take a look at the length calculation?
Is that safe?

Thanks,

Volker
(This used to be commit 0ef69b586a)
2003-04-22 15:54:36 +00:00
Volker Lendecke
cdb197135f Survive a samdump with an alias that has no description
Volker
(This used to be commit 408a94b64d)
2003-04-18 08:36:12 +00:00
Volker Lendecke
e54b9d59d6 Survive a samdump with an alias that has no description
Volker
(This used to be commit 5af417a6ba)
2003-04-18 08:35:08 +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
Tim Potter
3b865c7398 Merge of rpcecho pipe for testing large dcerpc requests and responses.
Only compiled in when --enable-developer argument passed to configure.
(This used to be commit 017da9393b)
2003-04-14 02:08:03 +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
42c18d5299 A little clarification in the rpc auth header struct.
Volker
(This used to be commit 36362c602b)
2003-04-09 09:54:26 +00:00
Volker Lendecke
d9440df579 A little clarification in the rpc auth header struct.
Volker
(This used to be commit 9fc3e4bf9f)
2003-04-09 09:52:57 +00:00
Volker Lendecke
d3b8ac6f96 Put the core schannel functions to parse_prs.c. They are also used by
schannel clients.

Volker
(This used to be commit 0f348a35d0)
2003-04-09 09:31:29 +00:00
Volker Lendecke
425797700b Put the core schannel functions to parse_prs.c. They are also used by
schannel clients.

Volker
(This used to be commit 41e92409e1)
2003-04-09 09:29:47 +00:00
Volker Lendecke
b4d0f208fb Merge the TNG netlogon schannel from HEAD.
No more XP requiresignorseal anymore!

Thanks again to Luke :-)

Volker
(This used to be commit 6b2b55901d)
2003-04-06 07:04:09 +00:00
Volker Lendecke
02bb4e1b8a This is a merge of the NETLOGON schannel server code from Samba
TNG. Actually, it exists in the main Samba cvs tree in APPLIANCE_TNG
as I found out later :-)

It adds a new parameter: server schannel = yes/auto/no defaulting to
auto.

What does this mean to the user: No requireSignOrSeal registry patch
for XP anymore.

Many thanks for this code to Luke Leighton, Elrond and anybody else I
forgot to mention.

My next thing will be to see if this applies cleanly to 3_0.

Please test and comment!

Volker
(This used to be commit e1f953241e)
2003-04-04 15:21:04 +00:00
Jelmer Vernooij
4905ba282f - Support building all auth modules as .so's
- Change 2 variable names to avoid conflicts (patch by Stephan Kulow <coolo@kde.org>)
(This used to be commit 71b05cd14a)
2003-03-25 14:46:11 +00:00
Andrew Bartlett
e88eab35bc Merge from HEAD:
signed/unsigned (mostly i counters)

a little bit of const.

Andrew Bartlett
(This used to be commit 50f0ca752e)
2003-03-17 23:04:03 +00:00
Andrew Bartlett
a27d434c4b Fix signed/unsigned issues - mostly 'i' counters.
Fix an inconpatible poitner type that caused the IA64 not to build

Andrew Bartlett
(This used to be commit 37436b0aae)
2003-03-15 07:45:51 +00:00
Jeremy Allison
71e94ca904 Merge from HEAD. 'fixed the unmarshalling of the queryaliasmem SAMR call'
Jeremy.
(This used to be commit 40def80d43)
2003-03-13 07:57:49 +00:00
Andrew Tridgell
537e4d5565 fixed the unmarshalling of the queryaliasmem SAMR call
(This used to be commit 80c4543409)
2003-03-13 04:35:15 +00:00
Andrew Bartlett
6ed6740236 Don't fault on error returns (ptr == 0) for this LSA query.
(for example, query to non-dc)

Andrew Bartlett
(This used to be commit d1dde5f684)
2003-03-09 01:13:41 +00:00
Simo Sorce
8a751c019c Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :)
(This used to be commit 4c6d461a85)
2003-03-07 18:26:24 +00:00
Gerald Carter
ccb58b303a add #define for the max device name length in a DEVICEMODE
(This used to be commit 52ef84b534)
2003-03-06 16:09:11 +00:00
Gerald Carter
26b1ed7cc0 add #define for the max device name length in a DEVICEMODE
(This used to be commit 21ec2b6ba3)
2003-03-06 16:06:12 +00:00
Gerald Carter
21be9e7776 * CR1868: only send a change notify message if we have something
that changed that the client is monitoring.

* couple of comments abnout how we need to validate driver names
  on SetPrinter() and AddPrinter()

* up the debug level on some overly verbose dev mode parsing messages
(This used to be commit 7377d671e8)
2003-03-03 16:34:19 +00:00
Gerald Carter
d95f1e4260 * CR1868: only send a change notify message if we have something
that changed that the client is monitoring.

* couple of comments abnout how we need to validate driver names
  on SetPrinter() and AddPrinter()

* up the debug level on some overly verbose dev mode parsing messages
(This used to be commit e8939165b7)
2003-03-03 16:32:03 +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
Gerald Carter
23b3b29eec Progress on CR 601
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.

Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
(This used to be commit 31272d3b6b)
2003-02-25 20:53:53 +00:00
Gerald Carter
7c7d796b6d Progress on CR 601
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.

Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
(This used to be commit 33c7b75225)
2003-02-25 20:51:23 +00:00
Gerald Carter
ab985b983f couple of merges from APP_HEAD
* performance optimization in enumprinterdataex() when keyname is empty
  * fix a few typos in comments
  * reload services after addprinter_command()

dump registry data in ascii when the key is REG_SZ or REG_MULTI_SZ
(This used to be commit fde6ef7cc6)
2003-02-21 17:08:43 +00:00
Gerald Carter
380635538b couple of merges from APP_HEAD
* performance optimization in enumprinterdataex() when keyname is empty
  * fix a few typos in comments
  * reload services after addprinter_command()

dump registry data in ascii when the key is REG_SZ or REG_MULTI_SZ
(This used to be commit 3fc90ea1d9)
2003-02-21 17:04:01 +00:00
Martin Pool
188c5195ed Check return code of string_to_sid. (Merge from HEAD)
(This used to be commit 5d09aea6f7)
2003-02-18 07:05:02 +00:00
Martin Pool
49c3018cbc init_dom_sid2s: Check return code from string_to_sid. Skip tokens
that are not valid SIDs.
(This used to be commit 5a59727278)
2003-02-18 01:30:22 +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
5b70946744 removed a duplicate copy of smb_io_sid_array()
(This used to be commit 2ef72f9500)
2003-02-11 22:53:57 +00:00
Andrew Tridgell
8ddccd47c7 added server stubs for lsa_enum_acct_with_right
(This used to be commit aa2abacaf4)
2003-02-11 21:55:48 +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 Tridgell
b4776d89ea added the LSA privileges server backend stubs. Right now they just log
what was requested.
(This used to be commit 64ac6c2bcb)
2003-02-06 05:42:19 +00:00
Andrew Bartlett
3719bfd1a0 Merge from HEAD: Send the session key to the client, allowing it to perform SMB
signing.

Andrew Bartlett
(This used to be commit 9bcdb869e5)
2003-02-02 05:22:37 +00:00
Andrew Bartlett
28e3e48431 Send the user's session key in the SAMLOGON reply, so that a member server can
use smb signing.

Andrew Bartlett
(This used to be commit 574e8a8ab7)
2003-02-02 05:10:26 +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
9ce596b2a0 Pass down max_size parameter to init_samr_q_query_dispinfo() instead
of hardcoding it to 0xffff.
(This used to be commit c3b077f763)
2003-01-29 06:13:18 +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
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
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
Andrew Bartlett
5368372382 Fix typo, and the build.
(This used to be commit d7452e73b5)
2003-01-13 21:48:52 +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
Tim Potter
baa1276eb0 Remove dead function.
(This used to be commit 6ed4d80baa)
2003-01-09 05:50:15 +00:00
Andrew Bartlett
1bb9695203 Missed from previous commit - merge from HEAD the changes to the remote
shutdown struct - it's 2 byte-boolean flags, not 16 bits.
(This used to be commit b596283352)
2003-01-04 08:44:05 +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
Jeremy Allison
bb9c3a01e7 Merge tridge's fix :
the 'padding' field in the query domain info reply is not a padding
field at all. It seems to be an optional 12 byte structure of some
kind. mkaplan found a situation where the structure was not present at
all (depending on ptr_0)
Jeremy.
(This used to be commit 3b453a5963)
2002-12-31 02:26:15 +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
Andrew Tridgell
54af5d0f25 the 'padding' field in the query domain info reply is not a padding
field at all. It seems to be an optional 12 byte structure of some
kind. mkaplan found a situation where the structure was not present at
all (depending on ptr_0)
(This used to be commit d7f18c60f7)
2002-12-23 20:22:20 +00:00
Jeremy Allison
7f23546730 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 842e08e52a)
2002-12-20 20:23:06 +00:00
Jeremy Allison
ef8bd7c4f7 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 09a218a9f6)
2002-12-20 20:21:31 +00:00
Tim Potter
48461eb42a Merge of comment about apparent spoolss_io_user_info weirdness.
(This used to be commit 872c152d35)
2002-12-20 01:27:22 +00:00
Tim Potter
24678bf421 Guy Harris points out that the level and ptr fields in a
SPOOL_USER_CTR look like they should be transposed.  We don't make use
of the user level information (what is it used for??) so I haven't
changed any code, just added a comment.
(This used to be commit bbb0b2ee40)
2002-12-13 04:41:59 +00:00
Jim McDonough
b32000da50 Support printer info 7, used for publishing
(This used to be commit 60502d9d42)
2002-12-03 19:48:27 +00:00
Jim McDonough
34c7d48033 Support printer info 7, used for publishing
(This used to be commit 3c9726454e)
2002-12-03 19:48:18 +00:00
Jeremy Allison
f023d6129b Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
(This used to be commit 19f86f1f72)
2002-11-23 02:52:38 +00:00
Jeremy Allison
de474974ea Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
(This used to be commit 5d5762d178)
2002-11-23 02:52:36 +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
9108f68df3 Being tpot's janitor again.... checking in things only checked into HEAD.
We are meant to be keeping 3.0 up to date...
Jeremy.
(This used to be commit a4c8c8f3b7)
2002-11-07 07:08:04 +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
1ae7b1395f For a BUFFER5, don't parse the buffer if the buffer length is zero.
(This used to be commit 28871bb696)
2002-11-06 23:43:21 +00:00
Tim Potter
904649b6f0 Client side functions for enumprinterkey.
(This used to be commit f56ce473b6)
2002-11-06 23:38:39 +00:00
Andrew Bartlett
6d7195d1d7 Merge passdb from HEAD -> 3.0
The work here includes:
 - metze' set/changed patch, which avoids making changes to ldap on unmodified
attributes.

 - volker's group mapping in passdb patch

 - volker's samsync stuff
 - volkers SAMR changes.

 - mezte's connection caching patch

 - my recent changes (fix magic root check, ldap ssl)

Andrew Bartlett
(This used to be commit 2044d60bbe)
2002-11-02 03:47:48 +00:00
Volker Lendecke
0c35d78632 This fixes some bugs for NT4 usrmgr.exe
Volker
(This used to be commit 32d6bcf3ac)
2002-10-19 07:50:48 +00:00
Tim Potter
788ca8b118 Merge NULL relstr fix from HEAD.
(This used to be commit 0f2ddfcd95)
2002-10-17 06:44:33 +00:00
Tim Potter
b1aba7b03b When unmarshalling a relstr, don't unmarshall the string data if the
offset is zero.  Previously we were jumping to the start of the
parse buffer (i.e offset zero) and reading string data until we hit
a terminating NULL.

Test case: in a PRINTER_INFO_0 structure, the servername field may be
NULL when doing an enumprinters with flags = PRINTER_ENUM_LOCAL.
(This used to be commit e62c6bf066)
2002-10-17 06:39:44 +00:00
Andrew Bartlett
4ac9ccfde4 Nice *big* patch from metze.
The actual design change is relitivly small however:

It all goes back to jerry's 'BOOL store', added to many of the elements in a
SAM_ACCOUNT.  This ensured that smb.conf defaults did not get 'fixed' into
ldap.  This was a great win for admins, and this patch follows in the same way.

This patch extends the concept - we don't store values back into LDAP unless
they have been changed.  So if we read a value, but don't update it, or we
read a value, find it's not there and use a default, we will not update
ldap with that value.  This reduced clutter in our LDAP DB, and makes it
easier to change defaults later on.

Metze's particular problem was that when we 'write back' an unchanged value,
we would clear any muliple values in that feild.  Now he can still have his
mulitivalued 'uid' feild, without Samba changing it for *every* other
operation.

This also applies to many other attributes, and helps to eliminate a nasty
race condition.  (Time between get and set)

This patch is big, and needs more testing, but metze has tested usrmgr, and
I've fixed some pdbedit bugs, and tested domain joins, so it isn't compleatly
flawed ;-).

The same system will be introduced into the SAM code shortly, but this fixes
bugs that people were coming across in production uses of Samba 3.0/HEAD, hence
it's inclusion here.

Andrew Bartlett
(This used to be commit 7f237bde21)
2002-10-12 03:38:07 +00:00
Gerald Carter
0040de451e missing prs_align()'s
(This used to be commit f149a5a547)
2002-10-05 13:20:06 +00:00
Gerald Carter
783df79b34 missing prs_align()'s
(This used to be commit 33f4a2fe1c)
2002-10-05 13:19:50 +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
Jeremy Allison
e72ea543ee HEAD and APP-HEAD spoolss parsing was out of sync. This MUST NOT HAPPEN !
Jeremy.
(This used to be commit cb89bcc935)
2002-09-27 18:49:51 +00:00
Jeremy Allison
1ac50efaf7 HEAD and APP-HEAD spoolss parsing was out of sync. This MUST NOT HAPPEN !
Jeremy.
(This used to be commit e42b76337b)
2002-09-27 18:49:35 +00:00
Gerald Carter
d9729d81a9 syncing up with HEAD again....
(This used to be commit e026b84815)
2002-09-26 18:37:55 +00:00
Andrew Bartlett
ad514000db Patch from "Stefan (metze) Metzmacher" <metze@metzemix.de> to do a *much*
better job of working with usrmgr.   Previously we were blanking out entires,
and all sort of mischif.

The new patch (which I've now had a chance to test/modify) also takes care not
to expand % values (ie we go \\%L\%U -> \\server\user, we don't want to store
\\server\user back) and to correctly notice 'not set' compared to 'null string'
etc.

Andrew Bartlett
(This used to be commit ab878b6cc4)
2002-09-26 10:25:34 +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
Volker Lendecke
d06d2c876e Change parsing of policy and privs delta to what Ethereal says.
Volker
(This used to be commit 8c41b5cd1b)
2002-09-22 10:30:00 +00:00
Simo Sorce
10297d8cd3 wrong alignment size calculation
spot by Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>
(This used to be commit eda0e7589f)
2002-09-13 08:53:53 +00:00
Tim Potter
2ec89150f8 Display debug data we are marshalling/unmarshalling a UNISTR in a
similar format to UNISTR2.
(This used to be commit 2d227bdce2)
2002-09-06 06:13:16 +00:00
Tim Potter
7b9439363e A netshareenum reply always contains an enum_hnd. win2k returns zero
total entries on an error whereas nt4 must send uninitialised data so
we didn't catch this one before.
(This used to be commit 88653130bc)
2002-09-05 04:25:21 +00:00
Tim Potter
45f9cbe033 Fix typo in comment.
(This used to be commit 47b8ec632e)
2002-09-04 04:30:41 +00:00
Tim Potter
386a416950 Implemented client function for deleteprinterdataex.
(This used to be commit 6d792c683d)
2002-09-03 03:21:53 +00:00
Tim Potter
f76bdfdcaa Implemented some more client side spoolss functions:
- getprinterdataex(), setprinterdataex(), enumprinterdataex()

Pass data type down to setprinterdata() fn instead of hardcoding REG_SZ.

Did some trickyness to get enumprinterdataex replies unmarshalled
properly.  The code seems to have been written to require the number
of entries returned before unpacking said entries.  Skip to the end of
the response and read the number of entries then jump back and process
the printer data.
(This used to be commit 6a1953f243)
2002-09-02 07:41:12 +00:00
Andrew Bartlett
40e9d9a54e Avoid writing unitialised bytes to the wire (and consequent valgrind warnings)
by zeroing them out if they don't have meaning.

Andrew Bartlett
(This used to be commit 52db44b5c0)
2002-08-31 06:38:27 +00:00
Gerald Carter
3cbe892276 fix up print portion of registry. Merge from APP_HEAD.
(This used to be commit ec37633548)
2002-08-30 14:48:33 +00:00
Gerald Carter
de3d0310e2 merge of phant0m key fix from APP_HEAD
(This used to be commit cb13d334a5)
2002-08-30 10:47:34 +00:00
Andrew Tridgell
1e8fa8cbb1 removed a debug line
(This used to be commit 5185f495d0)
2002-08-30 06:55:27 +00:00
Volker Lendecke
957d9ab384 There's more work to be done on samsync. Intermediate commit, now
I get all the groups at least.

Volker
(This used to be commit 23a4f6991e)
2002-08-29 10:36:05 +00:00
Gerald Carter
26e92ae81c fix 2 byte alignment/offset bug that prevented Win2k/XP clients
from receiving all the printer data in EnumPrinterDataEx().
(This used to be commit 901769acc3)
2002-08-27 22:36:26 +00:00
Jean-François Micouleau
8462dbb933 some cleanup while working on the NETLOGON pipe.
smb_io_chal() did a prs_align() but a challenge is an array of bytes.
and all code calling smb_io_chal() played with the alignment to not align !

I'm confident in my change, but I would *really* like if jeremy could look
at that.

	J.F.
(This used to be commit 23501ea971)
2002-08-23 05:12:06 +00:00
Tim Potter
266fd83651 Added some new delta types discovered by Ronnie from ethereal"
- SAM_DELTA_RENAME{USER,GROUP,ALIAS}
 - SAM_DELTA_DELETE{USER,GROUP}

Renamed some of the unknown delta types and their unmarshalling functions:

 - SAM_DELTA_TRUST_DOMS
 - SAM_DELTA_SECRET_INFO
(This used to be commit 1f29276c2f)
2002-08-22 23:39:26 +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
Jean-François Micouleau
474c148969 NETLOGON NetServerAuthenticate3 include and parser file
J.F.
(This used to be commit 2f68d6f5ec)
2002-08-21 23:08:28 +00:00
Jelmer Vernooij
b2edf254ed sync 3.0 branch with head
(This used to be commit 3928578b52)
2002-08-17 17:00:51 +00:00
Gerald Carter
cb36e520b3 * the printing code should now be back to the working state it was
before the swap from NT_PRINTER_PARAM to REGISTRY_VALUE.

* XxxPrinterDataEx() functions have not been expanded to support
  keys other than SPOOL_PRINTERDATA_KEY yet

* fixed apparent long standing bug regarding the dependentfiles
  list in the DRIVER_INFO struct
(This used to be commit d59b0eb123)
2002-08-17 13:17:41 +00:00
Gerald Carter
4ed429481c Fairly large change to printing code.
* removed support for PHANTOM_DEVMODE printer data

* s/NT_PRINTER_PARAM/REGISTRY_VALUE/g - This was a good bit
  of work.  Everything seems stable, but is not complete.

* support for printer data keys other than PrinterDriverData
  in the store and fetch routines.  Still needs to be plugged
  into the XxxPrinterDataEx() calls.

Tested against NT4.0 & 2k.  Like I said, it's not done, but doesn't
crash so it shouldn't upset anyone (unless you're trying to build
a Samba printer server off of HEAD).  More work to come.  Should
settle by Monday.


jerry
(This used to be commit 7ba7c04c0e)
2002-08-16 15:36:37 +00:00
Tim Potter
9b38f76ab1 Rename unknown_0 field in create_user2 reply in the actual struct.
(This used to be commit 482d873c26)
2002-08-15 19:40:34 +00:00
Tim Potter
702687a3a4 The unknown_0 field in a CREATE_USER2 reply is the access granted.
(This used to be commit 8bca308583)
2002-08-15 02:26:37 +00:00
Gerald Carter
b28b28ee34 added comment about a new specversion seen from client.
Device mode size is still the same though.




jerry
(This used to be commit fb822e97cb)
2002-08-14 10:21:53 +00:00