1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

107 Commits

Author SHA1 Message Date
Gerald Carter
c1b9243c28 r5165: BUG 2295: always use get_local_machine_name() rather than digging in the gloval variable 'local_machine'
(This used to be commit 6a6e4af46a)
2007-10-10 10:55:31 -05:00
Günther Deschner
1ed62fde09 r4847: Hand over a acb_mask to pdb_setsampwent in load_sampwd_entries().
This allows the ldap-backend to search much more effeciently. Machines
will be searched in the ldap_machine_suffix and users in the
ldap_users_suffix. (Note that we already use the ldap_group_suffix in
ldapsam_setsamgrent for quite some time).

Using the specific ldap-bases becomes notably important in large
domains: On my testmachine "net rpc trustdom list" has to search through
40k accounts just to list 3 interdomain-trust-accounts, similiar effects
show up the non-user query_dispinfo-calls, etc.

Also renamed all_machines to only_machines in load_sampwd_entries()
since that reflects better what is really meant.

Guenther
(This used to be commit 6394257cc7)
2007-10-10 10:53:59 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Gerald Carter
3bd3be97dc r4083: consolidate printer searches to use find_service rather than for loops
(This used to be commit 12440744ba)
2007-10-10 10:53:31 -05:00
Volker Lendecke
54024f5826 r3848: Fix for bug 2057. Only partially applied the patch, the second part seems not
necessary.

I'm using gcc 3.4.1, this does not detect the possibly uninitialized
variable. Does anybody know how to get 3.4.1 to warn me?

Volker
(This used to be commit 8b6f8f93a0)
2007-10-10 10:53:20 -05:00
Volker Lendecke
0c639097cf r3824: Fix crash in api_RNetShareEnum. ServicePtrs[] may contain invalid
entries. Happened after rev3708 removed non-existing cups printers.

Volker
(This used to be commit 60998d9d2f)
2007-10-10 10:53:19 -05:00
Volker Lendecke
f9e87b9ba6 r3705: Nobody has commented, so I'll take this as an ack...
abartlet, I'd like to ask you to take a severe look at this!

We have solved the problem to find the global groups a user is in twice: Once
in auth_util.c and another time for the corresponding samr call. The attached
patch unifies these and sends them through the passdb backend (new function
pdb_enum_group_memberships). Thus it gives pdb_ldap.c the chance to further
optimize the corresponding call if the samba and posix accounts are unified by
issuing a specialized ldap query.

The parameter to activate this ldapsam behaviour is

ldapsam:trusted = yes

