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

682 Commits

Author SHA1 Message Date
Gerald Carter
26d161ff85 fixed the geyed out registry keys. Stupid typo on my part.
Now on to plug in the printing tdbs to the registry view....

jerry
(This used to be commit 2a68e4529a)
2002-07-04 13:18:56 +00:00
Andrew Bartlett
e48b3fe83c More code from "Kai Krueger" <kai@kruegernetz.de>, this time starting to make
the 'user cannot change password' button work.  Needs help from a future SAM
backend, but at least this parses the data, and returns an error.

Andrew Bartlett
(This used to be commit 0c4afe075a)
2002-07-04 13:11:54 +00:00
Gerald Carter
a3c3960edc first cut at implementing support for browsing printer and driver driver
via regedt32.exe.  The regsitry.tdb is only a framework.  It is not
intended to store values, only key/subkey structure.  The data
will be retrieved from nt*tdb (for printers) creating a virtual view
of the data.

You can currently connect to a Samba box using regedt32.exe (haven't
tried regedit.exe).  Some basic keys are created in registry.tdb
for use.

There are two problems....

  * something is getting freed in the winreg code that causes heap
    corruption later on.  As long as you don't play with the winreg
    server functionality, I don't think you'll be bitten by this.

  * no access controls are currently implemented

  * I can't browse HKLM because regedt32 greys out the SYSTEM subkey.

ok so that was three....
(This used to be commit 542d3c93a9)
2002-07-03 19:15:26 +00:00
Andrew Bartlett
8e52737efc Break up the passdb objects (to allow RPC clients to link without brining in
*.o) and implment new enum_dom_users code in the SAMR RPC subsystem.

Incresingly, we are using the pdb_get_{user,group}_sid() functions, in the
eventual hope that we might one day support muliple domains off a single
passdb.  To extract the RID, we use sid_peek_check_rid(), and supply an
'expected' domain SID.

The id21 -> SAM_ACCOUNT and id23 -> SAM_ACCOUNT code has been moved to
srv_samr_util.c, to ease linking in passdb users.

Compatiblity code that uses 'get_global_sam_sid()' for the 'expected' sid is in
pdb_compat.c

Andrew Bartlett
(This used to be commit 5a2a6f1ba3)
2002-07-03 07:37:54 +00:00
Andrew Tridgell
9674ec6987 fixed our winreg parsing to handle a diifferent form given to us by
WinXP. This fixes setting security decsriptors from XP Professional.
(This used to be commit 80c3c68de2)
2002-07-02 04:22:59 +00:00
Tim Potter
5106ead0e0 Merge of constant renames from APPLIANCE_HEAD.
(This used to be commit daf4c6a013)
2002-07-02 04:07:32 +00:00
Andrew Tridgell
9930b0b065 used findstatic.pl to make some variables static and remove some dead
code
(This used to be commit 91ad9041e9)
2002-07-01 09:12:41 +00:00
Jeremy Allison
452eb38df0 Proper merge of all the working printing stuff from APPLIANCE_HEAD.
Now let's keep this in sync !
Jeremy.
(This used to be commit 3603cd4947)
2002-06-28 00:17:15 +00:00
Gerald Carter
8587400d28 a null grp_sid should have a 0 offset. Also removed a few more unnecessary
prs_align() for sec_desc.
(This used to be commit fc3770f281)
2002-06-27 01:12:37 +00:00
Gerald Carter
edb7324a28 merge from APP_HEAD
(This used to be commit d8cf54399d)
2002-06-26 19:08:32 +00:00
Jeremy Allison
8dd5ba8ced Typo...
Jeremy.
(This used to be commit 4ed134426d)
2002-06-26 17:37:53 +00:00
Jeremy Allison
caf5a36b68 Added prs_align_uint16 for SD aligns.
Jeremy.
(This used to be commit 374182a9ba)
2002-06-26 17:36:58 +00:00
Gerald Carter
9d6301dfe0 sync with the sec_desc parsing fix from APP_HEAD. I will probably need
to revisit this some.
(This used to be commit f471c880db)
2002-06-24 23:04:41 +00:00
Gerald Carter
900fb62238 printing merge from SAMBA_2_2. Ther server code looks to be in sync now.
Mostly formatting and s/free/SAFE_FREE/g changes with the two exceptions
being

  * John driver init changes
  * Tim's printer enumeration bug fix
