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

490 Commits

Author SHA1 Message Date
Jeremy Allison
3874261774 Added stub function for NET_SHARE_ADD. Once this is implemented to call a hook
function (same for NET_SHARE_DELETE and NET_SHARE_SET) we will be able to manage
the shares section in smb.conf via NT server manager........
This should enhance the friendliness of Samba in NT-only shops by an order of
magnitude.
Jeremy.
(This used to be commit a2cd5f2ba1)
2001-04-06 17:41:47 +00:00
Jeremy Allison
852242a1b5 I know we're supposed to be feature frozen, but I couldn't resist this... :-).
I worked out and added the per-share get/set RPCs for security descriptors.
Currently this code returns Everyone, full access on get and permission denied
on set, but backending this with a tdb and checking it on tconX (to give full NT
semantics for security on shares) is now an excersise for the reader... :-).
Jeremy.
(This used to be commit 3bfd155ba7)
2001-04-04 23:42:17 +00:00
Jeremy Allison
9f793948bd include/ntdomain.h:
rpc_server/srv_lsa_hnd.c: Remove back pointer from policy handle list as the pipe
						that opened the handle may have been closed. We were dereferencing
						into something that had been closed.
rpc_parse/parse_spoolss.c: Sync up with Gerald's changes in 2.2.
lib/replace.c: Don't do proto on setlinebuf as it differs between systems.
Jeremy.
(This used to be commit 887ef3e12d)
2001-04-02 22:27:40 +00:00
Jeremy Allison
92368833fa configure configure.in include/config.h.in lib/replace.c: Added test and replacement
for setlinebuf which apparantly doesn't exist on HPUX 11.
include/byteorder.h:
rpc_parse/parse_prs.c:
Ding Dong the witch is dead ! :-). Ok, I'm happy 'cos I've finally deleted
all the *HORRIBLE* DBG_RW_XXX and RW_XXX macros from include/byteorder.h.
They were macros that included macros that had conditional macros included.
No one understood them (they were the cause of most of the bigendian issue
bugs). Finally, I went into parse_prs.c and inlined all of that stuff with
regular function calls. They're understandable, they're easy to edit and
they don't include macros !
JF - please look at the one comment I added (JF PLEASE CHECK). I have
tested this partly with IRIX (a bigendian system) running with AS/U on
a Solaris box in SGI's lab, and I've also confirmed these new changes
work with W2K (vmware) but there may be the odd bug lurking. Herb, if
you could re-checkout and test again with this code that would help.

Extra.  Fixed bug spotted by the sharp eyes of JF - big endian unicode
packet would cause a early truncate of string parsing as we were checking for a char *
0, not a uint16 * 0.

