1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

387 Commits

Author SHA1 Message Date
Richard Sharpe
9a38e37811 Make sure that those cleanups actually went in. 0001-01-01 00:00:00 +00:00
Gerald Carter
142c5029c7 [merge] make sure to updatre print queue cache during timeout_processing() to send notify events; CR 1491 0001-01-01 00:00:00 +00:00
Andrew Bartlett
92a777d0ea 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
0001-01-01 00:00:00 +00:00
Simo Sorce
c5892b656d 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
0001-01-01 00:00:00 +00:00
Simo Sorce
8877ff2482 make querygroup in rpcclient working, same fix as per 2.2 tree 0001-01-01 00:00:00 +00:00
Gerald Carter
481a8a8aa9 fix cli_ds_getprimarydominfo(); merge from SAMBA_3_0 0001-01-01 00:00:00 +00:00
Tim Potter
e643003dd4 Merge from appliance:
>Fix memory leak in cli_ds_getprimarydominfo()
0001-01-01 00:00:00 +00:00
Tim Potter
fdce4be719 A cool idea from mbp: create a big shared library of all Samba objects
which we can use to link against Samba unit test programs.  Now we can
compile and link unit tests without having to create 4MB executables
for each program

It's called libbigballofmud.so both to discourage casual usage and
also to reflect what the dependencies within Samba have become.
0001-01-01 00:00:00 +00:00
Jeremy Allison
82b8f749a3 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.
0001-01-01 00:00:00 +00:00
Jim McDonough
1fd6d34526 What is wrong with you, Jim? Check in the final version, not an interim one... 0001-01-01 00:00:00 +00:00
Jim McDonough
d423e6424b Allow multiple fragment RPC's to be sent. 0001-01-01 00:00:00 +00:00
Jeremy Allison
10024ed06e 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.
0001-01-01 00:00:00 +00:00
Tim Potter
f56ce473b6 Client side functions for enumprinterkey. 0001-01-01 00:00:00 +00:00
Tim Potter
62ab0f8cbe Display pipe name in rpc bind failure debug. 0001-01-01 00:00:00 +00:00
Tim Potter
bd64de3716 Tidyup of some DCERPC pipe connection debugs. The new LSA_DS stuff
generates some errors we haven't seen before which are inappropriately
logged at level 0.
0001-01-01 00:00:00 +00:00
Tim Potter
4663d79d3e Fix a silly memset typo.
Change a int* to a uint32* in the cli_spoolss_enum_ports() function.
0001-01-01 00:00:00 +00:00
Tim Potter
bf2d9dd5ba Zero tallocated memory in decode_printer_info, decode_driver_info,
decode_port_info and decode_printerdriver functions.
0001-01-01 00:00:00 +00:00
Tim Potter
b5111f47b5 Do a SMB_ASSERT() in cli_nt_session_open() when the pipe index is out
of range instead of silently failing.
0001-01-01 00:00:00 +00:00
Gerald Carter
764b58e2c0 merge from APP_HEAD
* s/driverlocation/comment
* detect native mode domain and enumerate local groups

Also

* Added sendfile stats from SAMBA_2_2
0001-01-01 00:00:00 +00:00
Gerald Carter
dd948a302a merge native_mode flag in winbindd_domain struct from app-head 0001-01-01 00:00:00 +00:00
Gerald Carter
f70caa25e4 merge of working dsrolegetprimdominfo() client code from APP_HEAD 0001-01-01 00:00:00 +00:00
Gerald Carter
38c9e42998 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
0001-01-01 00:00:00 +00:00
Gerald Carter
b5227f0a64 change notify merge from APP_HEAD 0001-01-01 00:00:00 +00:00
Tim Potter
d30da51956 Return WERR_UNKNOWN_LEVEL for unknown info levels. 0001-01-01 00:00:00 +00:00
Tim Potter
1338f623c2 Return WERR_UNKNOWN_LEVEL for getprinterdriver level 6 as we don't
know how to decode a printer driver into a DRIVER_INFO_6 structure.
0001-01-01 00:00:00 +00:00
Tim Potter
0379a32d82 cli_spoolss_enumprinterdrivers:
Return WERR_UNKNOWN_LEVEL if we can't decode the returned buffer.
0001-01-01 00:00:00 +00:00
Tim Potter
f0c6303beb Conver cli_spoolss routines to use REGISTRY_VALUE and REGVAL_CTR code. Nice one jerry!
(Hey I thought I checked this in already?)
0001-01-01 00:00:00 +00:00
Tim Potter
f7641c8fd1 Change JOB_INFO_CTR to return a pointer to an array rather than array of pointers.
Implemented client function for deleteprinterdataex.
0001-01-01 00:00:00 +00:00
Tim Potter
1f629aa54e Return data from enumprinterdataex by deep copying on passed in tdb context. 0001-01-01 00:00:00 +00:00
Tim Potter
62a6078253 Implemented some more client side spoolss functions:
- getprinterdataex(), setprinterdataex(), enumprinterdataex()

