1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-28 11:42:03 +03:00
Commit Graph

912 Commits

Author SHA1 Message Date
0e29dc8aa3 r6071: * clean up UNISTR2_ARRAY ( really just an array of UNISTR4 + count )
* add some backwards compatibility to 'net rpc rights list'
* verify privilege name in 'net rpc rights privileges <name>' in order
  to give back better error messages.
2007-10-10 10:56:20 -05:00
b921bf5688 r6046: $ net -S block -U % -W VALE rpc service status spooler
spooler service is SVCCTL_RUNNING.
Configuration details:
        Service Type         = 0x110
        Start Type           = 0x2
        Error Control        = 0x1
        Tag ID               = 0x0
        Executable Path      = C:\WINNT\system32\spoolsv.exe
        Load Order Group     = SpoolerGroup
        Dependencies         = RPCSS/
        Start Name           = LocalSystem
        Display Name         = Print Spooler
2007-10-10 10:56:18 -05:00
4da89ef17b r6038: adding more flesh to 'net rpc service'
open and close the service control manager.

Also experimenting with ideas for cli_xxx() interface.
2007-10-10 10:56:17 -05:00
4e0ac63c36 r6014: rather large change set....
pulling back all recent rpc changes from trunk into
3.0.  I've tested a compile and so don't think I've missed
any files.  But if so, just mail me and I'll clean backup
in a couple of hours.

Changes include \winreg, \eventlog, \svcctl, and
general parse_misc.c updates.

I am planning on bracketing the event code with an
#ifdef ENABLE_EVENTLOG until I finish merging Marcin's
changes (very soon).
2007-10-10 10:56:15 -05:00
5d3d025db7 r6004: Let's make server manager able to kill a user session.
This will send a shutdown command to the right process by pid read from the sessions list.
2007-10-10 10:56:15 -05:00
1f00602786 r5946: BUG 2497: fix bug in rpcclient's deletedriverex when asking to delete all versions of a driver 2007-10-10 10:56:10 -05:00
f9e9a42c07 r5809: try to catch NULL pointers during developerment for rpcbuf_move() 2007-10-10 10:56:02 -05:00
9b0bfd7e6f r5808: removing unneeded structure field from RPC_BUFFER 2007-10-10 10:56:02 -05:00
25121547ca r5805: merging spoolss parsing changes from trunk and cleaning up resulting segvs 2007-10-10 10:56:01 -05:00
277203b535 r5726: merge LsaLookupPrivValue() code from trunk 2007-10-10 10:55:57 -05:00
ffac752875 r5580: Fix "net rpc trustdom add". Much closer to what windows does. Also stop
referencing unknown_6 from sam, because it's just fixed at 1260, the max
len of LOGON_HRS.  Need to go in and mark it as "remove me" from passdb.
2007-10-10 10:55:48 -05:00
bae18aaaff r5536: Avoid intermediate copy of NT and LM responses in NETLOGON client.
This copy was length-limited, which broke when the NTLMv2 response was
more than 128 bytes in length.

Andrew Bartlett
2007-10-10 10:55:45 -05:00
6cdf3b97de r5262: Fix server_role in the samr_query_dom_info calls. When we are a BDC we
should not say we are a PDC.

Guenther
2007-10-10 10:55:34 -05:00
0c205bcc86 r5125: Fix bug 2113 -- thanks to jason@ncac.gwu.edu 2007-10-10 10:55:28 -05:00
a0a6388830 r4946: Our notion the other_sids in the info3 SamLogon struct was
...hmmm... completely bogus. This does not affect us as a domain controller,
as we never set other_sids, but I have *no* idea how winbind got away with it.

Please review thoroughly, samba4 idl looks closer to reality here.

Test case: Member of w2k3 domain, authenticate as a user who is member of one
or more domain local groups. Easiest review with 'client schannel = no'.

Thanks,

Volker
2007-10-10 10:55:08 -05:00
51b34bb536 r4875: Fix for bugid #221, inspired by Mrinal Kalakrishnan <mail@mrinal.net>.
NT sometimes send garbage bytes in NT security descriptor linearizations
when sending well-known sids. Cope with these.
Jeremy.
2007-10-10 10:55:06 -05:00
b2c8220931 r4868: Add "net rpc user RENAME"-command.
Note that Samba3 does not yet support it server-side.

