1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

556 Commits

Author SHA1 Message Date
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
-
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
-
Jeremy Allison
784d15761c Finish adding strings to all talloc_init() calls.
Jeremy.
-
Jeremy Allison
842e08e52a Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
-
Simo Sorce
8877ff2482 make querygroup in rpcclient working, same fix as per 2.2 tree -
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.
-
Jim McDonough
101727335f Add getdata and getdataex commands -
Gerald Carter
f20de1f9b0 deldriver fix -
Jim McDonough
6d1d2849a7 Add enumdataex command -
Jim McDonough
a22fdf26fe Implement enumdata command -
Jim McDonough
a2e17d4344 Add enumkey command (EnumPrinterKey api) -
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.
-
Tim Potter
1e054e3db6 Merge of get_dc_list() api change. This was slightly more intrusive
than the version in APPLIANCE so watch out for boogs.
-
Jeremy Allison
b521abd86b Added new error codes. Fix up connection code to retry in the same way
that app-head does.
Jeremy.
-
Jelmer Vernooij
821b27037b Update popt help message and use popt-common -
Gerald Carter
f70caa25e4 merge of working dsrolegetprimdominfo() client code from APP_HEAD -
Gerald Carter
38c9e42998 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
-
Tim Potter
561204905b The new popt_common_debug code obviates the need to muck around with
AllowDebugChange, saving the debuglevel across lp_load() calls etc.
-
Gerald Carter
a7616b2b94 remove inet_aton() -
Tim Potter
82c9bf2a6f Fix setprinterdata rpcclient command to use new cli_spoolss_setprinterdata
function.  Also fixed crash bug - I don't think anyone uses this
command anymore...
-
Tim Potter
e9b71b354d Change JOB_INFO_CTR to return a pointer to an array rather than array of pointers. -
Jean-François Micouleau
3cf419bdfb allow rpcclient's samlogon command to use cli_net_3().
J.F.
-
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.
-
Jelmer Vernooij
4631e1fd10 Forgot to remove old usage() function -
Jelmer Vernooij
355d28d9ea Use popt for printing --help message -
Andrew Tridgell
4e142ba374 slprintf() takes a size argument -
Tim Potter
e09007dd5d Don't try to convert enumprinters name to a unc name. -
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.
-
Tim Potter
b8dba26978 Moved calculation of secure channel type into a new function. -
Tim Potter
6ec267618a Fix for change in cli_netlogon_sam_sync() -
Tim Potter
1f29276c2f 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
-
Andrew Tridgell
e4cb106d2e added a 'net rpc samdump' command for dumping the whole sam via
samsync operations (as a BDC)
-
Andrew Bartlett
340bc31fdb A few fixes towards libsmbclient and rpcclient - get pointer types right and
try to keep to functions inside libsmbclient.

Andrew Bartlett
-
Andrew Bartlett
009b331182 Move comment -
Andrew Tridgell
f2c48cadb2 make rpcclient use print_guid() -
Jim McDonough
f4ec2d52a7 Add lsaqueryinfo2, but keep under "lsaquery" command. It will autoselect
which lsaqueryinfo to do based in infoclass.  Currently 12 is the only one
that causes a queryinfo2.
-
Jim McDonough
99437db17a Use samr connect4, then fall back to samr connect if it fails. This is
what 2k does.
-
Tim Potter
fe43c2ac2d Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD. -
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
-
Tim Potter
a5a0ff8bd7 Some crash fixes for netshareenum returning zero shares. -
Tim Potter
33bd721473 Our include popt is starting to get a bit old - fixed some compile
problems here.

Also fixed some non-constant initialisers in samsync.
-
Andrew Bartlett
412c791980 We don't need this silly unix username stuff. NT username is basicly unused,
and must == unix username for sane implementation in passdb.

Andrew Bartlett
-
Tim Potter
b3e51bfe6c Started to get samsync to insert account information in the passdb. It's
pretty half-arsed at the moment and doesn't work very well but Mr Bartlett
was interested in it.

Also started playing around with the more interesting bits of popt.  The
auto-generated usage information is pretty neat.
-
Tim Potter
8c17904848 Use common popt definition for -d option. -
Andrew Bartlett
28373e5bc2 Tpot missed one... -
Tim Potter
277f6bbb9a Renamed all the new_cli_netlogon_* functions to cli_netlogon_*
as they're no longer new!
-
Andrew Bartlett
6129718bea If we can't connect, make sure its a level 0 so we see it, and the reason. -
Andrew Bartlett
dbf28f992b Apply patch from "Kai Krueger" <kai@kruegernetz.de> to make it easier to
determine what access masks should be applied to various SAMR calls.

Andrew Bartlett
-
Tim Potter
2674adf1b5 Added -I option to rpcclient. -
Andrew Bartlett
c20d057f88 Updates to the 'name -> sid' code:
Correct the 'none mapped' behaviour, (so that it matches Win2k) and  add a
function to make the SID types appear as text strings in logs/rpcclient.

Also, remove a silly case that would cause 'failure' to be 'success'.  (Might
look at this a bit more in future).

Andrew Bartlett
-