Jeremy.
(This used to be commit 13765eca71)
2001-03-31 19:06:45 +00:00
Gerald Carter
738a83a14f rename of 16 new_smb_io functions to smb_io_* for consistency sake
(merge from 2.2)
(This used to be commit ea963a648b)
2001-03-28 16:08:00 +00:00
Gerald Carter
25d975e550 merge from 2.2.
(This used to be commit 817258f117)
2001-03-27 18:19:01 +00:00
Gerald Carter
344fb49fbf reverted the rename of new_spoolss_io_r_enumprinterdrivers()
(This used to be commit fd6bfe03f4)
2001-03-19 18:14:09 +00:00
Jeremy Allison
65d35749b7 Added Michael Sweet's CUPS patch to call directly into the CUPS backend.
Parameterises the printing functions so other backends can be plugged
directly in (this is a good thing :-).
Jeremy.
(This used to be commit c0345bbaed)
2001-03-16 05:55:30 +00:00
Gerald Carter
c09fe5e157 whoops...forgot one
(This used to be commit f37ba49c28)
2001-03-15 22:08:26 +00:00
Gerald Carter
a9dda48d65 renamed one of the enumprinterdrivers parsing functions
for consistency sake.
(This used to be commit cbce0c9350)
2001-03-15 07:11:18 +00:00
Jeremy Allison
13a584b05a rpc_parse/parse_samr.c: Removed unneeded deubg.
rpc_server/srv_netlog_nt.c: Ensure we marshall a bad password return correctly
to a w2k client.
Jeremy.
(This used to be commit 500c7bc0fe)
2001-03-13 20:13:20 +00:00
Jeremy Allison
63107eceb9 We were mismarshalling a netlogon reply for bad password to W2K.
Jeremy.
(This used to be commit 017a6a9868)
2001-03-13 19:15:48 +00:00
Jeremy Allison
ea35aae3bf We copy the RPC header directly from the incoming client - remember to
set little-endian flag on marshalling. AS/U now correctly tries to join
our domain !
Jeremy.
(This used to be commit 0185f8159d)
2001-03-12 21:09:55 +00:00
Jeremy Allison
d47ee4bffc No longer used...
Jeremy.
(This used to be commit d23b9be1ba)
2001-03-11 00:38:02 +00:00
Jeremy Allison
da3053048c Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158)
2001-03-11 00:32:10 +00:00
Jeremy Allison
00ab9021b0 Serious (and I *mean* serious) attempt to fix little/bigendian RPC issues.
We were reading the endainness in the RPC header and then never propagating
it to the internal parse_structs used to parse the data.
Also removed the "align" argument to prs_init as it was *always* set to
4, and if needed can be set differently on a case by case basis.
Now ready for AS/U testing when Herb gets it set up :-).
Jeremy.
(This used to be commit 0cd37c831d)
2001-03-09 23:48:58 +00:00
Jeremy Allison
393bede7db Sync up handle creation with 2.2 branch. We can now join AS/U domains and
authenticate against them. Big/little endian issues fixed.
Jeremy.
(This used to be commit 0e6a34510e)
2001-03-07 23:59:13 +00:00
Jeremy Allison
e9f555e4bd Merged JF's fixes into HEAD. These are for string parsing and SAMR fixes.
Jeremy.
(This used to be commit c3a1904564)
2001-03-02 19:29:02 +00:00
Jeremy Allison
7d85361533 rpc_parse/parse_spoolss.c: Fixed memory leak introduced by restructuring.
rpc_server/srv_spoolss_nt.c: Fixed problem with printer snum being read uninitialised.
Jeremy.
(This used to be commit 1552db715d)
2001-03-01 03:04:13 +00:00
Jeremy Allison
c014d3b709 Remove unused code.
Jeremy.
(This used to be commit 3495d5cc3b)
2001-03-01 00:40:25 +00:00
Jeremy Allison
0f2799aaf1 Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree.
Jeremy.
(This used to be commit 14d5997dc8)
2001-02-28 00:51:02 +00:00
Jeremy Allison
5265ce7837 Added total memory allocated counter to talloc, so we can tell if a talloc
pool is getting bloated. Also added a talloc_zero function to return zeroed memory.
Added debug in rpc_server/srv_pipe_hnd.c so we know when a talloc pool is being
freed. Syncup with srv_pipe_hnd.c from 2.2 so we are freeing memory at the same time.
Jeremy.
(This used to be commit d3a56c6042)
2001-02-27 19:22:02 +00:00
Jeremy Allison
538fbb7ad0 As prs_alloc_mem now zeros memory, remove superfluous memsets after it.
Jeremy.
(This used to be commit 94fdffb355)
2001-02-27 02:18:37 +00:00
Jeremy Allison
ef2de912f2 Separated dfs pipe into implementation and interface modules.
rpc_parse/parse_dfs.c: Had to add buffer overrun checking ! HOW DID THIS GET IN HERE !
rpc_parse/parse_prs.c: Ensure prs_alloc_mem does a memset of zero before returning.
Jeremy.
(This used to be commit c9a6a17025)
2001-02-27 02:09:50 +00:00
Jeremy Allison
de187df10c Split srvsvc pipe into interface and implementation modules.
Jeremy.
(This used to be commit e14c88ddf4)
2001-02-26 22:05:41 +00:00
Jeremy Allison
683ccef0bd Started conversion of lsa server code to canonical format (as srv_reg and
srv_samr have been).
Jeremy.
(This used to be commit f434cda977)
2001-02-26 08:10:51 +00:00
Jeremy Allison
3699948e97 This patch (donated by Marc Jacobsen of HP) should make Sun and HP very happy :-).
Probably Veritas too... :-).
It allows Samba as a domain member to authenticate against an AS/U server such
as the older HP PDC product or PD Netlink. It does this by trying a netlogon
with info level 3 and then falling back to info level 2 if the PDC returns
invalid info level.
Jeremy.
(This used to be commit bda1d6d4a4)
2001-02-24 00:42:41 +00:00
Andrew Tridgell
3c270604c1 but it is needed for linking ...
(This used to be commit e7108a18b2)
2001-02-21 06:03:16 +00:00
Jeremy Allison
14ac22b4b6 Fixup missing tests on code imported from tng.
Jeremy.
(This used to be commit 41d46a495b)
2001-02-13 00:32:07 +00:00
Jeremy Allison
94fc44a93c Merge of JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
(This used to be commit c0517d6f4e)
2001-02-12 16:18:02 +00:00
Tim Potter
92e347379a Fixed duplicate free_sec_acl() call in free_sec_desc() function.
From "Richard Bollinger" <rabollinger@home.com>
(This used to be commit 5b38513cef)
2001-01-31 17:16:09 +00:00
David O'Neill
9ec19336e5 Changes from SAMBA_2_2:
- fix typo in cast from talloc
(This used to be commit f24aa0b51f)
2001-01-29 21:32:45 +00:00
Jeremy Allison
cf90dbd158 Fixed "object picker can't determine if object in domain" bug seen from W2K
clients. Did this by importing Samba-TNG code that correctly handles LSA
lookups.
*MANY* thanks to Luke, Sander, Elrond and the rest of the TNG gang !
Jeremy
(This used to be commit f76dc952f7)
2001-01-25 02:35:50 +00:00
David O'Neill
22363b9d78 Changes from APPLIANCE_HEAD:
source/include/proto.h
    source/include/rpc_spoolss.h
    source/rpc_parse/parse_spoolss.c
    source/rpc_server/srv_spoolss.c
    source/rpc_server/srv_spoolss_nt.c
        - speedups in printer queue enumeration  - still room for
          improvement.  The construct_dev_mode() still creates and destroys
          a printer info_2 structure every time it is called.
        - fixed job->devmode memory leak
        - converted printer job notification routines to use tallocated
          memory rather than a fixed 2K buffer.   This reduces the memory
          requirements of a 4500 job queue enumeration from 90MB to about
          16MB.
