1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

4118 Commits

Author SHA1 Message Date
Tim Potter
b40175936a Fix for mounting a printer as a share. Not that there's anything
specifically wrong with this, but Samba is fooled by the client into
thinking the printer is a file share.  Files copied to the share gather
dust in the spool directory and aren't printed.

This patch has the effect of not allowing printers to be mounted as file
shares.  Not sure whether this is the correct solution or not.
{Jeremy,JF,Tridge} please check!
(This used to be commit dcf3249bb9fef2a05b376e9c8c1a0a7d602d8a2e)
2000-07-25 06:10:59 +00:00
Jeremy Allison
ac70155b25 Tidy up code to add printer. Always index in tdb by sharename. This
is beginning to come together...
Jeremy.
(This used to be commit 614bf56186b5836020a7813855a5108da0ee8433)
2000-07-25 01:50:53 +00:00
Tim Potter
47f8f8e522 Run main server loop with sys_select() instead of sys_select_intr(). The
main daemon was not catching sighup and reloading the service file.
(This used to be commit f026a897e9296a71fb5c4d5f6e1b4d3287689bde)
2000-07-24 06:20:13 +00:00
Tim Potter
affabf1909 Test for reloading smb.conf after SIGHUP. Needs to be run as root.
(This used to be commit db54e72d2f67b07d42bff16c64fbadf0d031e365)
2000-07-24 06:18:21 +00:00
Jeremy Allison
78bbcec21b Fixed open handle code in printers - 3 functions were always being done
in order - moved them into open_printer_hnd().
Added saving of comment field.
Jeremy.
(This used to be commit a0ee774fe92e5d0bc84d1d6729e8c538c67e8aba)
2000-07-22 00:48:29 +00:00
Gerald Carter
9f5e9acf77 make proto
(This used to be commit e4af400ed6580c04bcaf3a28fe8aeaa0cdbd4dcf)
2000-07-21 20:10:52 +00:00
Gerald Carter
74a9323bad * Added EnumPorts()
* Fixed an off-by-one bug noticed by JF in GetPrinterDriverDirectory()



jerry
(This used to be commit a9522f560da64045d928dabedeacdef0a6c3db51)
2000-07-21 20:03:18 +00:00
Gerald Carter
fe245e2a92 Added EnumPorts() and fixed up some problems
with the other spoolss client calls.

Also cleaned up output for 'help' command.


jerry
(This used to be commit a0e8a55c279af50c1f770c7b913262094b9b593a)
2000-07-21 20:01:20 +00:00
Gerald Carter
92708e3945 Added EnumPorts() and fixed up some problems
with the other spoolss client calls.

Also cleaned up output for 'help' command.



jerry
(This used to be commit 56ce247977c05ef37888c2572e679c44346e5568)
2000-07-21 19:59:51 +00:00
Gerald Carter
e5c5b2723f Added functions for enumerating ports on remote print server.
Tim,  You should also look at new_smb_io_printer_info_2()
and see if the change from NULL to &i regarding the secdesc is ok.




jerry
(This used to be commit a2205c6646aa677090908a4e1532ed8590adc0e0)
2000-07-21 19:58:24 +00:00
Gerald Carter
c0dcf94457 make proto
(This used to be commit 1246728eb9013948d17ad44263501d1e1bb49e8f)
2000-07-20 13:52:02 +00:00
Gerald Carter
fca31d804e readded util_list.c (just to the RPCCLIENT_OBJ). I need to split
the file up i think.  Later.



--jerry
(This used to be commit ed54a9f4d154ac56330b23255108447036cbd192)
2000-07-20 13:39:51 +00:00
Gerald Carter
58221bfcf7 Fixed unitilized secdesc pointer which was causing spoolgetprinter
rpcclient command to fail on shared printers.