Guenther
2007-10-10 10:55:05 -05:00
ccdff4a998 r4746: add server support for lsa_enum_acct_rights(); last checkin for the night 2007-10-10 10:53:54 -05:00
7bf1312287 r4742: add server support for lsa_add/remove_account_rights() and fix some parsing bugs related to that code 2007-10-10 10:53:53 -05:00
77c10ff9aa r4724: Add support for Windows privileges in Samba 3.0
(based on Simo's code in trunk).  Rewritten with the
following changes:

* privilege set is based on a 32-bit mask instead of strings
  (plans are to extend this to a 64 or 128-bit mask before
   the next 3.0.11preX release).
* Remove the privilege code from the passdb API
  (replication to come later)
* Only support the minimum amount of privileges that make
  sense.
* Rewrite the domain join checks to use the SeMachineAccountPrivilege
  instead of the 'is a member of "Domain Admins"?' check that started
  all this.

Still todo:

* Utilize the SePrintOperatorPrivilege in addition to the 'printer admin'
  parameter
* Utilize the SeAddUserPrivilege for adding users and groups
* Fix some of the hard coded _lsa_*() calls
* Start work on enough of SAM replication to get privileges from one
  Samba DC to another.
* Come up with some management tool for manipultaing privileges
  instead of user manager since it is buggy when run on a 2k client
  (haven't tried xp).  Works ok on NT4.
2007-10-10 10:53:51 -05:00
9a29bef056 r4668: allow the caller to invoke init_unistr2() with a NULL buffer to match previous behavior; more checks to come tomorrow 2007-10-10 10:53:51 -05:00
511cdec60d r4656: Convert the winreg pipe to use WERROR returns (as it should).
Also fix return of NT_STATUS_NO_MORE_ENTRIES should be
ERROR_NO_MORE_ITEMS reported by "Marcin Porwit" <mporwit@centeris.com>.
Jeremy.
2007-10-10 10:53:50 -05:00
a348f9221a r4601: Removed any use of the MAX_XXX_STR style definitions. A little larger
change than I'd hoped for due to formating changes to tidy up code.
Jeremy.
2007-10-10 10:53:49 -05:00
e3bd2a22a5 r4336: Apply some other samba4 SAMR idl that is just too obvious. Don't hard
set the value "forcibly disconnect remote users from server when logon
hours expire" to "no", instead take the value from our account-policy
storage.

Guenther
2007-10-10 10:53:44 -05:00
f9ab15a986 r4331: Implement SAMR query_dom_info-call info-level 8 server- and client-side,
based on samba4-idl.

This saves us an enormous amount of totally unnecessary ldap-traffic
when several hundreds of winbind-daemons query a Samba3 DC just to get
the fake SAM-sequence-number (time(NULL)) by enumerating all users, all
groups and all aliases when query-dom-info level 2 is used.

Note that we apparently never get the sequence number right (we parse a
uint32, although it's a uint64, at least in samba4 idl). For the time
being, I would propose to stay with that behaviour.

Guenther
2007-10-10 10:53:44 -05:00
721bf50d74 r4287: Vampire SAM_DELTA_DOMAIN_INFO.
Based on samba4-idl. The decoding of account-lockout-string is somewhat
experimental though.

Guenther
2007-10-10 10:53:41 -05:00
bd4c5125d6 r4286: Give back 8 byte lm_session_key in Netrsamlogon-reply.
The old #ifdef JRATEST-block was copying 16 bytes and thus overwriting
acct_flags with bizarre values, breaking a lot of things.

This patch is successfully running in a production environment for quite
some time now and is required to finally allow Exchange 5.5 to access
another Exchange Server when both are running on NT4 in a
samba-controlled domain. This also allows Exchange Replication to take
place, Exchange Administrator to access other Servers in the network,
etc. Fixes Bugzilla #1136.

Thanks abartlet for helping me with that one.

Guenther
2007-10-10 10:53:41 -05:00
b41d94d818 r4219: Fix samba3 samr "idl"... According to samba4 idl samr_DomInfo2 contains a
comment string and not an unknown 12 byte structure...

Found after abartlet's smbtorture extended this string to

"Tortured by Samba4: Fri Nov 26 15:40:18 2004 CET"

;-))

Volker
2007-10-10 10:53:38 -05:00
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
b926480d05 r4005: Fix for bug #2071 reported by Jason Mader <jason@ncac.gwu.edu>.
Use correct enum type for comparisons.
Jeremy.
2007-10-10 10:53:27 -05:00
3ebfd137b2 r3928: Fix duplicate call to pdb_get_acct_desc(). Bugzilla #2080. 2007-10-10 10:53:25 -05:00
a24df09386 r3645: Allow deldriverex in rpcclient to delete drivers for a specific
architecture and a specific version.

Guenther
2007-10-10 10:53:11 -05:00
cfd51c0244 r3639: patch from Martin Zielinski <mz@seh.de> to add DeleteDriverEx() function to rpcclient 2007-10-10 10:53:11 -05:00
224920738f r2476: now that PRINTER_ATTRIBUTE_PUBLISHED does not get reset anymore, migrate
the publishing-state for migrated printers as well.

Therefor added client-side-support for setprinter level 7.

Next will be a "net rpc printer publish"-command (just for completeness).

Guenther
2007-10-10 10:52:45 -05:00
cd910ffc51 r2396: Fix bug found by Cornelio Bondad Jr <Corny.Bondad@hp.com>.
To correct “net rpc vampire” core dump.
Jeremy.
2007-10-10 10:52:42 -05:00
8f1716a29b r1692: first commit :)
* add IA64 to the architecture table of printer-drivers