(This used to be commit 7853b27bc1)
2001-01-17 22:55:02 +00:00
David O'Neill
27922c0430 Changes from APPLIANCE_HEAD:
source/rpc_parse/parse_lsa.c
        - off by one unistr length bug in init_lsa_trans_name()

    source/lib/util_sid.c
        - resolve more BUILTIN sid values to names.

    source/nsswitch/wb_client.c
        - fix typo in debug message
        - set errno on error so we don't get bogus value from last failure.

    source/rpc_server/srv_spoolss_nt.c
        - add debug to track number of open printer handles for ease of
          tracking handle leaks in the future.

    source/rpc_server/srv_lsa.c
        - fix off-by-one string bug.  This was preventing NT from
          displaying names for well-know SIDs in printer permissions
          dialog.
(This used to be commit 59229b9025)
2001-01-15 18:36:50 +00:00
Tim Potter
ee49ddbd8f Printer name unistr is null terminated in make_spoolss_q_open_printer_ex()
(This used to be commit a125eba0aa)
2001-01-12 19:45:50 +00:00
Tim Potter
13d99e3ea9 RPC server fixes for RPC client changes merged from TNG.
(This used to be commit 793153ebde)
2001-01-11 23:49:51 +00:00
Tim Potter
6b4dcfff3a General clean up. Merge of access_mask fixes for some unknown fields from
tng.
(This used to be commit c292f4aa31)
2001-01-11 22:55:13 +00:00
Tim Potter
e29c028a44 General clean up. Merged routines for parsing enum_trust_dom rpc call.
(This used to be commit 54b34517ce)
2001-01-11 22:54:12 +00:00
David O'Neill
3380ffae9c Changes from APPLIANCE_HEAD:
testsuite/printing/psec.c
        - Use lock directory from smb.conf parameter when peeking at the
          ntdrivers.tdb file.
    source/rpc_parse/parse_sec.c
        - fix typo in debug message
    source/script/installbin.sh
        - create private directory as part of 'make install'.
    source/nsswitch/winbindd_cache.c
    source/nsswitch/winbindd_idmap.c
    source/passdb/secrets.c
    source/smbd/connection.c
        - always convert tdb key to unix code-page when generating.
    source/printing/nt_printing.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend path to a filename that is NULL in
          add_a_printer_driver_3().
    source/rpc_server/srv_spoolss_nt.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend server name to a path/filename that is NULL in the
          fill_printer_driver_info functions.
    source/printing/printing.c
        - always convert tdb key to unix code-page when generating.
        - move access check for print_queue_purge() outside of job delete
          loop.
    source/smbd/unix_acls.c
        - fix for setting ACLs (this got missed earlier)
    source/lib/messages.c
        - trivial sync with appliance_head