jerry
(This used to be commit c8abc31187dbfe6076277896b029fa11443e43bd)
2000-07-20 13:38:48 +00:00
Jeremy Allison
9f040cc17e Modified the patch to look in the tdb *first* - thus allowing legacy text
filed to be ignored when an upload is done.
Modified to code to goto err on problems, simplifies it.
Jeremy.
(This used to be commit 9157a6ab2646c035a731d53aa3be010488ccf51a)
2000-07-19 23:47:10 +00:00
Jeremy Allison
5c162bbe5b Code from John Reilly <jreilly@hp.com> to add tdb lookups into the Win95
printer driver download if looking for the default driver files fail.
Jeremy.
(This used to be commit 1192d867c4e863471f9bc12afceb68a23ba2142e)
2000-07-19 20:11:11 +00:00
Christopher R. Hertel
3c9e410c34 Instead of handing back a string (which might be a DNS name or an IP
string), the wins_srv module now hands back a struct in_addr when it's
called.  It caches the IP address once it has been looked up.  The IP
is cleared (and must be looked up again) if the 'wins server' parameter
is reread, or if the node is marked 'dead'.  A dead node will not be
re-tried for 10 minutes (per a #define in wins_srv.c).

As it was, the code was reading the WINS server name or IP directly from
lp_wins_server.  That's okay, except that if the value was expressed as
a name, then a DNS lookup would be done every time the client wanted to
talk to the server.

I still need to work out the implications of failover regarding the
'unicast subnet' list.

Chris -)-----
(This used to be commit 73aa188320fd3bf10b5dfc057323f40aff2c13bd)
2000-07-19 05:32:43 +00:00
Christopher R. Hertel
b35f21fb3a First cut toward adding WINS server failover.
*Note: failover doesn't actually work yet!*  It's just that the code I'm
adding provides all of the pieces necessary.

I do have one big question.  Something that I'll have to ask Jeremy, I'm
thinkin'.  In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to
set up the Unicast subnet.

...so what happens if the WINS server changes?

My guess is either:
  a) nothing.
  b) I'd have to change the unicast subnet entry whenever the WINS server
     changes.

Urq.

BTW, the lp_wins_server() function no longer returns the WINS server name
or IP.  It returns the list of WINS servers entered in smb.conf.  To get
the currently 'live' WINS server, use the wins_srv() function.

Fun, eh?

Chris -)-----
(This used to be commit cc08bdc74f4cd111fdc582ee7babef47ed8a950d)
2000-07-19 01:21:30 +00:00
Christopher R. Hertel
ac56d8f848 Removed the sanity check on the WINS SERVER parameter because it simply
checked to see that only one server was listed.  As I am working on an
enhancement that allows multiple servers to be listed...this was a bit
contrary.  ;)
(This used to be commit 1b718f67675e52520f193a8c71c110246e70723f)
2000-07-18 20:15:15 +00:00
Jeremy Allison
2637bfee06 rpc_parse/parse_prs.c: Removed extraneous ()'s.
rpc_parse/parse_spoolss.c: Fixed the security descriptor marshalling in a INFO_2 struct.
							for some reason SD's should be done inline after the info2, not
							as the last buffer marshall.
rpc_server/srv_spoolss_nt.c: Removed extraneous ()'s.
Jeremy.
(This used to be commit f038a24e9f624fdb04cd52769d45783248ce8a38)
2000-07-18 19:25:32 +00:00
Gerald Carter
6f9afd1766 remove util_list from LIB_OBJS since it broke smbd build
(undefined references in link).  This is a quick fix.
I'll resolve things later.

Sorry everyone.




jerry
(This used to be commit ea64f2525d649c0952af52c2ba21a3bac57b322e)
2000-07-18 19:05:50 +00:00
Gerald Carter
2a922bd09a Added lib/util_list.[c|o] to Makefile.in
--jerry
(This used to be commit 94967b31bbc913d9b45274d9eed846f871b66b6f)
2000-07-18 05:19:29 +00:00
Gerald Carter
a1bd676617 Fixed some more client SPOOLSS functions. The following
functions work now:

  - spoolenum
  - spoolopen
  - spoolgetprinter
  - spoolgetprinterdriver

Items todo:

  - track down memory bug with spoolenumdata
  - fix spoolgetprinterdriverdir
  - fix spoolgetdata
  - fix display_job_info_ctr in spooljobs

All part of the ongoing rpcclient work.

