[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Sat Oct 17 09:13:32 MDT 2009
The branch, master has been updated
via 3e3214f... s3:winbind: Move fillup_pw_field() as static to wb_fill_pwent.c
from 46b7938... s4-smbserver: removed bogus initialisation of two union arms
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3e3214fd91471bca5b6c4d3782e922d252d588fb
Author: Volker Lendecke <vl at samba.org>
Date: Sat Oct 17 17:00:13 2009 +0200
s3:winbind: Move fillup_pw_field() as static to wb_fill_pwent.c
-----------------------------------------------------------------------
Summary of changes:
source3/winbindd/wb_fill_pwent.c | 47 +++++++++++++++++++++++++++++++++++++
source3/winbindd/winbindd_proto.h | 8 ------
source3/winbindd/winbindd_user.c | 39 ------------------------------
3 files changed, 47 insertions(+), 47 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/winbindd/wb_fill_pwent.c b/source3/winbindd/wb_fill_pwent.c
index 4f4819c..8998bf9 100644
--- a/source3/winbindd/wb_fill_pwent.c
+++ b/source3/winbindd/wb_fill_pwent.c
@@ -27,6 +27,14 @@ struct wb_fill_pwent_state {
struct winbindd_pw *pw;
};
+static bool fillup_pw_field(const char *lp_template,
+ const char *username,
+ const char *domname,
+ uid_t uid,
+ gid_t gid,
+ const char *in,
+ fstring out);
+
static void wb_fill_pwent_sid2uid_done(struct tevent_req *subreq);
static void wb_fill_pwent_sid2gid_done(struct tevent_req *subreq);
@@ -153,3 +161,42 @@ NTSTATUS wb_fill_pwent_recv(struct tevent_req *req)
{
return tevent_req_simple_recv_ntstatus(req);
}
+
+static bool fillup_pw_field(const char *lp_template,
+ const char *username,
+ const char *domname,
+ uid_t uid,
+ gid_t gid,
+ const char *in,
+ fstring out)
+{
+ char *templ;
+
+ if (out == NULL)
+ return False;
+
+ /* The substitution of %U and %D in the 'template
+ homedir' is done by talloc_sub_specified() below.
+ If we have an in string (which means the value has already
+ been set in the nss_info backend), then use that.
+ Otherwise use the template value passed in. */
+
+ if ((in != NULL) && (in[0] != '\0') && (lp_security() == SEC_ADS)) {
+ templ = talloc_sub_specified(talloc_tos(), in,
+ username, domname,
+ uid, gid);
+ } else {
+ templ = talloc_sub_specified(talloc_tos(), lp_template,
+ username, domname,
+ uid, gid);
+ }
+
+ if (!templ)
+ return False;
+
+ safe_strcpy(out, templ, sizeof(fstring) - 1);
+ TALLOC_FREE(templ);
+
+ return True;
+
+}
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index 21feddf..6e232c9 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -545,14 +545,6 @@ enum winbindd_result winbindd_dual_allocate_gid(struct winbindd_domain *domain,
/* The following definitions come from winbindd/winbindd_user.c */
-bool fillup_pw_field(const char *lp_template,
- const char *username,
- const char *domname,
- uid_t uid,
- gid_t gid,
- const char *in,
- fstring out);
-
enum winbindd_result winbindd_dual_userinfo(struct winbindd_domain *domain,
struct winbindd_cli_state *state);
void winbindd_getpwnam(struct winbindd_cli_state *state);
diff --git a/source3/winbindd/winbindd_user.c b/source3/winbindd/winbindd_user.c
index b709f4c..6afa941 100644
--- a/source3/winbindd/winbindd_user.c
+++ b/source3/winbindd/winbindd_user.c
@@ -27,45 +27,6 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-bool fillup_pw_field(const char *lp_template,
- const char *username,
- const char *domname,
- uid_t uid,
- gid_t gid,
- const char *in,
- fstring out)
-{
- char *templ;
-
- if (out == NULL)
- return False;
-
- /* The substitution of %U and %D in the 'template
- homedir' is done by talloc_sub_specified() below.
- If we have an in string (which means the value has already
- been set in the nss_info backend), then use that.
- Otherwise use the template value passed in. */
-
- if ((in != NULL) && (in[0] != '\0') && (lp_security() == SEC_ADS)) {
- templ = talloc_sub_specified(talloc_tos(), in,
- username, domname,
- uid, gid);
- } else {
- templ = talloc_sub_specified(talloc_tos(), lp_template,
- username, domname,
- uid, gid);
- }
-
- if (!templ)
- return False;
-
- safe_strcpy(out, templ, sizeof(fstring) - 1);
- TALLOC_FREE(templ);
-
- return True;
-
-}
-
/* Wrapper for domain->methods->query_user, only on the parent->child pipe */
enum winbindd_result winbindd_dual_userinfo(struct winbindd_domain *domain,
--
Samba Shared Repository
More information about the samba-cvs
mailing list