(This used to be commit 376601d17d)
2001-01-11 20:41:19 +00:00
Jeremy Allison
b578b4da5d Cast prs_alloc_mem to correct type.
Jeremy.
(This used to be commit e0931cda80)
2000-12-18 07:24:48 +00:00
Jeremy Allison
452102deb4 Merged Tim's fixes from appliance-head.
Jeremy.
(This used to be commit 26f873540c)
2000-12-18 06:02:31 +00:00
Jeremy Allison
fb82ab78fe Never free anything in the rpc_parse/prs_XXX functions. Do it in the enclosing
function.
lib/util_unistr.c: Check lengths *before* reading source - prevent uninitialised
memory reads.
Jeremy.
(This used to be commit ce4f461965)
2000-12-15 23:02:01 +00:00
Jeremy Allison
99c2693c62 Added lock backouts on fail.
When chaining together long lines of bloody "if" statements, which should
logically be separated, and one of them allocates memory, remember to
*free* it *WHETHER OR NOT THE IF STATEMENTS SUCCEEDED* !!!!
Yes I do consider this a bug in the coding style of Tridge, Rusty, Tim et al. :-).
I'm just pissed 'cos this took 4 hours to track down even with an insure error report
stating me in the face and also Ben Woodward looking over the code with me :-).
Jeremy.
(This used to be commit 506b5e34c3)
2000-12-15 21:29:06 +00:00
Jean-François Micouleau
89af6fd745 lib/util_unistr.c:
rewrote unistr2_to_ascii() to correct a bug seen on SGI boxes.

rpc_parse/parse_misc.c:
rpc_parse/parse_prs.c:
        rewrote of BUFFER5 handling to NOT byteswap when it was already in
        network byte order.

rpc_parse/parse_samr.c:
        cleanup of samr_io_q_lookup_domain(), remove the over-parsing by 2
        bytes.

rpc_server/srv_lsa.c:
        UNISTR2 strings need to be NULL terminated to pleased W2K.

rpc_server/srv_spoolss_nt.c:
        use snprintf instead of safe_strcpy as we want the string
        truncated at 32 chars.


That should fix SUN and SGI box not able to act as printserver and the
problem with joining from a W2K wks.

        J.F.
(This used to be commit 69fe739303)
2000-12-15 09:31:56 +00:00
Jeremy Allison
369f5fd1d7 Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. Merged
in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open
problem.
Jeremy.
(This used to be commit 0a40bc83e1)
2000-12-15 01:02:11 +00:00
David O'Neill
1fc3e43f9b Changes from APPLIANCE_HEAD:
- add some debugs for comparing two security descriptors.
      (source/rpc_parse/parse_sec.c)