Also included a new generic list ADT.  Cleaner and simplier
than the stuff in util_array.c i think (but then that's why I wrote it).





--jerry
(This used to be commit 381aba2c9a63faa53728f0520ac316478bc7a1c3)
2000-07-18 05:16:30 +00:00
Gerald Carter
2de59a3bea fixed a bug (my own) in create_ntc_from_cli_state()
--jerry
(This used to be commit f7bc6df3befb8d0981dbd96f353039a5913321d7)
2000-07-18 05:13:44 +00:00
Gerald Carter
695e596446 I really didn't like the way generic arrays (lists) were
implemented in util_array.c so I wrote a smaller (and simplier
package).

I would like to replace the use of util_array.c functions
in the rest of the source tree if no one objects.
This will be an interface change, but not really a difference
in the functionality provided.


--jerry
(This used to be commit 0863ce3a31e4c76c8356850ac128f6d96ea54917)
2000-07-18 05:12:49 +00:00
Gerald Carter
05fdec749d grab functions that return RPC_HND_NODE (declared
in include/util_list.h)



-- jerry
(This used to be commit ccebd70df2c096de1b183ae072c2c720e2277c6f)
2000-07-18 05:10:26 +00:00
Gerald Carter
17dba7ef05 Fixed some more client SPOOLSS functions. The following
functions work now:

  - spoolenum
  - spoolopen
  - spoolgetprinter
  - spoolgetprinterdriver

Items todo:

  - track down memory bug with spoolenumdata
  - fix spoolgetprinterdriverdir
  - fix spoolgetdata
  - fix display_job_info_ctr in spooljobs

All part of the rpcclient work.

Jeremy, this check includes emthods for associating
POLICY_HNDs and client states.  See the RpcHndList_...()
function calls (implemented in lib/util_list.c)



--jerry
(This used to be commit 84349394a988213724ca138e9692b3bc44fa0cb8)
2000-07-18 05:07:28 +00:00
Gerald Carter
2089176e34 Fixed some more SPOOLSS functions. The following
functions work now:

  - spoolenum
  - spoolopen
  - spoolgetprinter
  - spoolgetprinterdriver

Items todo:

  - track down memory bug with spoolenumdata
  - fix spoolgetprinterdriverdir
  - fix spoolgetdata
  - fix display_job_info_ctr in spooljobs


--jerry
(This used to be commit 15b35912713557119aba5d0cd59605997d6b5ee9)
2000-07-18 05:02:16 +00:00
Tim Potter
9665d3fc7b Missing var.
(This used to be commit 5c1c5622269c54dca89eb178ca25981ab7928e75)
2000-07-17 06:04:23 +00:00
Tim Potter
d39eaf1776 Reverted changes from rpcclient merge - contains memory leak!
(This used to be commit dea06ad7a554089a7394cdcb6bf5a766e8e8a6c3)
2000-07-17 05:40:48 +00:00
Tim Potter
873c0366d9 Free security descriptor after access check in update_printer_sec()
(This used to be commit bc5f9c00be5b8c2f6d258f0c95ed3b4fc0201b87)
2000-07-17 05:38:26 +00:00
Tim Potter
8453b27983 Initialise current time to time(NULL) in add_a_printer_2()
Added get and free security old descriptor in nt_printing_setsec() after
access checking was moved up to rpc level.
(This used to be commit a5b7cafc87e14ca3f28dcfc1ed6bcc6f47e79639)
2000-07-17 05:37:16 +00:00
Tim Potter
2bf08232cd make proto
(This used to be commit df0ef98d7ed41899ce97d20163ab49081347ae83)
2000-07-17 03:13:06 +00:00
Tim Potter
de71b956da make proto
(This used to be commit 4443a8b6e698a6572152e575c41dfb760b9888a9)
2000-07-17 02:43:12 +00:00
Tim Potter
3733229faf Allow job owner to delete own print job.
(This used to be commit 90b1857c81627e587a7395ee2bdb51b26ea46512)
2000-07-17 02:42:25 +00:00
Tim Potter
ba7b78f291 Moved access check for nt_printing_setsec() up into rpc function.
Use sid + rid instead of lp_workgroup()/Administrator for printer owner sid
as per JF's advice.

Default printer owner is either the administrator of the pdc workgroup or
Everyone depending on whether winbindd is running.  Still the subject of
some debate...

Renamed se_access_check() parameters.
(This used to be commit e92e161a813ac0793897ffe3d33b01054912d4c7)
2000-07-17 02:41:38 +00:00
Tim Potter
53c91652c6 Renamed arguments to se_access_check()
(This used to be commit 714b50b47dab46f5cdde49d7c200b353c2e0398a)
2000-07-17 02:38:43 +00:00
Tim Potter
da1f8dc23b Renamed a parameter in init_request() function.
Initialise response structure correctly.
(This used to be commit 587c8e58fdd79dce47fb59ce702596ea58c8b4a6)
2000-07-17 02:37:11 +00:00
Tim Potter
c9dc68746b Added some debugs.
Changed interface to se_access_check to take a user struct instead of each
bit as a separate parameter.
(This used to be commit ff7938310d0636b165b03a2b0a15e51494b2459f)
2000-07-17 02:36:19 +00:00
Christopher R. Hertel
7599f51db9 I committed this change to the cliffs archive a while back and have heard
no complaints.  ;)