Volker
(This used to be commit b94838aff1)
2007-10-10 10:53:15 -05:00
Gerald Carter
a4fab4d51a r3682: fix seg fault in lanman printing code caused by uninitialized variable
(This used to be commit c52e663c4a)
2007-10-10 10:53:13 -05:00
Gerald Carter
c53e6401eb r3049: fixing some calls in the printing code to stanard_sub_basic(); fix standard_sub_snum() to use the current user's gid; add some (snum == -1) checks to standard_sub_advanced()
(This used to be commit 8c3fd1908d)
2007-10-10 10:52:59 -05:00
Gerald Carter
31441aaa13 r2768: BUG 1519: save the hostname used in the open_printer_ex() for later reuse when filling in the spolss replies (also gets rid of get_called_name()
(This used to be commit 57db8ca91f)
2007-10-10 10:52:52 -05:00
Jim McDonough
2d5bf9ec40 r2697: Fix for bugzilla #1732, patch by Satoh Fumiyasu, fumiya@samba.gr.jp
Limit share names returned by RAP based on windows character width, not unix
character width.
(This used to be commit 5d57058d91)
2007-10-10 10:52:49 -05:00
Jeremy Allison
0823cb3517 r931: Ensure we push 16 bytes (including null termination)
not 15.
(This used to be commit 1d3fd1a58e)
2007-10-10 10:51:50 -05:00
Jeremy Allison
a0cefa62e6 Merge of Chris's fix.
Jeremy.
(This used to be commit 1a7714ea32)
2004-01-28 23:41:55 +00:00
Gerald Carter
c39f5fea4a more access fixes for group enumeration in LDAP; bug 281
(This used to be commit 68283407e0)
2003-11-24 17:31:38 +00:00
Jeremy Allison
472df57e7b Missing UNIX -> DOS codepage conversion. Fix from Alexander Bokovoy <a.bokovoy@sam-solutions.net>.
Jeremy.
(This used to be commit 8b9b635bd2)
2003-10-27 20:09:15 +00:00
Jeremy Allison
c19e1d51e0 Ensure error code path doesn't free unmalloced memory. Bug #628.
Jeremy.
(This used to be commit d817716519)
2003-10-16 00:45:17 +00:00
Jeremy Allison
3c1c2ddf9a Fix UNIX passwd sync properly. I've finally understood
the as_root parameter has bugger all to do with who you *currently*
are, and everything to do with who you run the script as. Doh !
Jeremy.
(This used to be commit 17a241d9f7)
2003-09-04 18:02:17 +00:00
Gerald Carter
49e66508f2 Fix BUG #314: api_netUserGetGRoups() was failing prematurely
(also fixed the call to return the real groups and not a mocked
  up list)

Fixed simple compiler warning in srv_lsa_ds.c
(This used to be commit 6b0e38e01a)
2003-08-19 04:17:21 +00:00
Herb Lewis
062f89bc28 get rid of some sompiler warnings on IRIX
(This used to be commit a6a39c61e8)
2003-08-15 01:42:30 +00:00
Jeremy Allison
ba12e6bb5f Wrap calls to change_oem_password() in become_root()/unbecome_root() pairs
to allow UNIX password change scripts to work correctly. This is safe as
the old password has been checked as correct before invoking this.
Jeremy.
(This used to be commit 1734d43eb5)
2003-07-31 01:33:44 +00:00
Jeremy Allison
ce72beb2b5 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
(This used to be commit ff222716a0)
2003-07-03 19:11:31 +00:00
Simo Sorce
75a5c0b307 Ok, this patch removes the privilege stuff we had in, unused, for some time.
The code was nice, but put in the wrong place (group mapping) and not
supported by most of the code, thus useless.

We will put back most of the code when our infrastructure will be changed
so that privileges actually really make sense to be set.

This is a first patch of a set to enhance all our mapping code cleaness and
stability towards a sane next beta for 3.0 code base

Simo.
(This used to be commit e341e7c49f)
2003-06-18 15:24:10 +00:00
Gerald Carter
23b3b29eec Progress on CR 601
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.

Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
(This used to be commit 31272d3b6b)
2003-02-25 20:53:53 +00:00
Andrew Bartlett
27b7e51a3c Merge from HEAD:
- fstring/pstring mixups
 - the detection code that found them (disabled)
 - a bit of whitespace
 - a static

Andrew Bartlett
(This used to be commit 9b70fa868e)
2003-01-14 08:53:59 +00:00
Andrew Bartlett
61b65aad13 Merge from HEAD - eliminated unused arguments.
Andrew Bartlett
(This used to be commit 6dd474d845)
2003-01-14 07:49:15 +00:00
Andrew Bartlett
e3ed8eaa2f Merge from HEAD - move user password changes into the NTSTATUS era, and add
suppport for the 'min password age' and 'min passwd len' concepts.
(This used to be commit d9417b08d1)
2003-01-04 08:45:17 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f947)
2003-01-03 08:28:12 +00:00
Andrew Bartlett
c64d762997 Updates from HEAD:
- const for PACKS() in lanman.c
 - change auth to 'account before password'
 - add help to net rpc {vampire,samsync}
 - configure updates for sun workshop cc
 - become_root() around pdb_ calls in auth_util for guest login.

Andrew Bartlett
(This used to be commit 43e90eb6e3)
2002-11-15 21:43:57 +00:00
Jeremy Allison
2f194322d4 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit f755711df8)
2002-11-12 23:20:50 +00:00
Andrew Bartlett
6d7195d1d7 Merge passdb from HEAD -> 3.0
The work here includes:
 - metze' set/changed patch, which avoids making changes to ldap on unmodified
attributes.

 - volker's group mapping in passdb patch

 - volker's samsync stuff
 - volkers SAMR changes.

 - mezte's connection caching patch

 - my recent changes (fix magic root check, ldap ssl)

