1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

632 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