1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

895 Commits

Author SHA1 Message Date
Gerald Carter
73bc5782d4 merge from SAMBA_2_2
(This used to be commit f0226a1d836b69d179a1a2eda79fa26911b78096)
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 83f109c940f30d9b35176540d8bdccbb22ffa3a1)
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 9d8431b04f41dceffe4c45cc969472ee59f7282f)
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 92b36482fd6aa5103c30dad40fe799c07dd2d8d7)
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 d78b74b338df9accd9ad84c56a49fa4f787425e2)
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 c28668068b5a3b3cf3c4317e5fb32ec9957f3e34)
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 d57a1b4629d12a0374cc6d74dfc6f5d4793fcef8)
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 fc043110bc42d56c8686b9b64c46af7be2fd236e)
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 32fa089adead6ff3279172fd36560f4f9e2aeef0)
2002-05-09 19:54:47 +00:00
Shirish Kalele
800185c33f Sync'ing SAMBA_2_2 with HEAD.
(This used to be commit d926cc989690684ec4799ebb3a3a01e8d4173de6)
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 7c02db7c4f0d04b7c45a9c580f3e85f52fa505d5)
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 3a93c5daeca3edd4f319199c8a6068d25cb6750e)
2002-04-23 02:16:48 +00:00
Gerald Carter
dde9187728 merge from SAMBA_2_2
(This used to be commit 5e381abbbfaa15f3ebd89cba3cd9bb6de8e4ff4e)
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 f988a1af034b4cea2412171a257a752192afaece)
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 bc673c42045ceb46d9569bc4d88f9c64897fc85a)
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 0bdd94cb992b40942aaf2e5e0efd2868b4686296)
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 79327a305e20d78ab5ca21d01c39b5f49dc0d632)
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 42ae2334f21402c347aee560f08fd8e730481169)
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 d7c9b00253499da047f30f71660dede3676d40ad)
2002-04-11 02:13:56 +00:00
Gerald Carter
ed72efbd3b merge from 2.2
(This used to be commit 7db47c6647d764739e395948699cf115c4da4c8d)
2002-04-11 02:08:36 +00:00
Gerald Carter
83ece07995 WERROR merge from SAMBA_2_2
(This used to be commit 32dc5dbbfb16cb9fd6f953dbb8148f5228b453a4)
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 16015c07eab2e57fa3771051e3e08fde21757cfa)
2002-04-10 01:04:13 +00:00
Tim Potter
d0d61ba689 Fixed typo in debug statement.
(This used to be commit 49e429a97ff2b6b1889937c998f67d73d35829e1)
2002-04-09 06:19:42 +00:00
Tim Potter
bcb842be57 Fixed some compiler warnings.
(This used to be commit be6f955107429f1431c49c8b45fd623406a9d641)
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 e60c509813a9113cd76135b6ded3018ff04d49f2)
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 b8b88e863e3964231a85b4643a197d6d4d6b8f99)
2002-04-05 22:41:39 +00:00
Tim Potter
510d470e1e Removed unused variable.
(This used to be commit 3e58e9dbabc4e4a1289ff6a43ddbb5de37b02515)
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 f029bd348c8c16a8774c3fb4f7f1d76470c7688f)
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 c6566fa5fadf37a2b133e7be1f13c0de93efab34)
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 f169f3f4df81537426f708d68da44e0fc40ad15e)
2002-03-29 20:37:56 +00:00
Gerald Carter
16c3f6c7d0 merge from SAMBA_2_2
(This used to be commit 606450f3cbe028a526ec6db9cea59d65324c3314)
2002-03-28 16:44:26 +00:00
Gerald Carter
c6cd39d4f7 merge from SAMBA_2_2
(This used to be commit fe099006bbd1103edb5804d70743b211bbc584fb)
2002-03-27 17:39:01 +00:00
Gerald Carter
737423f06e OpenPrinter() merge from 2.2
(This used to be commit 619397cc90549d4602ecddc25ee50eb247c913ee)
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 3b1b8ac43535fb0839c5474fa55bf7150f6cde31)
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 e66bdf1229ba84f64c19e817e2c4081dbbf0bee8)
2002-03-22 06:24:38 +00:00
Andrew Bartlett
93d25c293f Make sure to initaliase SAM_ACCOUNT pointers to NULL, otherwise pdb_init_sam()
fails.

