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

910 Commits

Author SHA1 Message Date
Gerald Carter
366a649d04 merge from 2.2
(This used to be commit 30a0e72572)
2002-06-11 03:22:32 +00:00
Andrew Bartlett
ae6bdb2cd5 This (hopefully) fixes a bug reported by Kai Krueger <kai@kruegernetz.de>
involving the use of lp_winbind_gid() without checking if they have been
set.

Also revert the 'clashing user' check back to a Get_Pwnam() - I probably should
never have changed it.

Andrew Bartlett
(This used to be commit 1d6ba40558)
2002-06-09 08:45:35 +00:00
Andrew Bartlett
b0ffabdcca Globally replace 'global_sam_sid' with get_global_sam_sid(), a self
initialising function.  This patch thanks to the work of
"Stefan (metze) Metzmacher" <metze@metzemix.de>

This is partly to enable the transition to SIDs in the the passdb.

Andrew Bartlett
(This used to be commit 96afea638e)
2002-06-07 14:33:33 +00:00
Tim Potter
89e9f7530a Fix compile error - doh!
(This used to be commit e80e663706)
2002-06-06 01:34:04 +00:00
Tim Potter
617a551c42 Moved some notify related constants into srv_spoolss_nt.c since
they're only used there.

Added a PRINTER_NOTIFY_VERSION constant.
(This used to be commit 9d3933a592)
2002-06-06 01:19:56 +00:00
Tim Potter
bfa2dfaba8 Fixed out of date comment for _spoolss_rffpcnex()
(This used to be commit 7d9b8c58a6)
2002-06-06 00:59:52 +00:00
Andrew Bartlett
ebe58d8569 Update the SAMR pipe for more use of NTSTATUS and to talloc the stored list of
users/groups for better memory accounting.

Andrew Bartlett
(This used to be commit fe7c5efe91)
2002-06-04 23:10:02 +00:00
Jim McDonough
e142b4b324 Fix netsessenum RPC. Correctly respond with as much info as we can.
(This used to be commit c8781a3fda)
2002-06-03 22:14:43 +00:00
Tim Potter
c3bd192703 Restrict anonymous checks for the SAMR pipe. This is done by
returning access denied for a SAMR_CONNECT by an anonymous user which
seems to be the way 2K does it rather than blocking individual RPC
calls like NT.

Also checked is the SAMR_GET_DOM_PWINFO rpc which for some reason
doesn't require a policy handle to return information.  No idea what
it's actually used.
(This used to be commit 40c68fa85c)
2002-06-03 03:02:39 +00:00
Tim Potter
d706b5dc55 Move restrict anonymous checks into a general function called
pipe_access_check().  Eventually this can take a security descriptor
as an argument as well.
(This used to be commit 8bbdc674af)
2002-06-03 02:55:16 +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
Tim Potter
c3fb0cd9ed Return access denied for net_share_enum when restrict anonymous > 0
(This used to be commit 5df1aa9f20)
2002-05-31 00:48:40 +00:00
Tim Potter
43b35364ff Cleaned up srvsvc constants a bit.
(This used to be commit ca61f68d5c)
2002-05-29 00:49:26 +00:00
Simo Sorce
a27a0e01e2 change: pdb_getsampwrid() ->pdb_getsampwsid()
passdb interface change, now the passdb modules will be asked for SID not for rid, the modules have been updated with a passthrough function that calls the old getsampwrid() functions.

srv_samr_nt.c functions that made use of the pdb_getsampwrid funcion has been updated to use the SID one.
(This used to be commit f5c6496c33)
2002-05-26 19:11:52 +00:00
Andrew Bartlett
20efe2fe6c Clean up a few unused functions, add a bit of static etc.
Importantly:

The removal of the silly 'delete user script' behaviour when secuity=domain.

I have left the name the same - as it still does the (previously documented,
but not in smb.conf(5)) sane behaviour of deleting users on request.

When we decide what to do with the 'add user' functionality, we might
rename it.

Andrew Bartlett
(This used to be commit cdcfe3671e)
2002-05-25 07:37:44 +00:00
Gerald Carter
73bc5782d4 merge from SAMBA_2_2
(This used to be commit f0226a1d83)
2002-05-24 19:17:27 +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
Andrew Bartlett
b87eee9836 Add a bit more const, and kill of (finally!) sys_getpwnam and sys_getpwuid.
These might be reimplmented as simple pass-through functions, but all users
really should be doing 'getpwnam_alloc' or 'getpwuid_alloc' to ensure that
there are not shared static buffers.

I don't beleive we actually need a getpw*() cache inside samba - if we do
then I think we should look at our code design first.

(some of these changes are for platforms I don't have access to, but
they look sane)

Andrew Bartlett
(This used to be commit 9d8431b04f)
2002-05-22 12:44:45 +00:00
Tim Potter
b8618865df Patch to only set SV_TYPE_PRINTQ_SERVER in default_server_announce if a
print share is exported.  Needs some more testing.
(This used to be commit 92b36482fd)
2002-05-19 12:06:45 +00:00
Andrew Bartlett
d4dac178df Passdb:
Kill off the silly code that attempts to do NT -> Unix username mapping.
This is done well before here, no need to repeat it.

Add some small fixes and extra debugs, trying to track down current build
farm failures.

pdb_unix:

When 'updating' a pdb_unix account, instead add it to the default passdb.
This means that you don't need to specify '-a' to smbpasswd any more when
messing with an existing unix user, the account is simply 'upgraded'.

The idea here is that these accounts are just as 'real' as any other, they
just don't have the extra attributes an smbpasswd file does.

I'm open for debate on the pdb_unix issue, and will remove it if given
good reason.  (without this, an attempt to add an account already in
pdb_unix to smbpasswd would fail, as it would fail to update pdb_unix).