(This used to be commit 505a8a2277)
2000-12-14 19:31:24 +00:00
Tim Potter
e43671cd57 Wrong length for unistr2 in init_q_lookup_names()
Removed some more static arrays and replaced with tallocated memory
blocks.
(This used to be commit 1db0f31ae0)
2000-12-13 11:53:37 +00:00
Jeremy Allison
20ac3fc77e Merged in Tim's changes : Removed static limit of MAX_LOOKUP_SIDS in rpc server and client
lsa_lookup_names() and lsa_lookup_sids().
Jeremy.
(This used to be commit 9e9c71c8b3)
2000-12-12 02:45:11 +00:00
Tim Potter
4d56f4f310 return NULL instead of return False in char *prs_mem_get();
(This used to be commit 71e5e802b7)
2000-12-11 06:34:12 +00:00
Tim Potter
3478427f2e Port of lsa_lookup_sids() and lsa_lookup_names() rpc client functions from
TNG branch.

Re-instated lsa_lookup_sids and lsa_lookup_names functions in rpcclient.

This requires most samba binaries to link in another handful of object
files due to uncessary coupling between modules.  )-:
(This used to be commit 817819d0cc)
2000-12-08 03:34:00 +00:00
Andrew Tridgell
0e494d7ec6 no longer pass the type to make_sec_desc(), instead the type is
derived from the other arguments
(This used to be commit 9ec4b1fa48)
2000-12-04 01:58:22 +00:00
Jean-François Micouleau
0e84103a54 alignment issues.
I hate that job ...

	J.F.
(This used to be commit 97e3b29356)
2000-11-29 14:39:06 +00:00
Gerald Carter
af85ca538c o fixed logon script problems (wrong len in reply to net_sam_logon for
a few strings).  I was the one who broke it obviously.

o changed a few more defaults in the smbpasswd backend with
  respect to times.  Now the logon time becomes '0' and the
  pass_can_change_time is set ot the same as pass_last_set_time

o change Get_Pwnam() call in local_lookup_name to sys_getpwnam()
  as it did not seem necessary to try case permutations in the
  username.

  Tim,  I think this was your code, so you might want to double
  check me.


-- jerry
(This used to be commit 37a665002c)
2000-11-22 19:51:41 +00:00
Jeremy Allison
6003be4856 ADDPRINTERDRIVER info level 6 fix - this is dynamic depending
on a field in the struct - that's why it was so hard to find.
Jeremy.
(This used to be commit 0ab6eb01b0)
2000-11-22 01:26:09 +00:00
Jeremy Allison
2bd3a436fd Fix for updating of print queues changed from a local box. Essentially,
this makes sure that the change messages sent to ourselves are handled
synchronously w.r.t. other smb packets incoming.
Jeremy.
(This used to be commit 78a1307445)
2000-11-21 00:30:15 +00:00
Jeremy Allison
475fb713a9 Fix for memory leak when adding driver.
Jeremy.
(This used to be commit eeab4e0290)
2000-11-17 02:22:35 +00:00
Gerald Carter
9fede0dc0d Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)

The following functions implement the storage manipulation interface

/*The following definitions come from  passdb/pdb_smbpasswd.c  */

BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);

There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members.  Note that the struct
passdb_ops {} has gone away.  Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file.  All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.

I'll write some documentation for this later.  The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.

What works and may not:

	o domain logons from Win9x 	works
	o domain logons from WinNT 4	works
	o user and group enumeration
		as implemented by Tim	works
	o file and print access		works
	o changing password from
		Win9x & NT		ummm...i'll fix this tonight :)

If I broke anything else, just yell and I'll fix it.  I think it
should be fairly quite.