(This used to be commit f753676286)
2002-06-24 19:51:23 +00:00
Simo Sorce
a60e37096d more debug classess activated
(This used to be commit 897e64d2e0)
2002-06-18 09:20:13 +00:00
Andrew Bartlett
a98d2b1e17 Add a touch of const to this - helps with some yet-to-be-commited changes
(This used to be commit a2c791c0bb)
2002-06-14 14:13:41 +00:00
Jeremy Allison
de581b91e9 Merge of Jerry's fix from 2.2.
Jeremy.
(This used to be commit 64af68924b)
2002-06-10 21:49:18 +00:00
Jim McDonough
1ecee79d05 Add user name to netsessenum RPC to stop 1783 messages. Also fix where username was sent as machine name.
(This used to be commit 2b4a5b5666)
2002-06-03 22:13:41 +00:00
Tim Potter
ee2ef50a74 Fixed bogus alignment in unmarshalling of SAMR_GET_DOM_PWINFO reply.
(This used to be commit 2e25b5c309)
2002-06-03 02:13:46 +00:00
Jim McDonough
4caf48a700 Add rpc for file close, expand file enum to take username
(This used to be commit 4b18a94590)
2002-06-01 01:02:04 +00:00
Jim McDonough
f5dc84c4cc Add fns for netshareadd and netsharedel rpcs
(This used to be commit 4e31716385)
2002-05-31 21:08:51 +00:00
Jim McDonough
e422b271da Update netfileenum on both client and server sides to do an arbitrary number
of files.  This was done to better enable net rpc file.  Perhaps we can start
giving back real info this way, too.
(This used to be commit b3fea72ee9)
2002-05-31 17:02:09 +00:00
Jim McDonough
a14fbf6763 netfileenum was missing the username filter.
(This used to be commit 8fc3dba8bd)
2002-05-31 00:29:29 +00:00
Tim Potter
568deecbf0 Added netremotetod to try and figure out which srvsvc commands are denied
when using restrictanonymous.
(This used to be commit 0c65978ed0)
2002-05-29 01:43:44 +00:00
Tim Potter
78b4de02bb When marshalling a netshareenum request the share ctr has to be initialised
to an empty value instead of a null pointer otherwise the server service
crashes on NT.
(This used to be commit c7214baa05)
2002-05-28 08:41:50 +00:00
Gerald Carter
5b76d846f8 merge from SAMBA_2_2.
Tim, please check the prs_align() removed from sec_io_desc()
and make sure it doesn't break anything else.  I know it is
right for the printing needs and I have tested some other
general things like viewing acls on directories, but I would
feel more comfortable if you would have a look as well.


jerry
(This used to be commit 83f109c940)
2002-05-24 16:27:54 +00:00
Tim Potter
c1334b143b OK that last commit was incorrect - this call is parsed properly. I only
imagined it wasn't!
(This used to be commit bbad6c6678)
2002-05-20 01:31:51 +00:00
Tim Potter
622ed701a5 There's probably a pointer to a buffer at the end of a enumprinterdrivers()
rpc call which we currently don't parse - just added a comment about it for
the moment as not parsing it is harmless.
(This used to be commit 2429c4cc79)
2002-05-20 01:00:56 +00:00
Tim Potter
077566a200 No need to pass a fstring in make_spoolss_q_enumprinters()
(This used to be commit 1fb8e2b3a0)
2002-05-20 00:55:19 +00:00
Andrew Bartlett
58e1fe62cc A few things in this commit:
cleanup some of the code in net_rpc_join re const warnings and
fstrings.

Passdb:

Make the %u and %U substituions in passdb work.
This is done by declaring these paramters to be 'const' and doing
the substitution manually.  I'm told this is us going full circle,
but I can't really see a better way.

Finally these things actually seem to work properly...

Make the lanman code use the pdb's recorded values for homedir etc
rather than the values from lp_*()

Add code to set the plaintext password in the passdb, where it can
decide how to store/set it.  For use with a future 'ldap password
change' option, or somthing like that...