rpc_server/srv_netlog_nt.c

Change a couple of things around, so as to show the client workstation etc.

WRONG_PASSWORD is certainly not the right default error.  Try ACCESS_DENIED
for now.

Andrew Bartlett
(This used to be commit d78b74b338)
2002-05-18 09:06:23 +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
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
Jeremy Allison
2586abb599 Fix the bug that refused to allow IPC$ connection to be idled if a pipe
was open - we now only refuse to allow IPC$ connection to be idled if a
handle is open on a pipe.
Jeremy.
(This used to be commit fc043110bc)
2002-05-10 01:15:36 +00:00
Jeremy Allison
059da8fb3b Merged in printing fixes... There were many missing !
Jeremy
(This used to be commit 32fa089ade)
2002-05-09 19:54:47 +00:00
Shirish Kalele
800185c33f Sync'ing SAMBA_2_2 with HEAD.
(This used to be commit d926cc9896)
2002-05-09 04:43:05 +00:00
Jeremy Allison
fd99accdb5 Fix my stupid compile bug in num_files_open.
Jeremy.
(This used to be commit 7c02db7c4f)
2002-04-23 18:34:52 +00:00
Jeremy Allison
569fa9b3dd Fix for a bug Jerry found with printing where a smbd connection may
be idled even with an open pipe.
Jeremy.
(This used to be commit 3a93c5daec)
2002-04-23 02:16:48 +00:00
Gerald Carter
dde9187728 merge from SAMBA_2_2
(This used to be commit 5e381abbbf)
2002-04-22 18:47:36 +00:00
Jeremy Allison
e9be6c4db4 Fix found by Li Shao @ HP - XP clients don't bother to set the devmode_ptr
in the SetPrinter() call - they send it in the devmode_ctr instead.
Jeremy.
(This used to be commit f988a1af03)
2002-04-18 01:48:45 +00:00
Tim Potter
1667a82106 Merge of print server permission handling fixes from HEAD.
Unit tests rock!
(This used to be commit bc673c4204)
2002-04-15 04:07:13 +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
Andrew Bartlett
4c0399915c Much better support for both non-algorithic RIDs (where the RID is stored in
the passdb) and RIDs not in the passdb, due to being NIS users etc.

The main fix here is to add become_root()/unbecome_root() at critical places.

This (finally) fixes the bug where you could not see local users's names
in a file's security properties as non-root.  Tested.

The similar bug in uid_to_sid is also fixed, but is not (yet) Tested.

Andrew Bartlett
(This used to be commit 79327a305e)
2002-04-11 23:43:40 +00:00
Jeremy Allison
8e2f3ec1d1 Correctly emulate NT in printer handle opening access rights.
Jeremy.
(This used to be commit 42ae2334f2)
2002-04-11 02:59:31 +00:00
Gerald Carter
d3fa6d5de6 s/werror_str/dos_errstr/g to fix compile
(This used to be commit d7c9b00253)
2002-04-11 02:13:56 +00:00
Gerald Carter
ed72efbd3b merge from 2.2
(This used to be commit 7db47c6647)
2002-04-11 02:08:36 +00:00
Gerald Carter
83ece07995 WERROR merge from SAMBA_2_2
(This used to be commit 32dc5dbbfb)
2002-04-11 01:50:18 +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
d0d61ba689 Fixed typo in debug statement.
(This used to be commit 49e429a97f)
2002-04-09 06:19:42 +00:00
Tim Potter
bcb842be57 Fixed some compiler warnings.
(This used to be commit be6f955107)
2002-04-09 05:59:46 +00:00
Andrew Bartlett
5cdc9e1685 Add a become_root()/unbecome_root() pair to allow acces to the passdb for
SID lookup.  This fixes a bug where SIDs (rather than names) are displayed in windows ACL lists
(This used to be commit e60c509813)
2002-04-09 04:59:34 +00:00
Jeremy Allison
ca43b0da79 Fix Gerry bug - MajorVersion should be 2 not 3.
Jeremy.
(This used to be commit b8b88e863e)
2002-04-05 22:41:39 +00:00
Tim Potter
510d470e1e Removed unused variable.
(This used to be commit 3e58e9dbab)
2002-03-31 06:00:37 +00:00
Jeremy Allison
846670fa0e Hack to share pipe handles between lsa and samr pipes as NT4.x usrmgr
insists on re-using an lsa handle opened on a pipe then closed - this
keeps them around so long as a samr pipe is also open.
Jeremy.
(This used to be commit f029bd348c)
2002-03-30 00:45:26 +00:00
Jeremy Allison
a5dc8cb591 Don't core dump listing thousands of users in usrmgr.
Jeremy.
(This used to be commit c6566fa5fa)
2002-03-29 21:50:21 +00:00
Jeremy Allison
9a8b5fdd37 Ensure we return a parseable value if invalid handle given.
Jeremy.
(This used to be commit f169f3f4df)
2002-03-29 20:37:56 +00:00
Gerald Carter
16c3f6c7d0 merge from SAMBA_2_2
(This used to be commit 606450f3cb)
2002-03-28 16:44:26 +00:00
Gerald Carter
c6cd39d4f7 merge from SAMBA_2_2
(This used to be commit fe099006bb)
2002-03-27 17:39:01 +00:00
Gerald Carter
737423f06e OpenPrinter() merge from 2.2
(This used to be commit 619397cc90)
2002-03-26 03:15:30 +00:00
Jeremy Allison
c90cd26e94 Fix the mp3 rename bug - also tidy up our open code and remove the special
cases for rename and unlink. Had to add desired_access into the share mode record.
Jeremy.
(This used to be commit 3b1b8ac435)
2002-03-23 02:57:44 +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