-- jerry
(This used to be commit 0b92d0838e)
2000-11-13 23:03:34 +00:00
Jeremy Allison
6cc6a4f3f3 rpc_parse/parse_spoolss.c: Updated comment for old version of W2K.
tdb/tdbutil.c: With varargs uint16 is cast to (int).
Jeremy.
(This used to be commit 98764c5df9)
2000-11-10 21:24:09 +00:00
Jeremy Allison
c1900772ce printing/nt_printing.c: use getpwuid not smbgetpwuid. Canonicalize printernames.
printing/printing.c: Insure fix for malloc of zero.
rpc_parse/parse_misc.c: Enusre UNISTR's are zero filled.
rpc_parse/parse_spoolss.c: Correct INFO_6 - differs between pre-releases of W2K and shipping build.
rpc_server/srv_spoolss_nt.c: Canonicalize printernames.
Jeremy.
(This used to be commit b17e23a8ff)
2000-11-10 19:36:34 +00:00
Tim Potter
8a190a9e46 Merge of printer security descriptor, info level and printerdata
comparison changes from appliance branch.
(This used to be commit ae087bdf31)
2000-11-07 02:54:50 +00:00
Jeremy Allison
d4959bdbdc Only use prs_uint8s on marshalling as we know we're little endian. On
unmarshalling use prs_uint16s. Yes this sucks :-).
Jeremy.
(This used to be commit 3d68257850)
2000-10-30 21:47:20 +00:00
Jeremy Allison
dc0b638489 Fixed double btyte-swap problems with bigendian architectures.
Jeremy.
(This used to be commit c96a77957b)
2000-10-30 19:45:22 +00:00
Tim Potter
60661e1d28 Fixes for io_q_setprinter rpc parsing.
(This used to be commit 1b86b9139e)
2000-10-18 00:55:02 +00:00
Jean-François Micouleau
85643cd72c last part of W2K support.
the trust domain list reply on netlogon pipe was wrong, interim hack until
we have full trust relationships.

changed some unistr2 to parse the ending NULL char.

added a prs_align_needed() function. much like a prs_align but with a
condition. needed for the unistr2 parsing.

	J.F.
(This used to be commit d8bf81553c)
2000-10-13 14:02:01 +00:00
Herb Lewis
8719c27726 changes to sync with 2.2. tree
.cvsignore              remove config.h - not in this directory
include/profile.h       profile changes
lib/messages.c          added message to return debug level
libsmb/clierror.c       cast to get rid of compiler warning
libsmb/smbencrypt.c     cast to get rid of compiler warning
profile/profile.c       add flush profile stats changes for profile struct
rpc_parse/parse_samr.c  fix for compiler warning
rpc_server/srv_samr.c   cast to get rid of compiler warning
smbd/ipc.c              profile stats
message.c               profile stats
smbd/negprot.c          profile stats
smbd/nttrans.c          profile stats
smbd/trans2.c           profile stats
utils/smbcontrol.c      new flush stats command
(This used to be commit bbb24daa25)
2000-10-11 05:31:39 +00:00
Jean-François Micouleau
11d999f2bc a netlogon enum trust query doesn't have a function_code at end.
a sam_user_info_24 doesn't have a uint16 at end
samr_create_user also creates the unix account now
samr_set_userinfo changes the password.

        J.F.
(This used to be commit 94f4024481)
2000-10-10 13:08:55 +00:00
Jean-François Micouleau
75c346e70c added samr_set_user_info and info_2.
cleanup of create_user
cleanup of rid/sid mix in samr. now we only have sid.

some prs_align() missing in parse_samr.c

a small debug change in srv_pipe.c

You still can't change a user's password in this commit.
Will be availble in the next one.

	J.F.
(This used to be commit b655bc281f)
2000-10-07 15:56:36 +00:00
Jean-François Micouleau
a4cd5013f5 fixing prs_unistr2(). For the special case of an empty (but existing)
string.

	J.F.
(This used to be commit 83bfe94771)
2000-10-05 12:41:31 +00:00
Jeremy Allison
23f78fd7b9 Adding Herb's compile warning fixes to HEAD.
Jeremy.
(This used to be commit d131ad1ce3)
2000-10-04 01:03:23 +00:00
Jeremy Allison
c5ca95aeb1 Fixes from Herb - compiler warnings.
Jeremy.
(This used to be commit d9d3668fa3)
2000-10-03 18:29:12 +00:00
Jean-François Micouleau
b06d83c909 fixed samr_create_user(). we now correctly parse the query and the reply.
And we create the disabled account. That means we can create user and
trust accounts remotely !

ifdef out a return in passdb/smbpass.c. I think I didn't break any
security. Jeremy could you check if I didn't make any mistakes ???

	J.F.