Pass data type down to setprinterdata() fn instead of hardcoding REG_SZ
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
4d38caca40 added cli_net_auth_3 client code.
changed cli_nt_setup_creds() to call cli_net_auth_2 or cli_net_auth_3 based on a switch.
pass also the negociation flags all the way.
all the places calling cli_nt_setup_creds() are still using cli_net_aut2(), it's just for future use and for rpcclient.

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

	J.F.
0001-01-01 00:00:00 +00:00
Tim Potter
e09007dd5d Don't try to convert enumprinters name to a unc name. 0001-01-01 00:00:00 +00:00
Tim Potter
d6b10fe969 Pass the object name down to the enum_printers rpc. By default this is the
server name and everything works as advertised.  See the MSDN doco for details.
0001-01-01 00:00:00 +00:00
Tim Potter
b8dba26978 Moved calculation of secure channel type into a new function. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
e4cb106d2e added a 'net rpc samdump' command for dumping the whole sam via
samsync operations (as a BDC)
0001-01-01 00:00:00 +00:00
Shirish Kalele
b0bd42c946 The "max data count" value in SMB transacts indicates how much the other end can
send us. As it stands, we incorrectly set it to the number of bytes we are
sending. Correcting this by setting a static value of 1024 (This could even be
something larger). Improves RPC client performance.
0001-01-01 00:00:00 +00:00
Jim McDonough
c3b05b21a0 Add lsa 0x2e (queryinfo2) client side 0001-01-01 00:00:00 +00:00
Jim McDonough
ed2370b91f Add client side support for samr connect4 (0x3e). Seems to have one
additional parm compared to samr connect, but I've only seen 0x00000002
in that field...
0001-01-01 00:00:00 +00:00
Tim Potter
fe43c2ac2d Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
e358d7b24c This fixes a number of ADS problems, particularly with netbiosless
setups.

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

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

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

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

- recognise dnsRecords as binary when displaying them

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

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

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

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

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

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

- remove unused sid_to_distinguished_name function

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

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

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

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

- add new 'net ads workgroup' command to find the netbios workgroup
  name for a realm
0001-01-01 00:00:00 +00:00
Tim Potter
cb946b5dad Moved rpc client routines from libsmb back to rpc_client where they belong. 0001-01-01 00:00:00 +00:00
Jeremy Allison
3603cd4947 Proper merge of all the working printing stuff from APPLIANCE_HEAD.
Now let's keep this in sync !
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
897e64d2e0 more debug classess activated 0001-01-01 00:00:00 +00:00
Jim McDonough
18854bcd2d Add user name to netsessenum RPC to stop 1783 messages 0001-01-01 00:00:00 +00:00
Jeremy Allison
3c05f7c06f More cleanup work preparing for SMB signing.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
ca61f68d5c Cleaned up srvsvc constants a bit. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
00ef4aad88 Remove unused files.
The size of samba going down for once :-)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
32dc5dbbfb WERROR merge from SAMBA_2_2 0001-01-01 00:00:00 +00:00
Tim Potter
1f007d3ed4 Renamed get_nt_error_msg() to nt_errstr(). 0001-01-01 00:00:00 +00:00
Gerald Carter
5760315c1d syncing up printing code with SAMBA_2_2 (already done some merges
in the reverse).

  * add in new printer change notify code from SAMBA_2_2

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

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

  * sync up some cli_spoolss_XXX functions
0001-01-01 00:00:00 +00:00