Add pdb_unix, so as to remove the 'not in passdb' special cases from the
local_lookup_*() code.  Quite small, as it uses the new 'struct passwd ->
SAM_ACCOUNT' code that is now in just one place.  (also used by pdb_smbpasswd)

Other:
Fix up the adding of [homes] at session setup time to actually pass
the right string, that is the unix homedir, not the UNC path.

Fix up [homes] so that for winbind users is picks the correct name.
(bad interactions with the default domain code previously)

Change the rpc_server/srv_lsa_nt.c code to match NT when for the
SATUS_NONE_MAPPED reply:  This was only being triggered on
no queries, now it is on the 'no mappings' (ie all mappings failed).
Checked against Win2k.

Policy Question:  Should SID -> unix_user.234/unix_group.364 be
considered a mapping or not?  Currently it isn't.

Andrew Bartlett
(This used to be commit c28668068b)
2002-05-18 05:52:52 +00:00
Andrew Bartlett
caf6252367 Make non-static for some later work (pushing the info3 across the winbind
pipe for smbd to decode), and fix up the debug.  (At least I assume it is
wrong, can an expert care to comment?)
(This used to be commit e5b4331ffa)
2002-05-17 14:27:42 +00:00
Andrew Bartlett
c6926d75dd Add a touch of const
(This used to be commit 3e93b216dd)
2002-05-17 14:26:20 +00:00
Andrew Bartlett
3fe27b7f9d A few more trusted domains updates from mimir.
I think we may still need to look at our server enumeration code, but
other than that, its much better in the tree than out.

Andrew Bartlett
(This used to be commit d57a1b4629)
2002-05-17 13:49:01 +00:00
Tim Potter
af451af22f Added deleteprinterdata client rpc.
(This used to be commit 217ae50acd)
2002-05-14 07:21:57 +00:00
Tim Potter
3d95426f2c Added writeprinter rpc command.
(This used to be commit a1934a7a8e)
2002-05-14 06:37:54 +00:00
Tim Potter
4deb561254 Change make_spoolss_q_{get,set}printerdata() take a char* and length rather
than a unistr2.  Printer data isn't necessarily in unistr format.

Tallocate memory to hold returned data when unmarshalling getprinterdata
and enumprinterdata replies.
(This used to be commit 89633a1d87)
2002-05-14 05:32:45 +00:00
Gerald Carter
d53afaaff1 compile fix merge from SAMBA_2_2
(This used to be commit 2676be4e41)
2002-05-13 14:41:55 +00:00
Tim Potter
787b58835c Support for client side startdocprinter.
Set useless_ptr = 1 for marshalling smb_io_doc_info() so it actually works.
(This used to be commit 8e09e94546)
2002-05-13 03:18:19 +00:00
Gerald Carter
c6cbca79b4 misc merge from SAMBA_2_2
(This used to be commit 0420098c47)
2002-05-10 16:19:53 +00:00
Gerald Carter
9992378e55 devmode parsing merge from SAMBA_2_2
(This used to be commit 59e49a79b4)
2002-05-10 16:19:05 +00:00
Tim Potter
26b0e0b478 Added client side spoolss rpc commands for startpageprinter,
endpageprinter, setjob and getjob.
(This used to be commit d091a9d300)
2002-05-08 05:48:32 +00:00
Tim Potter
3a4065acf7 Grr - the removal of the nnecessary prs_align() from relative unicode
strings didn't make it across into HEAD.
(This used to be commit 4d715cb682)
2002-05-07 05:57:34 +00:00
Jean-François Micouleau
07bb869958 don't set the owner and group sid offset is there are no owner or group
owner.

	J.F.
(This used to be commit 68e9211f5d)
2002-04-29 21:34:02 +00:00
Gerald Carter
dde9187728 merge from SAMBA_2_2
(This used to be commit 5e381abbbf)
2002-04-22 18:47:36 +00:00
Andrew Bartlett
07e6ff5fcf Partly based on the work by mimir (Rafal Szczesniak
<mimir@diament.ists.pwr.wroc.pl>) this patch allows samba to correctly
enumerate its trusted domains - by exaimining the keys in the secrets.tdb file.

This patch has been tested with both NT4 and rpcclient/wbinfo, and adds
some extra functionality to talloc and rpc_parse to allow it to deal with
already unicode strings.