* add new "net"-subcommands:

  net rpc printer migrate {drivers|printers|forms|security|settings|all}
        [printer]
  net rpc share migrate {shares|files|all} [share]

  this is the first part of the migration suite. this will will (once
  feature-complete) allow to do 1:1 server-cloning in the best possible way by
  making heavy use of samba's rpc_client-functions. all migration-steps
  are implemented as rpc/smb-client-calls; net communicates via rpc/smb
  with two servers at the same time (a remote, source server and a
  destination server that currently defaults to the local smbd). this
  allows e. g. printer-driver migration including driverfiles, recursive
  mirroring of file-shares including file-acls, etc. almost any migration
  step can be called with a migrate-subcommand to provide more flexibility
  during a migration process (at the cost of quite some redundancy :) ).

  "net rpc printer migrate settings" is still in a bad condition (many
  open questions that hopefully can be adressed soon).

  "net rpc share migrate security" as an isolated call to just migrate
  share-ACLs will be added later.

  Before playing with it, make sure to use a test-server. Migration is a
  serious business and this tool-set can perfectly overwrite your
  existing file/print-shares.

* along with the migration functions had to make I the following
  changes:

        - implement setprinter level 3 client-side

        - implement net_add_share level 502 client-side

        - allow security descriptor to be set in setprinterdata level 2
          serverside

guenther
2007-10-10 10:52:19 -05:00
36741d3cf5 r1492: Rework our random number generation system.
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

Andrew Bartlett
2007-10-10 10:52:13 -05:00
af251f4ea6 r1202: This hopefully fixes our memory use when unmarshalling strings. The test case
was 'rpcclient -c "enumprinters 2"' with 4000 printers. At some point this
completely exploded in memory usage. For every string we talloc'ed memory up
to the end of the buffer. -> O(n^2).

This survives valgrind with this number of printers. It might also have
influence on winbind with a large number of users.

All those who dare to look at samba3 rpc code, could you please take a look? I
know this is a burden, but I would like comments ;-)))

Volker
2007-10-10 10:51:59 -05:00
61768f4cb3 r1125: Remove bougus comments. (The real fix was to the sealed pipe padding)
Andrew Bartlett
2007-10-10 10:51:56 -05:00
e9f109d1b3 r991: Allow winbindd to use the domain trust account password
for setting up an schannel connection.  This solves the problem
of a Samba DC running winbind, trusting a native mode AD domain,
and needing to enumerate AD users via wbinfo -u.
2007-10-10 10:51:53 -05:00
9ceff80327 r977: Implement 'net rpc group rename' -- rename domain groups.
Volker
2007-10-10 10:51:52 -05:00
316ba5ad89 r704: BUG 1315: fix for schannel client connections to server's that don't support 128 bit encryption 2007-10-10 10:51:34 -05:00
b9e79004a4 r480: Added Andrew Bartletts pwinfo-parse-error.patch.
Jeremy.
2007-10-10 10:51:25 -05:00
911a28361b r196: merging struct uuid from trunk 2007-10-10 10:51:13 -05:00
724e8d3f33 r69: Global rename of 'nt_session_key' -> 'user_session_key'. The session key could
be anything, and may not be based on anything 'NT'.  This is also what microsoft
calls it.
2007-10-10 10:51:06 -05:00
a7e2730ec4 r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
2007-10-10 10:51:05 -05:00
ae6840320f Implement NETLOGON GetDCName client side. You can ask a DC for the name of
a DC it trusts.

Volker
-
c335cb80d2 fixes for prnadmin.dll API
* force the PRINTER_ATTRIBUTE_LOCAL (nor PRINTER_ATTRIBUTE_NETWORK)
  * ensure that we return the sec_desc in smb_io_printer_info_2
    (allows prnui.dll to restore security descriptors from a data file).
-
e597420421 Add 'net rpc group [add|del]mem' for domain groups and aliases.
Volker
-
76c75bb8a7 Add 'net rpc group add'. For this parse_samr.c had to be changed: The
group_info4 in set_dom_group_info also has the level in the record
itself. This seems not to be an align. Tested with NT4 usrmgr.exe. It can
still create a domain group on a samba machine.

Volker
-