(This used to be commit 416be1b64f)
2000-09-28 17:35:03 +00:00
Jean-François Micouleau
8c93ddf3e0 samr unknown 0x32 is in fact samr create user.
so renamed and tidy up of the server function.

	J.F.
(This used to be commit 0f707ac1fb)
2000-09-27 13:02:57 +00:00
Jean-François Micouleau
233bc00020 printer notify code.
It only sends notifies to one client. The broadcasting notify code will
code soon.

	J.F.
(This used to be commit 4c63c91858)
2000-09-25 21:05:18 +00:00
Jeremy Allison
0fc271ea4a Some code moved back from TNG - updates to LSA stuff. Not yet used but
will be needed soon.
Jeremy.
(This used to be commit f0aa8f9314)
2000-09-20 22:07:56 +00:00
Jeremy Allison
13904f585c param/loadparm.c: Fix based on Damian's code to stop printer scripts getting overwritten.
rpc_parse/parse_spoolss.c: Tidyup to call function for relstring arrays.
Win2000 now does "Add Printer" successfully !!!!!

Jeremy.
(This used to be commit d666b958bc)
2000-09-19 22:32:56 +00:00
Jean-François Micouleau
a2c82976b8 in a printer_info_6, driver version is 64 bits long and there is a 32 bit
padding before.

	J.F.
(This used to be commit cd41d7a354)
2000-09-16 10:07:46 +00:00
Jeremy Allison
244c296199 Fixes from JF as I didn't understand the string array sizing code correctly.
Jeremy.
(This used to be commit 63a7d0fc35)
2000-09-15 21:20:49 +00:00
Jeremy Allison
ccddd111c6 Move towards getting W2k p&p to upload NT4.x drivers. Still doesn't work -
not sure why (JF - a glance at this would be appreciated). Removed code
that JF objected to with enumprinterdata. Added translations to/from
level 6 - but Win2k still not happy... hmmm...
Jeremy.
(This used to be commit e5d98ba9e9)
2000-09-15 00:15:10 +00:00
Jeremy Allison
e0f9de0c49 Implemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).
Jeremy.
(This used to be commit fb48efaf83)
2000-09-09 00:19:35 +00:00
Jeremy Allison
a1f66a820d Fix for the SID history problem when using a Win2k domain controller
with security=domain. Also fixed to dynamically allocate the SIDs and GIDs.
Jeremy.
(This used to be commit 2b1f66eb82)
2000-09-06 01:06:39 +00:00
Jeremy Allison
d644d4438c Implemented GETFORM tested and working using Gerald's Win32 test progs....
Jeremy.
(This used to be commit 55ed0a9b0c)
2000-09-05 20:56:09 +00:00
Jeremy Allison
fa810d4c80 Implemented DELETEFORM tested using Gerald's Win32 test code :-).
Jeremy.
(This used to be commit 596c21a2af)
2000-08-31 19:04:51 +00:00
Jeremy Allison
b26e3d2525 Fixed overrun write error when using debuglevel > 50.
Jeremy.
(This used to be commit 3d9b163655)
2000-08-30 22:54:54 +00:00
Jeremy Allison
d407579b94 Implemented AbortPrinter() from Gerald's Win32 test code. Just purge all
possible printjobs from that printer (I think this is correct).
Added error code returns for print_queue_XXX() functions.
Jeremy.
(This used to be commit 6d081a9017)
2000-08-30 00:45:59 +00:00
Andrew Tridgell
9e1f9a5719 yipee!
The spoolss AddJob function has an [in,out] buffer not an [in] buffer
(despite the comment in the code to the contrary). Also, we must fail
this function - not just blindly reply "no problem" as AddJob should
always fail on non-local printers.

This fixes a bug where the "print test page" failed about half the
time. I suspect it will also fix a bunch of other intermittent spoolss
bugs where the client (incorrectly) tries to use the AddJob printing
interface.
(This used to be commit 14e534a890)
2000-08-28 04:42:31 +00:00
Gerald Carter
82149af29f added comment for my own memory purposes
jerry
(This used to be commit b64ddbd1aa)
2000-08-17 20:03:53 +00:00
Gerald Carter
a9b2a40682 hack for unmarshalling unistr's on machines with BIG_ENDIAN arch
I think we have a lot more of these bugs lurking (i'm fairly
confident of it).