Finally, this cleans up some const warnings that were in net_rpc.c by pushing
another dash of const into the rpc client code.

Andrew Bartlett
(This used to be commit 0bdd94cb99)
2002-04-14 09:44:16 +00:00
Jeremy Allison
440a0099ea HP2500C driver writes devmode with private data that ends
on a 2 byte boundary. We then miss-parse the desired_access. Also added
other fixes to ensure we align after private data (discussed with Gerry).
Jeremy.
(This used to be commit 4369a58765)
2002-04-11 18:52:09 +00:00
Gerald Carter
b40e73e2ca specversion merge from SAMBA_2_2
(This used to be commit d87aa35d48)
2002-04-11 01:48:38 +00:00
Tim Potter
b99d3f27df Fixed missing alignment in spoolss_io_q_enumjobs() function.
(This used to be commit e878cdc9f5)
2002-04-10 07:21:03 +00:00
Jeremy Allison
4ad0ff29bf Added Shirish's client side caching policy change.
Jeremy.
(This used to be commit 16015c07ea)
2002-04-10 01:04:13 +00:00
Tim Potter
b408c4c5c0 The useless_ptr must be non-zero for addform and setform client functions
to work.

Note about setprinter level 1 not existing.
(This used to be commit 6367bfc478)
2002-04-09 03:36:12 +00:00
Jeremy Allison
adc57a79d9 Fixed the handle leak in the connection management code (this code is crap
and should be rewritten, just not now... :-).
Jeremy.
(This used to be commit 5de792e7e9)
2002-04-04 02:39:57 +00:00
Gerald Carter
737423f06e OpenPrinter() merge from 2.2
(This used to be commit 619397cc90)
2002-03-26 03:15:30 +00:00
Tim Potter
ce236d1dbf Stomped on some header file version numbers that have crept back in.
(This used to be commit e66bdf1229)
2002-03-22 06:24:38 +00:00
Gerald Carter
826f3fb86b resetprinter merge from SAMBA_2_2
(This used to be commit 88d8897e21)
2002-03-20 03:37:27 +00:00
Jeremy Allison
3fe771654b Fix for debug typo.
(This used to be commit 5b43519219)
2002-03-20 00:49:44 +00:00
Tim Potter
a4cce223d6 Added dos_errstr() function. Not all errors in list yet.
(This used to be commit ddb5753e36)
2002-03-17 06:04:15 +00:00
Tim Potter
ab13654dc9 Renamed get_nt_error_msg() to nt_errstr().
(This used to be commit 1f007d3ed4)
2002-03-17 04:36:35 +00:00
Gerald Carter
65c007b583 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
(This used to be commit 5760315c1d)
2002-03-15 08:14:10 +00:00
Tim Potter
aad2072e07 Remove studly gaps from prs_werror() calls so the same debug text is
logged.  This makes it much easier to use grep on log files when searching
for errors.
(This used to be commit ab1ebd3779)
2002-03-14 02:48:03 +00:00
Andrew Tridgell
cfbbf73677 yipee! Finally put in the patch from Alexey Kotovich
<a.kotovich@sam-solutions.net> that adds the security decsriptor code
for ADS workstation accounts

