[SCM] Samba Shared Repository - branch v3-4-stable updated -
release-3-4-0pre1-263-g491c57d
Karolin Seeger
kseeger at samba.org
Tue Jun 2 07:31:13 GMT 2009
The branch, v3-4-stable has been updated
via 491c57da747527dc3c5638a007689b0b04645fb9 (commit)
via 6f95595008bf6e6365ad372ad4b63566237df225 (commit)
via bc70ee9615790f7069848ff5c63c09796fcc1d83 (commit)
via 260a746c8765bb63a2c9073a6dc17bc504003191 (commit)
via e9963e1c4ed5daaf02734af1e0fdf5c4c9c14804 (commit)
via f4cecbf117686830b542cd03c6a809cc1047d21c (commit)
via 110b458d18c2760e9d6b1fe790eb23783e1dd510 (commit)
via da45972d859499da1296d5b915895d7d46015cb5 (commit)
from 533457a3a8cbabcc84af89a905c2513852a409b5 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-stable
- Log -----------------------------------------------------------------
commit 491c57da747527dc3c5638a007689b0b04645fb9
Author: Karolin Seeger <kseeger at samba.org>
Date: Tue Jun 2 09:28:49 2009 +0200
s3/WHATSNEW: Update changes since 3.4.0pre1.
Karolin
(cherry picked from commit 36b8bbb0328bbcccdc6e9fe99ae4933c916885da)
commit 6f95595008bf6e6365ad372ad4b63566237df225
Author: Kumar Thangavelu <Kumar.Thangavelu at riverbed.com>
Date: Fri May 29 11:27:38 2009 +0200
s3/getdcname: Fix 'net' crash.
'net' command crashed when attempting to join a
domain. This occurred in a very specific case where
the DC had multiple IPs and one of the IPs was invalid.
Signed-off-by: Volker Lendecke <vl at samba.org>
(cherry picked from commit 795692bd9546b91647ea96cc43ebb5c8efc0aaf2)
(cherry picked from commit 1b401a1b5374d037757954bb023287fa57b1c9b9)
commit bc70ee9615790f7069848ff5c63c09796fcc1d83
Author: Günther Deschner <gd at samba.org>
Date: Thu May 28 11:51:46 2009 +0200
nss_wrapper: fix nss_wrapper build for solaris.
Guenther
(cherry picked from commit 136b2a3eb21eda28e7a18547751ee20f097e7492)
(cherry picked from commit 0677a068dce0bd1cc76fc3ea13322e57b1d1c3af)
commit 260a746c8765bb63a2c9073a6dc17bc504003191
Author: Günther Deschner <gd at samba.org>
Date: Thu May 28 10:53:53 2009 +0200
nss_wrapper: remove re-structuring leftovers (unused variables).
Guenther
(cherry picked from commit 37e4c92b383397a2c77db7e5d8adf2fa4a24d398)
(cherry picked from commit db2fa7179db37d5cb6475006b88ff648636ac602)
commit e9963e1c4ed5daaf02734af1e0fdf5c4c9c14804
Author: Günther Deschner <gd at samba.org>
Date: Thu May 28 10:40:22 2009 +0200
s3-selftest: use nss_wrapper.pl as "add user to group" and "delete user from group" script.
Guenther
(cherry picked from commit 7a5475f098c6a20f867adc081ca455e6c393755b)
(cherry picked from commit 1a129e79baac7c7ebbc63c9e077ede4b123cf390)
commit f4cecbf117686830b542cd03c6a809cc1047d21c
Author: Günther Deschner <gd at samba.org>
Date: Thu May 28 10:39:37 2009 +0200
nss_wrapper: support member add and delete for groups in nss_wrapper.pl.
Guenther
(cherry picked from commit ebf8df35c9583619a012e85964f2ad5187a199fe)
(cherry picked from commit 0f93abf8222672e5f7c09fd0b55337de82e9569f)
commit 110b458d18c2760e9d6b1fe790eb23783e1dd510
Author: Günther Deschner <gd at samba.org>
Date: Wed May 27 22:35:14 2009 +0200
nss_wrapper: split out passwd and group paths in nss_wrapper.pl.
Guenther
(cherry picked from commit 7bb9e08d7e75be88a9788563f053794554f680a8)
(cherry picked from commit 8bda8295ffc6fa9a9776f821b11075b6bac7a80d)
commit da45972d859499da1296d5b915895d7d46015cb5
Author: Günther Deschner <gd at samba.org>
Date: Wed May 27 18:38:10 2009 +0200
nss_wrapper: restructure nwrap calls.
Guenther
(cherry picked from commit ec9a0917055d731aa95e2fea2045445f9945b74d)
(cherry picked from commit bf255ec2a81f2f44a9ef0379beaec0a51bbfb000)
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 5 +
lib/nss_wrapper/nss_wrapper.c | 242 ++++++++++++++++++++++++++------------
lib/nss_wrapper/nss_wrapper.pl | 197 ++++++++++++++++++++++++++-----
selftest/target/Samba3.pm | 12 +-
source3/libsmb/dsgetdcname.c | 4 +-
source3/script/tests/selftest.sh | 12 +-
6 files changed, 353 insertions(+), 119 deletions(-)
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 9809072..35e52c5 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -302,6 +302,7 @@ o Günther Deschner <gd at samba.org>
* Add NetShutdownInit and NetShutdownAbort.
* Fix samr access checks.
* Add a security model to LSA.
+ * Fix nss_wrapper build for Solaris.
o Geza Gemes <geza at kzsdabas.hu>
@@ -357,6 +358,10 @@ o Aravind Srinivasan <aravind.srinivasan at isilon.com>
* Always allocate memory in dptr_ReadDirName.
+o Kumar Thangavelu <Kumar.Thangavelu at riverbed.com>
+ * Fix 'net' crash during domain join.
+
+
o Marc VanHeyningen <marc.vanheyningen at isilon.com>
* Zero an uninitialized array.
* Allow child processes to exit gracefully if we are out of fds.
diff --git a/lib/nss_wrapper/nss_wrapper.c b/lib/nss_wrapper/nss_wrapper.c
index da09083..1875dc3 100644
--- a/lib/nss_wrapper/nss_wrapper.c
+++ b/lib/nss_wrapper/nss_wrapper.c
@@ -771,14 +771,11 @@ static int nwrap_gr_copy_r(const struct group *src, struct group *dst,
}
/* user functions */
-_PUBLIC_ struct passwd *nwrap_getpwnam(const char *name)
+
+static struct passwd *nwrap_files_getpwnam(const char *name)
{
int i;
- if (!nwrap_enabled()) {
- return real_getpwnam(name);
- }
-
nwrap_cache_reload(nwrap_pw_global.cache);
for (i=0; i<nwrap_pw_global.num; i++) {
@@ -798,15 +795,20 @@ _PUBLIC_ struct passwd *nwrap_getpwnam(const char *name)
return NULL;
}
-_PUBLIC_ int nwrap_getpwnam_r(const char *name, struct passwd *pwdst,
- char *buf, size_t buflen, struct passwd **pwdstp)
+_PUBLIC_ struct passwd *nwrap_getpwnam(const char *name)
{
- struct passwd *pw;
-
if (!nwrap_enabled()) {
- return real_getpwnam_r(name, pwdst, buf, buflen, pwdstp);
+ return real_getpwnam(name);
}
+ return nwrap_files_getpwnam(name);
+}
+
+static int nwrap_files_getpwnam_r(const char *name, struct passwd *pwdst,
+ char *buf, size_t buflen, struct passwd **pwdstp)
+{
+ struct passwd *pw;
+
pw = nwrap_getpwnam(name);
if (!pw) {
if (errno == 0) {
@@ -818,14 +820,20 @@ _PUBLIC_ int nwrap_getpwnam_r(const char *name, struct passwd *pwdst,
return nwrap_pw_copy_r(pw, pwdst, buf, buflen, pwdstp);
}
-_PUBLIC_ struct passwd *nwrap_getpwuid(uid_t uid)
+_PUBLIC_ int nwrap_getpwnam_r(const char *name, struct passwd *pwdst,
+ char *buf, size_t buflen, struct passwd **pwdstp)
{
- int i;
-
if (!nwrap_enabled()) {
- return real_getpwuid(uid);
+ return real_getpwnam_r(name, pwdst, buf, buflen, pwdstp);
}
+ return nwrap_files_getpwnam_r(name, pwdst, buf, buflen, pwdstp);
+}
+
+static struct passwd *nwrap_files_getpwuid(uid_t uid)
+{
+ int i;
+
nwrap_cache_reload(nwrap_pw_global.cache);
for (i=0; i<nwrap_pw_global.num; i++) {
@@ -845,15 +853,20 @@ _PUBLIC_ struct passwd *nwrap_getpwuid(uid_t uid)
return NULL;
}
-_PUBLIC_ int nwrap_getpwuid_r(uid_t uid, struct passwd *pwdst,
- char *buf, size_t buflen, struct passwd **pwdstp)
+_PUBLIC_ struct passwd *nwrap_getpwuid(uid_t uid)
{
- struct passwd *pw;
-
if (!nwrap_enabled()) {
- return real_getpwuid_r(uid, pwdst, buf, buflen, pwdstp);
+ return real_getpwuid(uid);
}
+ return nwrap_files_getpwuid(uid);
+}
+
+static int nwrap_files_getpwuid_r(uid_t uid, struct passwd *pwdst,
+ char *buf, size_t buflen, struct passwd **pwdstp)
+{
+ struct passwd *pw;
+
pw = nwrap_getpwuid(uid);
if (!pw) {
if (errno == 0) {
@@ -865,24 +878,35 @@ _PUBLIC_ int nwrap_getpwuid_r(uid_t uid, struct passwd *pwdst,
return nwrap_pw_copy_r(pw, pwdst, buf, buflen, pwdstp);
}
+_PUBLIC_ int nwrap_getpwuid_r(uid_t uid, struct passwd *pwdst,
+ char *buf, size_t buflen, struct passwd **pwdstp)
+{
+ if (!nwrap_enabled()) {
+ return real_getpwuid_r(uid, pwdst, buf, buflen, pwdstp);
+ }
+
+ return nwrap_files_getpwuid_r(uid, pwdst, buf, buflen, pwdstp);
+}
+
/* user enum functions */
+static void nwrap_files_setpwent(void)
+{
+ nwrap_pw_global.idx = 0;
+}
+
_PUBLIC_ void nwrap_setpwent(void)
{
if (!nwrap_enabled()) {
real_setpwent();
}
- nwrap_pw_global.idx = 0;
+ nwrap_files_setpwent();
}
-_PUBLIC_ struct passwd *nwrap_getpwent(void)
+static struct passwd *nwrap_files_getpwent(void)
{
struct passwd *pw;
- if (!nwrap_enabled()) {
- return real_getpwent();
- }
-
if (nwrap_pw_global.idx == 0) {
nwrap_cache_reload(nwrap_pw_global.cache);
}
@@ -900,13 +924,37 @@ _PUBLIC_ struct passwd *nwrap_getpwent(void)
return pw;
}
-_PUBLIC_ int nwrap_getpwent_r(struct passwd *pwdst, char *buf,
- size_t buflen, struct passwd **pwdstp)
+_PUBLIC_ struct passwd *nwrap_getpwent(void)
+{
+ if (!nwrap_enabled()) {
+ return real_getpwent();
+ }
+
+ return nwrap_files_getpwent();
+}
+
+static int nwrap_files_getpwent_r(struct passwd *pwdst, char *buf,
+ size_t buflen, struct passwd **pwdstp)
{
struct passwd *pw;
+ pw = nwrap_getpwent();
+ if (!pw) {
+ if (errno == 0) {
+ return ENOENT;
+ }
+ return errno;
+ }
+
+ return nwrap_pw_copy_r(pw, pwdst, buf, buflen, pwdstp);
+}
+
+_PUBLIC_ int nwrap_getpwent_r(struct passwd *pwdst, char *buf,
+ size_t buflen, struct passwd **pwdstp)
+{
if (!nwrap_enabled()) {
#ifdef SOLARIS_GETPWENT_R
+ struct passwd *pw;
pw = real_getpwent_r(pwdst, buf, buflen);
if (!pw) {
if (errno == 0) {
@@ -923,15 +971,12 @@ _PUBLIC_ int nwrap_getpwent_r(struct passwd *pwdst, char *buf,
#endif
}
- pw = nwrap_getpwent();
- if (!pw) {
- if (errno == 0) {
- return ENOENT;
- }
- return errno;
- }
+ return nwrap_files_getpwent_r(pwdst, buf, buflen, pwdstp);
+}
- return nwrap_pw_copy_r(pw, pwdst, buf, buflen, pwdstp);
+static void nwrap_files_endpwent(void)
+{
+ nwrap_pw_global.idx = 0;
}
_PUBLIC_ void nwrap_endpwent(void)
@@ -940,29 +985,30 @@ _PUBLIC_ void nwrap_endpwent(void)
real_endpwent();
}
- nwrap_pw_global.idx = 0;
+ nwrap_files_endpwent();
}
/* misc functions */
+static int nwrap_files_initgroups(const char *user, gid_t group)
+{
+ /* TODO: maybe we should also fake this... */
+ return EPERM;
+}
+
_PUBLIC_ int nwrap_initgroups(const char *user, gid_t group)
{
if (!nwrap_enabled()) {
return real_initgroups(user, group);
}
- /* TODO: maybe we should also fake this... */
- return EPERM;
+ return nwrap_files_initgroups(user, group);
}
/* group functions */
-_PUBLIC_ struct group *nwrap_getgrnam(const char *name)
+static struct group *nwrap_files_getgrnam(const char *name)
{
int i;
- if (!nwrap_enabled()) {
- return real_getgrnam(name);
- }
-
nwrap_cache_reload(nwrap_gr_global.cache);
for (i=0; i<nwrap_gr_global.num; i++) {
@@ -982,15 +1028,20 @@ _PUBLIC_ struct group *nwrap_getgrnam(const char *name)
return NULL;
}
-_PUBLIC_ int nwrap_getgrnam_r(const char *name, struct group *grdst,
- char *buf, size_t buflen, struct group **grdstp)
+_PUBLIC_ struct group *nwrap_getgrnam(const char *name)
{
- struct group *gr;
-
if (!nwrap_enabled()) {
- return real_getgrnam_r(name, grdst, buf, buflen, grdstp);
+ return real_getgrnam(name);
}
+ return nwrap_files_getgrnam(name);
+}
+
+static int nwrap_files_getgrnam_r(const char *name, struct group *grdst,
+ char *buf, size_t buflen, struct group **grdstp)
+{
+ struct group *gr;
+
gr = nwrap_getgrnam(name);
if (!gr) {
if (errno == 0) {
@@ -1002,14 +1053,20 @@ _PUBLIC_ int nwrap_getgrnam_r(const char *name, struct group *grdst,
return nwrap_gr_copy_r(gr, grdst, buf, buflen, grdstp);
}
-_PUBLIC_ struct group *nwrap_getgrgid(gid_t gid)
+_PUBLIC_ int nwrap_getgrnam_r(const char *name, struct group *grdst,
+ char *buf, size_t buflen, struct group **grdstp)
{
- int i;
-
if (!nwrap_enabled()) {
- return real_getgrgid(gid);
+ return real_getgrnam_r(name, grdst, buf, buflen, grdstp);
}
+ return nwrap_files_getgrnam_r(name, grdst, buf, buflen, grdstp);
+}
+
+static struct group *nwrap_files_getgrgid(gid_t gid)
+{
+ int i;
+
nwrap_cache_reload(nwrap_gr_global.cache);
for (i=0; i<nwrap_gr_global.num; i++) {
@@ -1029,15 +1086,20 @@ _PUBLIC_ struct group *nwrap_getgrgid(gid_t gid)
return NULL;
}
-_PUBLIC_ int nwrap_getgrgid_r(gid_t gid, struct group *grdst,
- char *buf, size_t buflen, struct group **grdstp)
+_PUBLIC_ struct group *nwrap_getgrgid(gid_t gid)
{
- struct group *gr;
-
if (!nwrap_enabled()) {
- return real_getgrgid_r(gid, grdst, buf, buflen, grdstp);
+ return real_getgrgid(gid);
}
+ return nwrap_files_getgrgid(gid);
+}
+
+static int nwrap_files_getgrgid_r(gid_t gid, struct group *grdst,
+ char *buf, size_t buflen, struct group **grdstp)
+{
+ struct group *gr;
+
gr = nwrap_getgrgid(gid);
if (!gr) {
if (errno == 0) {
@@ -1051,24 +1113,35 @@ _PUBLIC_ int nwrap_getgrgid_r(gid_t gid, struct group *grdst,
return ENOENT;
}
+_PUBLIC_ int nwrap_getgrgid_r(gid_t gid, struct group *grdst,
+ char *buf, size_t buflen, struct group **grdstp)
+{
+ if (!nwrap_enabled()) {
+ return real_getgrgid_r(gid, grdst, buf, buflen, grdstp);
+ }
+
+ return nwrap_files_getgrgid_r(gid, grdst, buf, buflen, grdstp);
+}
+
/* group enum functions */
+static void nwrap_files_setgrent(void)
+{
+ nwrap_gr_global.idx = 0;
+}
+
_PUBLIC_ void nwrap_setgrent(void)
{
if (!nwrap_enabled()) {
real_setgrent();
}
- nwrap_gr_global.idx = 0;
+ nwrap_files_setgrent();
}
-_PUBLIC_ struct group *nwrap_getgrent(void)
+static struct group *nwrap_files_getgrent(void)
{
struct group *gr;
- if (!nwrap_enabled()) {
- return real_getgrent();
- }
-
if (nwrap_gr_global.idx == 0) {
nwrap_cache_reload(nwrap_gr_global.cache);
}
@@ -1086,13 +1159,37 @@ _PUBLIC_ struct group *nwrap_getgrent(void)
return gr;
}
-_PUBLIC_ int nwrap_getgrent_r(struct group *grdst, char *buf,
- size_t buflen, struct group **grdstp)
+_PUBLIC_ struct group *nwrap_getgrent(void)
+{
+ if (!nwrap_enabled()) {
+ return real_getgrent();
+ }
+
+ return nwrap_files_getgrent();
+}
+
+static int nwrap_files_getgrent_r(struct group *grdst, char *buf,
+ size_t buflen, struct group **grdstp)
{
struct group *gr;
+ gr = nwrap_getgrent();
+ if (!gr) {
+ if (errno == 0) {
+ return ENOENT;
+ }
+ return errno;
+ }
+
+ return nwrap_gr_copy_r(gr, grdst, buf, buflen, grdstp);
+}
+
+_PUBLIC_ int nwrap_getgrent_r(struct group *grdst, char *buf,
+ size_t buflen, struct group **grdstp)
+{
if (!nwrap_enabled()) {
#ifdef SOLARIS_GETGRENT_R
+ struct group *gr;
gr = real_getgrent_r(grdst, buf, buflen);
if (!gr) {
if (errno == 0) {
@@ -1109,15 +1206,12 @@ _PUBLIC_ int nwrap_getgrent_r(struct group *grdst, char *buf,
#endif
}
- gr = nwrap_getgrent();
- if (!gr) {
- if (errno == 0) {
- return ENOENT;
- }
- return errno;
- }
+ return nwrap_files_getgrent_r(grdst, buf, buflen, grdstp);
+}
- return nwrap_gr_copy_r(gr, grdst, buf, buflen, grdstp);
+static void nwrap_files_endgrent(void)
+{
+ nwrap_gr_global.idx = 0;
}
_PUBLIC_ void nwrap_endgrent(void)
@@ -1126,5 +1220,5 @@ _PUBLIC_ void nwrap_endgrent(void)
real_endgrent();
}
- nwrap_gr_global.idx = 0;
+ nwrap_files_endgrent();
}
diff --git a/lib/nss_wrapper/nss_wrapper.pl b/lib/nss_wrapper/nss_wrapper.pl
index cfd3206..1f1aef1 100644
--- a/lib/nss_wrapper/nss_wrapper.pl
+++ b/lib/nss_wrapper/nss_wrapper.pl
@@ -7,26 +7,35 @@ use Getopt::Long;
use Cwd qw(abs_path);
my $opt_help = 0;
-my $opt_path = undef;
+my $opt_passwd_path = undef;
+my $opt_group_path = undef;
my $opt_action = undef;
my $opt_type = undef;
my $opt_name = undef;
+my $opt_member = undef;
my $passwdfn = undef;
my $groupfn = undef;
+my $memberfn = undef;
my $actionfn = undef;
-sub passwd_add($$);
-sub passwd_delete($$);
-sub group_add($$);
-sub group_delete($$);
+sub passwd_add($$$$);
+sub passwd_delete($$$$);
+sub group_add($$$$);
+sub group_delete($$$$);
+sub member_add($$$$);
+sub member_delete($$$$);
+
+sub check_path($$);
my $result = GetOptions(
'help|h|?' => \$opt_help,
- 'path=s' => \$opt_path,
+ 'passwd_path=s' => \$opt_passwd_path,
+ 'group_path=s' => \$opt_group_path,
'action=s' => \$opt_action,
'type=s' => \$opt_type,
- 'name=s' => \$opt_name
+ 'name=s' => \$opt_name,
+ 'member=s' => \$opt_member
);
sub usage($;$)
@@ -39,14 +48,16 @@ sub usage($;$)
--help|-h|-? Show this help.
--
Samba Shared Repository
More information about the samba-cvs
mailing list