Andrew Bartlett
(This used to be commit 56009ffbaa00259d15f286248a7ab73c55371819)
2002-03-21 03:53:44 +00:00
Gerald Carter
9529a4827c merge from APPLIANCE_HEAD
(This used to be commit 9282aa02d44ae7a7688e8399b397aae35f73ddd1)
2002-03-20 23:09:34 +00:00
Gerald Carter
826f3fb86b resetprinter merge from SAMBA_2_2
(This used to be commit 88d8897e21749f177952b264031aa386bbbeaaeb)
2002-03-20 03:37:27 +00:00
Tim Potter
0cd5dd67ce Merge from app-head:
> Don't put two copies of the server name in construct_printer_info_1()
(This used to be commit 47b1003bc5a069e84cb20df507022e5ff3e93832)
2002-03-20 00:24:35 +00:00
Simo Sorce
050b80356e second step to gain free uid<->rid mapping
we still need to free gid<->rid mapping and few other stuff
(This used to be commit aa4b6f8181f34196a28951264dd8b631a5deef7f)
2002-03-19 13:57:53 +00:00
Jeremy Allison
72eb7dbd40 Merge in JohnR's page count fixes.
Jeremy.
(This used to be commit 2e3133fbe5531b9bbc9bf46a04b27fa58e555f5a)
2002-03-19 02:35:12 +00:00
Simo Sorce
32334bc655 more verbose checking in talloc and util_pw
fixed tdbsam memory corruption (and segfault)
reducing calls to pdb_uid_to_user_rid and countrary to 0 to move to a non alghoritmic rid allocation with some passdb modules.
(This used to be commit 9836af7cd623357feaec07bc49cfb78f0aa01fc3)
2002-03-18 23:57:14 +00:00
Tim Potter
a4cce223d6 Added dos_errstr() function. Not all errors in list yet.
(This used to be commit ddb5753e36b8c5efb48ce5c82c16d970fb8e76b6)
2002-03-17 06:04:15 +00:00
Tim Potter
ab13654dc9 Renamed get_nt_error_msg() to nt_errstr().
(This used to be commit 1f007d3ed41c1b71a89fa6be7d173e67e927c302)
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 5760315c1de4033fdc22684c940f18010010924f)
2002-03-15 08:14:10 +00:00
Tim Potter
8975d3ef70 Backed out enumprinters stuff - leave it for another day.
(This used to be commit d7efc5dd3dd712e7138b5c79eea9756125757175)
2002-03-14 01:48:59 +00:00
Tim Potter
92e59edc41 Merge of enumprinters vs getprinter naming patch from 2.2
(This used to be commit dfd51bc8d0714473880bf50369f7994304c1d83f)
2002-03-12 00:16:03 +00:00
Andrew Tridgell
664fa8e572 return the correct SID and domain name for the samr enum_domain and
lookup_domain calls. We were incorrectly returning the PDCs domain
nameand SID when we are a domain member. We should only do that when
we are the DC
(This used to be commit f56d689497eaa670cbfb214486ba88d5972129db)
2002-03-10 01:45:49 +00:00
Gerald Carter
8fa6b34e08 merge from 2.2
(This used to be commit 66eb969ade0dfde355df3e308dccbc9522087eef)
2002-03-08 22:07:18 +00:00
Gerald Carter
c3e813945c merge from 2.2
(This used to be commit 4960692e958c986ca7f71e091333300310b0e0b2)
2002-03-08 21:57:53 +00:00