thanks for your patience Cat, and thanks to Andrew Bartlett for
extensive reviews and suggestions about this code.
(This used to be commit 6891393b5d)
2002-03-10 01:54:44 +00:00
Jeremy Allison
aa78524943 Fix the NTSTATUS -> WERROR for srvsvc pipe.
Jeremy.
(This used to be commit 2b85d3570c)
2002-03-05 02:12:00 +00:00
Andrew Bartlett
f4f43fc940 more const
(This used to be commit f0b16b7b51)
2002-03-02 09:15:56 +00:00
Andrew Bartlett
90b6838751 And a little more const.
(This used to be commit 044391b597)
2002-03-02 04:44:24 +00:00
Jeremy Allison
8071fb8c05 Patch for Domain users not showing up from "Ivan Zhakov" <vunny@mail.ru>.
Jeremy.
(This used to be commit 3f9063167f)
2002-02-27 22:02:05 +00:00
Tim Potter
bb117fdca7 Implemented client side functions for SPOOLSS addform, getform, setform and
enumforms.
(This used to be commit e69222f081)
2002-02-25 06:43:31 +00:00
Tim Potter
a630f289f5 Added make functions for SPOOL_Q_{ADD,SET,DELETE}FORM.
I'm pretty sure that the useless_ptr in spoolss_io_q_setform() needs to be
initialised to 1 otherwise the form isn't marshalled at all.  JF, can you
verify this?  If so then this probably applies to the io functions for
setform and deleteform.
(This used to be commit 1803778451)
2002-01-31 11:42:16 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Andrew Bartlett
ba8c1c6e45 Back out some of the less well thought out ideas from last weeks work on
winbind default domains, particulary now I understand whats going on a lot
better.  This ensures that the RPC client code does as little 'magic' as
possible - this is up to the application/user.  (Where - for to name->sid code
- it was all along).  This leaves the change that allows the sid->name code to
return domains and usernames in seperate paramaters.

Andrew Bartlett
(This used to be commit 5dfba2cf53)
2002-01-26 11:48:42 +00:00
Andrew Bartlett
33cf9ba4b7 We may as well not use these temporary variables - they are only used once and
just make it harder to debug (gcc stips optomises them away).
(This used to be commit 100d2705dd)
2002-01-26 09:58:11 +00:00
Andrew Bartlett
29ad4a76cd Try to move towards slightly sane linking for Samba by removing some pdb_...()
calls from rpc_parse/parse_net.c - instead these values are passed as a
paramater.

Unfortunetly some there is still some samr work to be done before this is
actually useful.

Andrew Bartlett
(This used to be commit 4fc9e16ad7)
2002-01-26 05:52:20 +00:00
Jeremy Allison
5b0dca4998 Fixed ADDPRINTEREX to take a devmode and a security descriptor...
Jeremy.
(This used to be commit 27f65b3aad)
2002-01-26 01:20:38 +00:00
Andrew Bartlett
93a8358910 This patch makes the 'winbind use default domain' code interact better with
smbd, and also makes it much cleaner inside winbindd.

It is mostly my code, with a few changes and testing performed by Alexander
Bokovoy <a.bokovoy@sam-solutions.net>.  ab has tested it in security=domain and
security=ads, but more testing is always appricatiated.

The idea is that we no longer cart around a 'domain\user' string, we keep them
seperate until the last moment - when we push that string into a pwent on onto
the socket.

This removes the need to be constantly parsing that string - the domain prefix
is almost always already provided, (only a couple of functions actually changed
arguments in all this).

Some consequential changes to the RPC client code, to stop it concatonating the
two strings (it now passes them both back as params).

I havn't changed the cache code, however the usernames will no longer have a
double domain prefix in the key string.  The actual structures are unchanged
 - but the meaning of 'username' in the 'rid' will have changed.  (The cache is
invalidated at startup, so on-disk formats are not an issue here).

Andrew Bartlett
(This used to be commit e870f0e727)
2002-01-20 01:24:59 +00:00
Jeremy Allison
2a3673994d Added prs_mem_clear(). Clear memory on buffer reallocation. That way
we're not returning what the client gave us.
Jeremy.
(This used to be commit 9a969069f1)
2002-01-18 00:36:16 +00:00
Jeremy Allison
37834a48e8 Always clear malloced memory for parse structs.
Jeremy.
(This used to be commit 6deb4caca5)
2002-01-18 00:19:45 +00:00
Jeremy Allison
c9d350a736 Added PRINTER_INFO_4/PRINTER_INFO_5, we're seeing level 5 requested on the wire... so.
Jeremy.
(This used to be commit b63b762978)
2002-01-12 02:37:54 +00:00
Tim Potter
17729f5dc5 Sed error. The status value in the PRINTER_INFO_2 structure isn't a WERROR
but a plain old uint32.
(This used to be commit 690cc12bad)
2002-01-07 06:13:40 +00:00
Martin Pool
4f3a2be2b9 Add prs_dump_before to dump everything from the start of the prs
buffer up to the current position, and use this to dump pipe buffers
just before parsing.
(This used to be commit 92a3ab274e)
2002-01-02 07:48:07 +00:00
Andrew Tridgell
84ecd95dba more irix -64 portability fixes
(This used to be commit 65e857b36e)
2001-12-31 14:05:22 +00:00
Andrew Bartlett
85c5b3c315 Give the main loop talloc context a name (using mbp's new talloc naming
system).