Basically, instead of ignoring single-line C-style comments in IDL source
files this change allows token.awk to ignore both single- and multi-line
C-style comments.

Chris -)-----
(This used to be commit 34f69f09f840b8990b718e8585785e2a6ad7c314)
2000-07-15 20:57:24 +00:00
Gerald Carter
333c23c74a Lots of changes but no real progress in functionality.
more changes to remove the ncarpc_l_* stuff.

Fixed some cut and paste errors from TNG

There are very subtle bugs in this code.  I'll work on simplifying
them in round two or three.



--jerry
(This used to be commit f8509356178deb7e78836d1f5aceb96677ac738b)
2000-07-15 08:37:17 +00:00
Gerald Carter
2755ad8814 reverted a some previous additions.
Removed msrpc_local struct


--jerry
(This used to be commit b2317babb557f5bce390c7162c9936f5d46f4da3)
2000-07-15 08:33:43 +00:00
Gerald Carter
6a9db25270 a few changes to Makefile.in to clean up dependencies for rpcclient
--jerry
(This used to be commit 9206d593603af959700794d252da8d07082012ef)
2000-07-14 17:04:57 +00:00
Gerald Carter
8213b96fd9 More functions merged from TNG for rpcclient. They don't all work
currently as I have to do something about the policy handle caching
issues.



--jerry
(This used to be commit 233b074f490b3b01f3a462284aa8117536df0082)
2000-07-14 17:04:04 +00:00
Gerald Carter
5af82b6d09 cleaned up access to prs_struct variables. Replaced all calls
prs_free_data() => prs_mem_free
	prs_realloc_data => prs_grow


--jerry
(This used to be commit 3d00e969df1800dadbb91fd8c410e9ce87188551)
2000-07-14 17:01:49 +00:00
Gerald Carter
c27ec4bfa0 removed references to loopback RPC connections.
added a few more kfunctions from TNG for rpcclient



--jerry
(This used to be commit 549d1d262115aeb2cd4d3f0122a5771be17752bb)
2000-07-14 16:59:41 +00:00
Gerald Carter
2c46a26a8b removed prs_data(), prs_free_data(), and prs_realloc_data()
as these were unneeded and replaced by the real functions
already in HEAD.

Added a few more functions to parse_spoolss.c to help with the
rpcclient merge from TNG.
(This used to be commit 3bc9af4c1dbdb664970541f6091982ffccc87b31)
2000-07-14 16:58:03 +00:00
Gerald Carter
02fd5b08b5 Fixed a bug in cmd_interp.c where if user%pass was entered on
the command line, the password would still be cached in memory
in plain text for the lifetime of the rpcclient command line session.

removed loopback connection functions from msrpc-client.c since
we don't support that in the server code now anyways.  simplify,
simplify, ...


--jerry
(This used to be commit 8599e1bc394b1caee2483ec72d439a34d3f30629)
2000-07-14 16:54:07 +00:00
Gerald Carter
7a88bb6baa make proto
and a few changes to ntdomain for rpcclient printing functions


--jerry
(This used to be commit eb3f545f54eabb8b2b9a735808ebf49808ea85eb)
2000-07-14 16:31:06 +00:00
Gerald Carter
fb7a24d8b4 adding more spoolss command into rpcclient. They don't all work
currently.  More to come later.


--jerry
(This used to be commit 0faf21662db5b24b7fd57736ea53772e3baca5df)
2000-07-14 16:29:22 +00:00
Tim Potter
f3494484cf Don't return winbind groups or users when responding to samr_enum_dom_users
and samr_enum_dom_aliases commands.  Unfortunately the algorithm for
determining winbind groups from normal groups is simply to check for the
presence of the lp_winbind_separator() character.  )-:
(This used to be commit 363a9c45bf0a7d3266ccdf4eeb0b9f5e3d38389f)
2000-07-13 04:33:25 +00:00