jerry
(This used to be commit 3b14487c7e)
2000-08-16 03:44:04 +00:00
Gerald Carter
4620c70549 - fixed memcpy bug in copy_unistr2()
- init_unistr2_from_unistr() does not NULL terminate
  the buffer



--jerry
(This used to be commit 65ee5f9b6e)
2000-08-16 03:41:02 +00:00
Jeremy Allison
0631c6e3a7 Tidied up extra ()'s.
Jeremy
(This used to be commit f94f37dcab)
2000-08-15 02:33:27 +00:00
Gerald Carter
7ed3fcad2a fixed a few bugs in new_smb_io_relarraystr().
Marshalling code path now uses spoolss_smb_io_unistr()
also caught a NULL pointer case.

i'll update TNG later.
(This used to be commit bd4c83eb40)
2000-08-14 21:18:02 +00:00
Gerald Carter
e2bb0779af fix for new_smb_io_relarraystr() and new_smb_io_relstr()
to use spool_smb_io_unistr() as this does not call prs_align()
befrore parsing the UNISTR.

Parsing a void* buffer from an RPC should not be aligned
on 4 byte boundaries.  Don't think this change affects
any marshalling code, only unmarshalling...




jerry
(This used to be commit bc154e8522)
2000-08-14 03:17:17 +00:00
Gerald Carter
13913e2c97 removed the prs_align in spoolss_smb_io_unistr() (JF, please check)
as it was throwing things off when parsing buffers passed in SPOOLSS
RPCs

fixed the unmarshalling of UNISTR arrays to be double NULL terminated




jerry
(This used to be commit 236f19659c)
2000-08-12 14:51:36 +00:00
Gerald Carter
2ca88a0f2d fixes to prs_unistr UNMARSHALLING only. Problem was due to talloc's
of 0 bytes.



jerry
(This used to be commit 3fcc59ba92)
2000-08-12 14:31:29 +00:00
Jeremy Allison
f6795780eb Fixed the problem with UNISTR marshalling in a buffer5 struct.
The smb_io_unistr() code called a prs_align, this was not being
counted in the size or taken account of in the offset calculation.
Fixed size_ calculation to always return a size a multiple of 4
and also set the offset correctly. This fixes the problem I saw
and will hopefully fix the problem HP reported. JF please check
this change.
Jeremy.
(This used to be commit ceba9f3dcd)
2000-08-11 23:13:09 +00:00
Gerald Carter
7ce5aacf7e working on the unmarshalling of dependentfiles to a DRIVER_INFO_3
struct.  Not wuite there.





jerry
(This used to be commit 1a145977f0)
2000-08-10 14:03:13 +00:00
Gerald Carter
2f9a0f83fe deal with allocation size of 0 in prs_unistr when UNMARSHALLING
jerry
(This used to be commit 26a73a70e2)
2000-08-10 14:00:40 +00:00
Gerald Carter
a08d444896 More work on AddPrinterDriver() and AddPrinterEx() client RPC's
Also fixed init_unistr() to deal with a NULL source character string.



-jerry
(This used to be commit 8ecd5dd52a)
2000-08-09 20:14:29 +00:00
Gerald Carter
3a123d2572 cleanup in init_unistr2_from_unistr()
--jerry
(This used to be commit 1e00ac19cd)
2000-08-08 06:59:35 +00:00
Gerald Carter
f296a8d087 All changes related to rpcclient...
- cleaned up some code
- Fixed a few memory leaks of my own making
- Add AddPrinterDriver(); I'm missing some of the semantics
  here as the call is done correctly, but I'm not getting all
  the information right in the DRIVER_INFO_3 struct I think.
  Will work on it tomorrow some more...



--jerry
(This used to be commit 3bf9a29f34)
2000-08-08 06:57:48 +00:00