Andrew Bartlett
(This used to be commit f0c301a12e)
2001-12-31 12:41:24 +00:00
Jean-François Micouleau
1acf4f67a2 added a copyright notice.
J.F.
(This used to be commit 87928c4d91)
2001-12-21 22:54:53 +00:00
Jean-François Micouleau
0e550b2c11 doesn't keep track of the struct's size we enumerate. W2K doesn't
calculate them and always reply a size of 32 bytes whereas NT4 did the
maths. Anyway, it looks like the clients don't complain.

in query_dom_info() at level 2, return the real number of users and
groups. That's the fix to the W95/98 userlist bug !

as W95/98 does a query_dom_info(2) followed by a query_disp_info(4) on
the SAME context handle (err we call it an lsa policy handle ! plain
wrong name), I was tempted to keep the snapshoot in memory, to prevent
2 full user db enumerations in a row and just have one shared. But if some
client does the 2 calls on two different handles, we would have 2 copies
in memory not free'ed before the samr_close().

We still have too many fixed constant and too many magic values in that
code. And btw, I really hates how the sequence number is generated !

        J.F.
(This used to be commit c0178e1a03)
2001-12-21 22:34:49 +00:00
Jean-François Micouleau
595dd01507 re-done all of samr_query_disp_info()
instead of enumerating the whole user db or group db every time, we store
a in memory copy linked to the handle.

that's much faster for large enumeration where the db can't fit in a
single rpc packet. And as it's a copy, it's constant between enumeration.

still some stuff to clean. But now I can fix the W95 userlist bug, as I've
finally found it.

	J.F.
(This used to be commit 3ab4521536)
2001-12-21 13:36:14 +00:00
Gerald Carter
f7e4e37c63 merge from 2.2
(This used to be commit 72d3b16022)
2001-12-20 15:09:23 +00:00
Jean-François Micouleau
ea274ac97f added info level 1 to samr_query_alias()
(This used to be commit 589aa4fe22)
2001-12-19 00:15:29 +00:00
Jean-François Micouleau
a94ff206c6 fixing bug I introduced.
J.F.
(This used to be commit 49764852c5)
2001-12-18 00:30:25 +00:00
Jean-François Micouleau
6e76486505 there is no unknown field in LSA_SEC_QOS
some cleanup of the lsa_open_policy and lsa_open_policy2 parser. the
length fields are not correct but that's what NT send. We don't anymore
underflow or overflow the decoding.

added the domain admins group to the default SD.

we are now checking the desired access flag in the lsa_open_policy_X()
calls and in most functions also.

        J.F.
(This used to be commit a217c4e4ff)
2001-12-17 23:03:23 +00:00
Tim Potter
0be611c8dc Replaced some hardcoded hex numbers with constants.
Made a note about NOTIFY_OPTION_TYPE and NOTIFY_OPTION_TYPE_DATA - they are
actually one structure.  The latter is just the deferred referrant of the
former.
(This used to be commit b596c0b171)
2001-12-17 01:53:02 +00:00
Jean-François Micouleau
9f59fc64b8 update the ldap support code. it compiles.
Ignacio you can update your howto ;-)

samsync: a small patch to try chaning challenges.

	J.F.
(This used to be commit c99bc30559)
2001-12-13 18:09:29 +00:00
Gerald Carter
037b40f01f merge from 2.2
(This used to be commit 5b4b3323a3)
2001-12-13 17:18:15 +00:00
Jean-François Micouleau
1c95d1d16b decoded SAM_DELTA 0x0e and 0x12.
One is an entry for the trusted domains
The other is an entry for the trusting domains

They are pretty basic, I'll improve them.

	J.F.
(This used to be commit 8d359e6213)
2001-12-12 11:38:57 +00:00
Jean-François Micouleau
c75d9409aa a ugly decoder for SAM_DELTA_DOM_INFO (0x0d)
a correct decoder for SAM_PRIVS_INFO (0x10)

