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

10 Commits

Author SHA1 Message Date
Joseph Sutton
fdbee5e074 CVE-2020-25717: nsswitch/nsstest.c: Lower 'non existent uid' to make room for new accounts
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14901

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-11-15 18:10:28 +00:00
Khem Raj
6e496aa363 nsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h
glibc 2.32 will define these varibles [1] which results in conflicts
with these static function names, therefore prefix these function names
with samba_ to avoid it

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=499a92df8b9fc64a054cf3b7f728f8967fc1da7d

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <npower@samba.org>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Tue Jul 28 10:52:00 UTC 2020 on sn-devel-184
2020-07-28 10:52:00 +00:00
Noel Power
f3f79a267e nsswitch: cppcheck: Fix memleakOnRealloc errors
Fixes the following errors

nsswitch/nsstest.c:192: error: memleakOnRealloc: Common realloc mistake: 'buf' nulled but not freed upon failure <--[cppcheck]
nsswitch/nsstest.c:230: error: memleakOnRealloc: Common realloc mistake: 'buf' nulled but not freed upon failure <--[cppcheck]
nsswitch/nsstest.c:269: error: memleakOnRealloc: Common realloc mistake: 'buf' nulled but not freed upon failure <--[cppcheck]

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-06-04 22:13:07 +00:00
Stefan Metzmacher
da784305e7 nsswitch: fix double free errors in nsstest.c
We need to zero out static pointers on free.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13283

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-21 14:19:17 +01:00
Bill Parker
9b58da9866 Fix bug 10025 - Lack of Sanity Checking in calls to malloc()/calloc().
In reviewing various files in Samba-4.0.7, I found a number
of instances where malloc()/calloc() were called without the
checking the return value for a value of NULL, which would
indicate failure.

(NB. The changes needed to ccan, iniparser, popt and heimdal
will be reported upstream, not patched inside Samba).

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Source <idra@samba.org>
2013-07-17 16:12:19 -07:00
Michael Adam
6977cb34ae nsstest: fix use of a non-existent word (existant) 2012-06-12 07:21:41 +02:00
Andrew Bartlett
f260596206 nsstest: Allocate the correct sized buffer for initgroups
Found by chance due to a re-order of the tests to start s3member
earlier and chasing down a malloc Abort into a valgrind error.  Only
happens when a user has more than 4 groups.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Feb 20 05:23:04 CET 2012 on sn-devel-104
2012-02-20 05:23:04 +01:00
Stefan Metzmacher
ce113ea029 nsswitch: remove includes.h dependency from nsstest.c
metze
2011-01-04 08:43:42 +01:00
Günther Deschner
ab01d6139f nsstest: no need for two copies of the same tool.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 20 15:05:34 UTC 2010 on sn-devel-104
2010-10-20 15:05:33 +00:00
Kai Blin
5ee0392a55 nsswitch: Move nsswitch files from source4 to top level nsswitch dir 2008-12-16 13:03:05 +01:00