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

513 Commits

Author SHA1 Message Date
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
Andrew Tridgell
70bf249cfb allow a couple of LSA functions to take a username instead of a SID,
They still accept a SID, it just can be tedious to have to type SIDs
instead of names all the time.
(This used to be commit 665cc9b1ac)
2003-01-16 04:14:59 +00:00
Gerald Carter
43e4cae106 * removed unused variable from rpcclient code
* added container option to net command (patch from SuSE)
* Makefile patch for examples/VFS from SuSE
(This used to be commit 4a6d8280ea)
2003-01-15 16:07:14 +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
ad20186707 A couple more fstring/pstring issues - and move from sizeof(fstring) to
sizeof(var) in slprintf statements, so as to ensure we don't get mixups there.

Also remove fstrcpy() into a variable that is about to be printed into anyway.

Andrew Bartlett
(This used to be commit 9b76123732)
2003-01-11 12:18:57 +00:00
Tim Potter
4315edcdca Display an error message when the server cannot be resolved when running at
debug level 0.
(This used to be commit 451286febd)
2003-01-08 02:54:42 +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
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
Jeremy Allison
0fdf60f051 Finish adding strings to all talloc_init() calls.
Jeremy.
(This used to be commit 784d15761c)
2002-12-23 23:53:56 +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
Simo Sorce
a543e6ea62 make querygroup in rpcclient working, same fix as per 2.2 tree
(This used to be commit 8877ff2482)
2002-12-08 11:56:45 +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
3eb60559d8 Add getdata and getdataex commands
(This used to be commit 101727335f)
2002-11-11 15:41:04 +00:00
Gerald Carter
4be3750d8e deldriver fix
(This used to be commit f20de1f9b0)
2002-11-09 14:48:27 +00:00
Jim McDonough
66a1f9b1fe Add enumdataex command
(This used to be commit 6d1d2849a7)
2002-11-08 21:39:53 +00:00
Jim McDonough
9429b7d8ab Implement enumdata command
(This used to be commit a22fdf26fe)
2002-11-08 20:51:04 +00:00
Jim McDonough
eedcd7239b Add enumkey command (EnumPrinterKey api)
(This used to be commit a2e17d4344)
2002-11-08 19:06:34 +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
Tim Potter
ea24bb2da8 Merge of get_dc_list() api change. This was slightly more intrusive
than the version in APPLIANCE so watch out for boogs.
(This used to be commit 1e054e3db6)
2002-11-06 01:29:07 +00:00
Jeremy Allison
389a16d9d5 Added new error codes. Fix up connection code to retry in the same way
that app-head does.
Jeremy.
(This used to be commit b521abd86b)
2002-10-17 17:10:29 +00:00
Jelmer Vernooij
272fee5809 Update popt help message and use popt-common
(This used to be commit 821b27037b)
2002-10-05 16:45:54 +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
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
Tim Potter
1974c5d92e The new popt_common_debug code obviates the need to muck around with
AllowDebugChange, saving the debuglevel across lp_load() calls etc.
(This used to be commit 561204905b)
2002-09-05 02:00:14 +00:00
Gerald Carter
2d8e2cfc79 remove inet_aton()
(This used to be commit a7616b2b94)
2002-09-04 01:15:01 +00:00
Tim Potter
9a4110d3d1 Fix setprinterdata rpcclient command to use new cli_spoolss_setprinterdata
function.  Also fixed crash bug - I don't think anyone uses this
command anymore...
(This used to be commit 82c9bf2a6f)
2002-09-03 04:56:39 +00:00
Tim Potter
f02b14f7c6 Change JOB_INFO_CTR to return a pointer to an array rather than array of pointers.
(This used to be commit e9b71b354d)
2002-09-03 03:20:21 +00:00
Jean-François Micouleau
bba043c9e4 allow rpcclient's samlogon command to use cli_net_3().
J.F.
(This used to be commit 3cf419bdfb)
2002-08-30 11:57:06 +00:00
Jean-François Micouleau
cfb5e91178 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.
(This used to be commit 4d38caca40)
2002-08-30 10:46:59 +00:00
Jelmer Vernooij
e095e77a5c Forgot to remove old usage() function
(This used to be commit 4631e1fd10)
2002-08-29 12:44:37 +00:00
Jelmer Vernooij
4d64593834 Use popt for printing --help message
(This used to be commit 355d28d9ea)
2002-08-29 12:05:30 +00:00
Andrew Tridgell
901ffd7ca8 slprintf() takes a size argument
(This used to be commit 4e142ba374)
2002-08-27 05:04:16 +00:00
Tim Potter
dbbb157b2e Don't try to convert enumprinters name to a unc name.
(This used to be commit e09007dd5d)
2002-08-27 01:48:00 +00:00
Tim Potter
83c5985880 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.
(This used to be commit d6b10fe969)
2002-08-27 00:38:55 +00:00
Tim Potter
55315b4b4e Moved calculation of secure channel type into a new function.
(This used to be commit b8dba26978)
2002-08-23 13:38:00 +00:00
Tim Potter
6232468dca Fix for change in cli_netlogon_sam_sync()
(This used to be commit 6ec267618a)
2002-08-22 23:44:36 +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
Andrew Bartlett
2749f5e998 A few fixes towards libsmbclient and rpcclient - get pointer types right and
try to keep to functions inside libsmbclient.

Andrew Bartlett
(This used to be commit 340bc31fdb)
2002-08-22 00:51:00 +00:00
Andrew Bartlett
bad6e2dbe2 Move comment
(This used to be commit 009b331182)
2002-08-22 00:16:21 +00:00
Andrew Tridgell
42364e1b24 make rpcclient use print_guid()
(This used to be commit f2c48cadb2)
2002-08-19 16:55:47 +00:00
Jim McDonough
28bf5e5f2d 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.
(This used to be commit f4ec2d52a7)
2002-08-12 13:41:52 +00:00
Jim McDonough
b3d49538fd Use samr connect4, then fall back to samr connect if it fails. This is
what 2k does.
(This used to be commit 99437db17a)
2002-08-12 08:26:28 +00:00
Tim Potter
335aa54b46 Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD.
(This used to be commit fe43c2ac2d)
2002-08-08 04:58:19 +00:00
Andrew Tridgell
ab9ff0fa73 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
(This used to be commit e358d7b24c)
2002-08-05 02:47:46 +00:00
Tim Potter
3130577acb Some crash fixes for netshareenum returning zero shares.
(This used to be commit a5a0ff8bd7)
2002-07-30 04:32:29 +00:00
Tim Potter
362f534fa1 Our include popt is starting to get a bit old - fixed some compile
problems here.

Also fixed some non-constant initialisers in samsync.
(This used to be commit 33bd721473)
2002-07-29 23:50:54 +00:00
Andrew Bartlett
0ddfa38e8d 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
(This used to be commit 412c791980)
2002-07-29 12:52:27 +00:00
Tim Potter
3a99ab6aa5 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.
(This used to be commit b3e51bfe6c)
2002-07-29 09:32:25 +00:00