this code is totally useless right now, it's just fun to decode those and
will save tpot some time.

	J.F.
(This used to be commit 314b675ed9)
2001-12-12 09:43:56 +00:00
Jean-François Micouleau
0ff1a9568b added info level 3 to samrgetgroupinfo. I don't know what the value is.
It's just to keep usermanager happy ;-)

clean up a bit samr_query_aliasinfo to return the group description

added: samr_del_aliasmem, samr_del_groupmem and samr_del_domuser

with the correct scripts, you can now entirely manage the users from
usermanager ! Closer to full PDC every day ;-)

        J.F.
(This used to be commit 0a727afc66)
2001-12-10 15:03:16 +00:00
Tim Potter
4f53486d78 Added client and server code for the GetPrintProcessorDirectory SPOOLSS
rpc.  This was supposed to fix a printer driver download bug but it didn't
but it seemed a shame to trash all this code so I'm commiting it #ifdef'ed
out in case someone needs it one day.
(This used to be commit bef4365647)
2001-12-10 05:03:17 +00:00
Jean-François Micouleau
e0066d2dd4 again an intrusive patch:
- removed the ugly as hell sam_logon_in_ssb variable, I changed a bit the
definition of standard_sub_basic() to cope with that.

- removed the smb.conf: 'domain admin group' and 'domain guest group'
parameters ! We're not playing anymore with the user's group RIDs !

- in get_domain_user_groups(), if the user's gid is a group, put it first
in the group RID list.

I just have to write an HOWTO now ;-)

        J.F.
(This used to be commit fef52c4b96)
2001-12-06 13:09:15 +00:00
Andrew Bartlett
8ba00d147b OK. Smbpasswd -j is DEAD.
This moves the rest of the functionality into the 'net rpc join' code.

Futhermore, this moves that entire area over to the libsmb codebase, rather
than the crufty old rpc_client stuff.

I have also fixed up the smbpasswd -a -m bug in the process.

We also have a new 'net rpc changetrustpw' that can be called from a
cron-job to regularly change the trust account password, for sites
that run winbind but not smbd.

With a little more work, we can kill rpc_client from smbd entirly!
(It is mostly the domain auth stuff - which I can rework - and the
spoolss stuff that sombody else will need to look over).

Andrew Bartlett
(This used to be commit 575897e879)
2001-12-05 11:00:26 +00:00
Andrew Bartlett
d67041a532 Const religion for some of the RPC code.
(This used to be commit 64bf8f81c4)
2001-12-05 00:22:24 +00:00
Jean-François Micouleau
cdf9b42754 added a tdb to store the account policy informations.
You can change them with either usermanager->policies->account
or from a command prompt on NT/W2K: net accounts /domain

we can add a rpc accounts to the net command. As the net_rpc.c is still
empty, I did not start. How should I add command to it ? Should I take the
rpcclient/cmd_xxx functions and call them from there ?

alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more
for jeremy ;-)

        J.F.
(This used to be commit bc28a8eebd)
2001-12-03 17:14:23 +00:00
Andrew Tridgell
b6b84cf709 const religion
(This used to be commit 359ca8f246)
2001-12-03 08:16:51 +00:00
Tim Potter
6d9adfe73c Renamed sid field in SEC_ACE to trustee to be more in line with MS's
definitions.
(This used to be commit 9712d3f15a)
2001-11-30 01:04:15 +00:00
Jean-François Micouleau
fac01bda8b Changed again how the privilege list is handled in the group mapping code.
This time it's a PRIVILEGE_SET struct instead of a simple uint32 array. It
makes much more sense. Also added a uint32 systemaccount to the GROUP_MAP
struct as some privilege showing in USRMGR.EXE are not real privs but a
bitmask flag. I guess it's an heritage from NT 3.0 ! I could setup an NT
3.1 box to verify, but I'm too lazy (yes I still have my CDs).

Added 3 more LSA calls: SetSystemAccount, AddPrivileges and
RemovePrivileges, we can manage all this privilege from UserManager.

Time to change the NT_USER_TOKEN struct and add checks in all the rpc
functions. Fun, fun, fun.

        J.F.
(This used to be commit 3f0a9ef2b8)
2001-11-29 16:05:05 +00:00