1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

640 Commits

Author SHA1 Message Date
Andrew Bartlett
8196ee908e Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had a
distinction between uchar and char).

Lots of const etc.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Tridgell
04de6bbc80 fixed a number of real bugs found by warnings on the 64 bit irix compiler 0001-01-01 00:00:00 +00:00
Jeremy Allison
175d43980e The changes in make_sec_desc to make us match W2K broke the marshalling/unmarshalling of
security descriptors. We need to calculate the maximum offset and set the offset
back after reading/writing every field in the SEC_DESC.
This was *nasty* to find....
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
7207662504 all that is left to do is to actually perform the
file deletion now.  I have the file list.
One more commit should do it.
0001-01-01 00:00:00 +00:00
Gerald Carter
f57640720e 8-byte alignment needed for beginning driver_info_level_6.
Verified by looking at NT4 and 2k servers.  First time
for everything I guess.
0001-01-01 00:00:00 +00:00
Gerald Carter
b0f178f452 fixup ADDPRINTERDRIVEREX some more. unknown uint32 for now. 0001-01-01 00:00:00 +00:00
Gerald Carter
55fbfd02ba added parsing routines for SPOOLSS_ADDPRINTERDRIVEREX and
SPOOLSS_DELETEPRINTERDRIVEREX.  Ran them through some testing.
I know I'm off by 2 x uint32's in the former RPC.
0001-01-01 00:00:00 +00:00
Gerald Carter
d675974d0c * basic implementation of SPOOLSS_DELETEPRINTERDATAEX and
SPOOLSS_DELETEPRINTERKEY
* stub funnctions for SPOOLSS_ADDPRINTERDRIVEREX and
  SPOOLSS_DELETEPRINTERDRIVEREX
0001-01-01 00:00:00 +00:00
Gerald Carter
2a68e4529a fixed the geyed out registry keys. Stupid typo on my part.
Now on to plug in the printing tdbs to the registry view....

jerry
0001-01-01 00:00:00 +00:00
Andrew Bartlett
0c4afe075a 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
0001-01-01 00:00:00 +00:00
Gerald Carter
542d3c93a9 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....
0001-01-01 00:00:00 +00:00
Andrew Bartlett
5a2a6f1ba3 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
0001-01-01 00:00:00 +00:00
Andrew Tridgell
80c3c68de2 fixed our winreg parsing to handle a diifferent form given to us by
WinXP. This fixes setting security decsriptors from XP Professional.
0001-01-01 00:00:00 +00:00
Tim Potter
daf4c6a013 Merge of constant renames from APPLIANCE_HEAD. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
91ad9041e9 used findstatic.pl to make some variables static and remove some dead
code
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
Gerald Carter
fc3770f281 a null grp_sid should have a 0 offset. Also removed a few more unnecessary
prs_align() for sec_desc.
0001-01-01 00:00:00 +00:00
Gerald Carter
d8cf54399d merge from APP_HEAD 0001-01-01 00:00:00 +00:00
Jeremy Allison
4ed134426d Typo...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
374182a9ba Added prs_align_uint16 for SD aligns.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
f471c880db sync with the sec_desc parsing fix from APP_HEAD. I will probably need
to revisit this some.
0001-01-01 00:00:00 +00:00
Gerald Carter
f753676286 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
0001-01-01 00:00:00 +00:00
Simo Sorce
897e64d2e0 more debug classess activated 0001-01-01 00:00:00 +00:00
Andrew Bartlett
a2c791c0bb Add a touch of const to this - helps with some yet-to-be-commited changes 0001-01-01 00:00:00 +00:00
Jeremy Allison
64af68924b Merge of Jerry's fix from 2.2.
Jeremy.
0001-01-01 00:00:00 +00:00
Jim McDonough
2b4a5b5666 Add user name to netsessenum RPC to stop 1783 messages. Also fix where username was sent as machine name. 0001-01-01 00:00:00 +00:00
Tim Potter
2e25b5c309 Fixed bogus alignment in unmarshalling of SAMR_GET_DOM_PWINFO reply. 0001-01-01 00:00:00 +00:00
Jim McDonough
4b18a94590 Add rpc for file close, expand file enum to take username 0001-01-01 00:00:00 +00:00
Jim McDonough
4e31716385 Add fns for netshareadd and netsharedel rpcs 0001-01-01 00:00:00 +00:00
Jim McDonough
b3fea72ee9 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.
0001-01-01 00:00:00 +00:00
Jim McDonough
8fc3dba8bd netfileenum was missing the username filter. 0001-01-01 00:00:00 +00:00
Tim Potter
0c65978ed0 Added netremotetod to try and figure out which srvsvc commands are denied
when using restrictanonymous.
0001-01-01 00:00:00 +00:00
Tim Potter
c7214baa05 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
83f109c940 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
0001-01-01 00:00:00 +00:00
Tim Potter
bbad6c6678 OK that last commit was incorrect - this call is parsed properly. I only
imagined it wasn't!
0001-01-01 00:00:00 +00:00
Tim Potter
2429c4cc79 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.
0001-01-01 00:00:00 +00:00
Tim Potter
1fb8e2b3a0 No need to pass a fstring in make_spoolss_q_enumprinters() 0001-01-01 00:00:00 +00:00
Andrew Bartlett
c28668068b 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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
e5b4331ffa 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?)
0001-01-01 00:00:00 +00:00
Andrew Bartlett
3e93b216dd Add a touch of const 0001-01-01 00:00:00 +00:00
Andrew Bartlett
d57a1b4629 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
0001-01-01 00:00:00 +00:00
Tim Potter
217ae50acd Added deleteprinterdata client rpc. 0001-01-01 00:00:00 +00:00
Tim Potter
a1934a7a8e Added writeprinter rpc command. 0001-01-01 00:00:00 +00:00
Tim Potter
89633a1d87 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
2676be4e41 compile fix merge from SAMBA_2_2 0001-01-01 00:00:00 +00:00
Tim Potter
8e09e94546 Support for client side startdocprinter.
Set useless_ptr = 1 for marshalling smb_io_doc_info() so it actually works.
0001-01-01 00:00:00 +00:00
Gerald Carter
0420098c47 misc merge from SAMBA_2_2 0001-01-01 00:00:00 +00:00
Gerald Carter
59e49a79b4 devmode parsing merge from SAMBA_2_2 0001-01-01 00:00:00 +00:00
Tim Potter
d091a9d300 Added client side spoolss rpc commands for startpageprinter,
endpageprinter, setjob and getjob.
0001-01-01 00:00:00 +00:00
Tim Potter
4d715cb682 Grr - the removal of the nnecessary prs_align() from relative unicode
strings didn't make it across into HEAD.
0001-01-01 00:00:00 +00:00