Andrew Bartlett
(This used to be commit 2044d60bbe)
2002-11-02 03:47:48 +00:00
Andrew Bartlett
56dc17378b Merges from HEAD:
- off-by-one fix - fixes warnings about insufficent space in buffer.
- fix a memleak in uid.c - we forgot to free() the allocated struct.
(This used to be commit b8951a6551)
2002-11-01 22:17:19 +00:00
Gerald Carter
6ce3e3b10c removed the following parameters
* postscript
  * printer driver
  * printer driver location
  * printer driver file

also removed the get_a_printer_driver_9x_compatible() function
(This used to be commit 743f2b8025)
2002-10-21 20:11:12 +00:00
Jelmer Vernooij
127e77e6e3 Sync 3.0 branch with head
(This used to be commit 42615b945e)
2002-08-17 15:27:10 +00:00
Andrew Tridgell
b0b28531c8 more bug updates from head
(This used to be commit 8b769bf5bb)
2002-07-15 11:16:26 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +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
Andrew Bartlett
14c6277840 This should fix up the level 0 'convert_string' debug messages that we have
been seing since the unicode conversion.  It looks like a simple oversight in
the move away from StrnCpy (which takes amount of space -1 as an arg) to
push_ascii etc which take the absolute amount of space.

Andrew Bartlett
(This used to be commit 4447c6bd4d)
2002-02-27 13:18:51 +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
7c05db4803 Oops...
(This used to be commit 9b63a87223)
2002-01-23 13:44:32 +00:00
Andrew Bartlett
44dd648a64 Change the order of this a bit - as unix password change can fail.
This due for abstraction into chgpasswd.c shortly.

Andrew Bartlett
(This used to be commit 635942ae21)
2002-01-23 11:57:11 +00:00
Andrew Bartlett
a03b5e3864 One less Get_Pwnam_Modify call!
(the passdb backend is case-insensitive, so there isn't any point to this).

Andrew Bartlett
(This used to be commit 5e868b4033)
2002-01-21 00:32:26 +00:00
Andrew Bartlett
f46db61068 Kill off the old varient of 'check_plaintext_password' (new version just
committed in auth/auth_compat.c and use the new version to make the plaintext
password change slightly sane...  (Needs testing).

Andrew Bartlett
(This used to be commit 996d0cd89c)
2002-01-20 09:00:32 +00:00
Jeremy Allison
d6823366b8 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
(This used to be commit 01ff6ce496)
2002-01-11 19:10:25 +00:00
Martin Pool
bf65820af2 Add an output parameter to message_send_all that says how many
messages were sent, so you know how many replies to expect.

Const and doc religion.
(This used to be commit 22e510ea0d)
2001-12-21 00:37:49 +00:00
Martin Pool
f741f65673 Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da)
2001-11-19 02:49:53 +00:00
Andrew Bartlett
2038649e51 This commit is number 3 of 4.
In particular this commit focuses on:

Changing the Get_Pwnam code so that it can work in a const-enforced
environment.

While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.

----

These changes allow for 'const' in the Samba tree.

There are a number of good reasons to do this:

	- I want to allow the SAM_ACCOUNT structure to move from wasteful
	pstrings and fstrings to  allocated strings.  We can't do that if
	people are modifying these outputs, as they may well make
	assumptions about getting pstrings and fstrings

	- I want --with-pam_smbpass to compile with a slightly sane
	volume of warnings, currently its  pretty bad, even in 2.2
	where is compiles at all.

	- Tridge assures me that he no longer opposes 'const religion'
	based on the ability to  #define const the problem away.

	- Changed Get_Pwnam(x,y) into two variants (so that the const
	parameter can work correctly): - Get_Pwnam(const x) and
	Get_Pwnam_Modify(x).

	- Reworked smbd/chgpasswd.c to work with these mods, passing
	around a 'struct passwd' rather  than the modified username
(This used to be commit e7634f81c5)
2001-10-29 07:28:32 +00:00
Jim McDonough
a443dea5d1 server support for RAP session list function
(This used to be commit d42c28fbad)
2001-10-22 18:14:42 +00:00
Jim McDonough
e5868e1f57 Use asprintf, do bounds check, better rc logic
(This used to be commit 6a734158d9)
2001-10-20 21:50:51 +00:00
Jim McDonough
d1006a96d0 Add RAP net share add support
(This used to be commit a70bc077a1)
2001-10-19 19:13:11 +00:00