git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3d15d04
)
Add some const to winbind_userinfo
author
Volker Lendecke
<vl@samba.org>
Sat, 1 Aug 2009 14:38:13 +0000
(10:38 -0400)
committer
Volker Lendecke
<vl@samba.org>
Mon, 3 Aug 2009 20:48:45 +0000
(22:48 +0200)
12 files changed:
source3/include/nss_info.h
patch
|
blob
|
history
source3/winbindd/idmap_ad.c
patch
|
blob
|
history
source3/winbindd/idmap_adex/idmap_adex.c
patch
|
blob
|
history
source3/winbindd/idmap_adex/idmap_adex.h
patch
|
blob
|
history
source3/winbindd/idmap_adex/provider_unified.c
patch
|
blob
|
history
source3/winbindd/idmap_hash/idmap_hash.c
patch
|
blob
|
history
source3/winbindd/nss_info.c
patch
|
blob
|
history
source3/winbindd/nss_info_template.c
patch
|
blob
|
history
source3/winbindd/winbindd.h
patch
|
blob
|
history
source3/winbindd/winbindd_ads.c
patch
|
blob
|
history
source3/winbindd/winbindd_cache.c
patch
|
blob
|
history
source3/winbindd/winbindd_proto.h
patch
|
blob
|
history
diff --git
a/source3/include/nss_info.h
b/source3/include/nss_info.h
index 0224be099fa1cd5e40e46b8552cb760a64df4de7..90d992a3b948a7421a77602b8e638dcbfa967828 100644
(file)
--- a/
source3/include/nss_info.h
+++ b/
source3/include/nss_info.h
@@
-65,7
+65,8
@@
struct nss_info_methods {
const DOM_SID *sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
const DOM_SID *sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
- char **homedir, char **shell, char **gecos, gid_t *p_gid);
+ const char **homedir, const char **shell,
+ const char **gecos, gid_t *p_gid);
NTSTATUS (*map_to_alias)(TALLOC_CTX *mem_ctx,
struct nss_domain_entry *e,
const char *name, char **alias);
NTSTATUS (*map_to_alias)(TALLOC_CTX *mem_ctx,
struct nss_domain_entry *e,
const char *name, char **alias);
@@
-85,10
+86,10
@@
NTSTATUS smb_register_idmap_nss(int version,
NTSTATUS nss_init( const char **nss_list );
NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
NTSTATUS nss_init( const char **nss_list );
NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
-
TALLOC_CTX *ctx,
+ TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
ADS_STRUCT *ads, LDAPMessage *msg,
-
char **homedir, char **shell, char **gecos
,
- gid_t *p_gid);
+
const char **homedir, const char **shell
,
+
const char **gecos,
gid_t *p_gid);
NTSTATUS nss_map_to_alias( TALLOC_CTX *mem_ctx, const char *domain,
const char *name, char **alias );
NTSTATUS nss_map_to_alias( TALLOC_CTX *mem_ctx, const char *domain,
const char *name, char **alias );
diff --git
a/source3/winbindd/idmap_ad.c
b/source3/winbindd/idmap_ad.c
index 3791a86876f9da33ca316ef74f59e7cc7444ded5..4e1ca346c0010463608e65ccd260e799ec4fe139 100644
(file)
--- a/
source3/winbindd/idmap_ad.c
+++ b/
source3/winbindd/idmap_ad.c
@@
-822,9
+822,9
@@
static NTSTATUS nss_ad_get_info( struct nss_domain_entry *e,
TALLOC_CTX *mem_ctx,
ADS_STRUCT *ads,
LDAPMessage *msg,
TALLOC_CTX *mem_ctx,
ADS_STRUCT *ads,
LDAPMessage *msg,
- char **homedir,
- c
har **shell,
- char **gecos,
+ c
onst c
har **homedir,
+ c
onst char **shell,
+ c
onst c
har **gecos,
uint32 *gid )
{
const char *attrs[] = {NULL, /* attr_homedir */
uint32 *gid )
{
const char *attrs[] = {NULL, /* attr_homedir */
diff --git
a/source3/winbindd/idmap_adex/idmap_adex.c
b/source3/winbindd/idmap_adex/idmap_adex.c
index e2fcda83d329571a9708e2ca162a1bc2adf6d350..5ca7df0b4a9498dbd75c038d9bccd9d2ac95b031 100644
(file)
--- a/
source3/winbindd/idmap_adex/idmap_adex.c
+++ b/
source3/winbindd/idmap_adex/idmap_adex.c
@@
-318,8
+318,9
@@
static NTSTATUS _nss_adex_get_info(struct
TALLOC_CTX * ctx,
ADS_STRUCT * ads,
LDAPMessage * msg,
TALLOC_CTX * ctx,
ADS_STRUCT * ads,
LDAPMessage * msg,
- char **homedir,
- char **shell, char **gecos, gid_t * p_gid)
+ const char **homedir,
+ const char **shell,
+ const char **gecos, gid_t * p_gid)
{
NTSTATUS nt_status;
struct likewise_cell *cell;
{
NTSTATUS nt_status;
struct likewise_cell *cell;
diff --git
a/source3/winbindd/idmap_adex/idmap_adex.h
b/source3/winbindd/idmap_adex/idmap_adex.h
index e068d5c3403b972a14f1df05922eca9181605db4..6d6881e01d6a2c9c2b8e2d45776e9656959fa90f 100644
(file)
--- a/
source3/winbindd/idmap_adex/idmap_adex.h
+++ b/
source3/winbindd/idmap_adex/idmap_adex.h
@@
-97,8
+97,9
@@
struct cell_provider_api {
enum id_type * type, const DOM_SID * sid);
NTSTATUS(*get_nss_info) (const DOM_SID * sid,
TALLOC_CTX * ctx,
enum id_type * type, const DOM_SID * sid);
NTSTATUS(*get_nss_info) (const DOM_SID * sid,
TALLOC_CTX * ctx,
- char **homedir,
- char **shell, char **gecos, gid_t * p_gid);
+ const char **homedir,
+ const char **shell,
+ const char **gecos, gid_t * p_gid);
NTSTATUS(*map_to_alias) (TALLOC_CTX * mem_ctx,
const char *domain,
const char *name, char **alias);
NTSTATUS(*map_to_alias) (TALLOC_CTX * mem_ctx,
const char *domain,
const char *name, char **alias);
diff --git
a/source3/winbindd/idmap_adex/provider_unified.c
b/source3/winbindd/idmap_adex/provider_unified.c
index 00db018de2d72f78cffc3cf1c6e2dc5882cf95ac..d48989f45fce9f5064372be873472d7c689c3249 100644
(file)
--- a/
source3/winbindd/idmap_adex/provider_unified.c
+++ b/
source3/winbindd/idmap_adex/provider_unified.c
@@
-895,21
+895,25
@@
done:
static NTSTATUS pull_nss_info(struct likewise_cell *c,
LDAPMessage *msg,
TALLOC_CTX *ctx,
static NTSTATUS pull_nss_info(struct likewise_cell *c,
LDAPMessage *msg,
TALLOC_CTX *ctx,
- char **homedir,
- char **shell,
- char **gecos,
+ c
onst c
har **homedir,
+ c
onst c
har **shell,
+ c
onst c
har **gecos,
gid_t *p_gid)
{
NTSTATUS nt_status;
gid_t *p_gid)
{
NTSTATUS nt_status;
+ char *tmp;
- nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_HOMEDIR,
homedir
);
+ nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_HOMEDIR,
&tmp
);
BAIL_ON_NTSTATUS_ERROR(nt_status);
BAIL_ON_NTSTATUS_ERROR(nt_status);
+ *homedir = tmp;
- nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_SHELL,
shell
);
+ nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_SHELL,
&tmp
);
BAIL_ON_NTSTATUS_ERROR(nt_status);
BAIL_ON_NTSTATUS_ERROR(nt_status);
+ *shell = tmp;
- nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_GECOS,
gecos
);
+ nt_status = get_object_string(c, msg, ctx, ADEX_ATTR_GECOS,
&tmp
);
/* Gecos is often not set so ignore failures */
/* Gecos is often not set so ignore failures */
+ *gecos = tmp;
nt_status = get_object_uint32(c, msg, ADEX_ATTR_GIDNUM, p_gid);
BAIL_ON_NTSTATUS_ERROR(nt_status);
nt_status = get_object_uint32(c, msg, ADEX_ATTR_GIDNUM, p_gid);
BAIL_ON_NTSTATUS_ERROR(nt_status);
@@
-1021,9
+1025,9
@@
done:
static NTSTATUS _ccp_nss_get_info(const DOM_SID * sid,
TALLOC_CTX * ctx,
static NTSTATUS _ccp_nss_get_info(const DOM_SID * sid,
TALLOC_CTX * ctx,
- char **homedir,
- char **shell,
- char **gecos, gid_t * p_gid)
+ c
onst c
har **homedir,
+ c
onst c
har **shell,
+ c
onst c
har **gecos, gid_t * p_gid)
{
struct likewise_cell *cell = NULL;
LDAPMessage *msg = NULL;
{
struct likewise_cell *cell = NULL;
LDAPMessage *msg = NULL;
diff --git
a/source3/winbindd/idmap_hash/idmap_hash.c
b/source3/winbindd/idmap_hash/idmap_hash.c
index 42830720f3c5ba32892a5806975f6da560040f86..7d4dd2b5ab01578ff758cd6374a83d3aae364f36 100644
(file)
--- a/
source3/winbindd/idmap_hash/idmap_hash.c
+++ b/
source3/winbindd/idmap_hash/idmap_hash.c
@@
-276,9
+276,9
@@
static NTSTATUS nss_hash_get_info(struct nss_domain_entry *e,
TALLOC_CTX *ctx,
ADS_STRUCT *ads,
LDAPMessage *msg,
TALLOC_CTX *ctx,
ADS_STRUCT *ads,
LDAPMessage *msg,
- char **homedir,
- char **shell,
- char **gecos,
+ c
onst c
har **homedir,
+ c
onst c
har **shell,
+ c
onst c
har **gecos,
gid_t *p_gid )
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
gid_t *p_gid )
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
diff --git
a/source3/winbindd/nss_info.c
b/source3/winbindd/nss_info.c
index 734c0096024b663cc6e4ee3817564c09d5d222fb..382aa86df0d9f6ada034031cca01d08c2ececfa6 100644
(file)
--- a/
source3/winbindd/nss_info.c
+++ b/
source3/winbindd/nss_info.c
@@
-299,11
+299,11
@@
static struct nss_domain_entry *find_nss_domain( const char *domain )
/********************************************************************
*******************************************************************/
/********************************************************************
*******************************************************************/
-
NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
+NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
- c
har **homedir, char **shell, char **gecos
,
- gid_t *p_gid)
+ c
onst char **homedir, const char **shell
,
+
const char **gecos,
gid_t *p_gid)
{
struct nss_domain_entry *p;
struct nss_info_methods *m;
{
struct nss_domain_entry *p;
struct nss_info_methods *m;
diff --git
a/source3/winbindd/nss_info_template.c
b/source3/winbindd/nss_info_template.c
index f44c73f3a60c6128a63cc912258e886a7bf2e0e5..12d9c518962645d313383b00323edde149edc53b 100644
(file)
--- a/
source3/winbindd/nss_info_template.c
+++ b/
source3/winbindd/nss_info_template.c
@@
-37,9
+37,9
@@
static NTSTATUS nss_template_get_info( struct nss_domain_entry *e,
TALLOC_CTX *ctx,
ADS_STRUCT *ads,
LDAPMessage *msg,
TALLOC_CTX *ctx,
ADS_STRUCT *ads,
LDAPMessage *msg,
- char **homedir,
- c
har **shell,
- char **gecos,
+ c
onst c
har **homedir,
+ c
onst char **shell,
+ c
onst c
har **gecos,
gid_t *gid )
{
if ( !homedir || !shell || !gecos )
gid_t *gid )
{
if ( !homedir || !shell || !gecos )
diff --git
a/source3/winbindd/winbindd.h
b/source3/winbindd/winbindd.h
index 64fb8851df77de96c6f8250ca67570fe8c2004a8..8f0db44617090bdf2c627250406e5377d552d630 100644
(file)
--- a/
source3/winbindd/winbindd.h
+++ b/
source3/winbindd/winbindd.h
@@
-91,11
+91,11
@@
struct getpwent_user {
/* Server state structure */
/* Server state structure */
-typedef struct {
- char *acct_name;
- char *full_name;
- char *homedir;
- char *shell;
+typedef struct
winbind_userinfo
{
+ c
onst c
har *acct_name;
+ c
onst c
har *full_name;
+ c
onst c
har *homedir;
+ c
onst c
har *shell;
gid_t primary_gid; /* allow the nss_info
backend to set the primary group */
DOM_SID user_sid; /* NT user and primary group SIDs */
gid_t primary_gid; /* allow the nss_info
backend to set the primary group */
DOM_SID user_sid; /* NT user and primary group SIDs */
diff --git
a/source3/winbindd/winbindd_ads.c
b/source3/winbindd/winbindd_ads.c
index 50985ccdda65f49533353a0b63f293c2d206c61d..a95b31da48a9790a4cea52b2009f8068a3ca0f9a 100644
(file)
--- a/
source3/winbindd/winbindd_ads.c
+++ b/
source3/winbindd/winbindd_ads.c
@@
-201,9
+201,10
@@
static NTSTATUS query_user_list(struct winbindd_domain *domain,
i = 0;
for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
i = 0;
for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) {
- char *name, *gecos = NULL;
- char *homedir = NULL;
- char *shell = NULL;
+ const char *name;
+ const char *gecos = NULL;
+ const char *homedir = NULL;
+ const char *shell = NULL;
uint32 group;
uint32 atype;
DOM_SID user_sid;
uint32 group;
uint32 atype;
DOM_SID user_sid;
diff --git
a/source3/winbindd/winbindd_cache.c
b/source3/winbindd/winbindd_cache.c
index b8872a18d4bf6d7f0f0d196be96dbb7bf53d2bf6..bec2a714c80a8c18c318025fcb8ea927e4f344d3 100644
(file)
--- a/
source3/winbindd/winbindd_cache.c
+++ b/
source3/winbindd/winbindd_cache.c
@@
-4090,8
+4090,8
@@
NTSTATUS nss_get_info_cached( struct winbindd_domain *domain,
const DOM_SID *user_sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
const DOM_SID *user_sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
- c
har **homedir, char **shell, char **gecos
,
- gid_t *p_gid)
+ c
onst char **homedir, const char **shell
,
+
const char **gecos,
gid_t *p_gid)
{
struct winbind_cache *cache = get_cache(domain);
struct cache_entry *centry = NULL;
{
struct winbind_cache *cache = get_cache(domain);
struct cache_entry *centry = NULL;
diff --git
a/source3/winbindd/winbindd_proto.h
b/source3/winbindd/winbindd_proto.h
index 03e254cbb96a2ee2ca71b45c3de51caa1b5d905d..c9decf8cc4a2137152aa9b79bd5a8b079e426c2d 100644
(file)
--- a/
source3/winbindd/winbindd_proto.h
+++ b/
source3/winbindd/winbindd_proto.h
@@
-177,8
+177,8
@@
NTSTATUS nss_get_info_cached( struct winbindd_domain *domain,
const DOM_SID *user_sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
const DOM_SID *user_sid,
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
- c
har **homedir, char **shell, char **gecos
,
- gid_t *p_gid);
+ c
onst char **homedir, const char **shell
,
+
const char **gecos,
gid_t *p_gid);
/* The following definitions come from winbindd/winbindd_ccache_access.c */
/* The following definitions come from winbindd/winbindd_ccache_access.c */