summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2005-03-31 05:06:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:24 -0500
commit9840db418bad5a39edc4a32a1786f5e2d2c9dff8 (patch)
tree4116543c742e1563ae869e1053583dbabf4195b5 /source3/libads
parentb76112f2116c3c08c7656387a4a49ea64915f470 (diff)
downloadsamba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.tar.gz
samba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.tar.bz2
samba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.zip
r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control entities in the ACL without getting all other NT attributes. 2. added the ability to exclude specified attributes from the result set provided by smbc_getxattr() et al, when requesting all attributes, all NT attributes, or all DOS attributes. 3. eliminated all compiler warnings, including when --enable-developer compiler flags are in use. removed -Wcast-qual flag from list, as that is specifically to force warnings in the case of casting away qualifiers. Note: In the process of eliminating compiler warnings, a few nasties were discovered. In the file libads/sasl.c, PRIVATE kerberos interfaces are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED kerberos interfaces are being used. Someone who knows kerberos should look at these and determine if there is an alternate method of accomplishing the task. (This used to be commit 994694f7f26da5099f071e1381271a70407f33bb)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/kerberos.c2
-rw-r--r--source3/libads/ldap.c8
-rw-r--r--source3/libads/ldap_printer.c6
-rw-r--r--source3/libads/sasl.c5
4 files changed, 13 insertions, 8 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 43ccb18b5a..18820d9e31 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -89,7 +89,7 @@ int kerberos_kinit_password(const char *principal,
}
if ((code = krb5_get_init_creds_password(ctx, &my_creds, me,
- (char *) password,
+ CONST_DISCARD(char *, password),
kerb_prompter,
NULL, 0, NULL, NULL))) {
krb5_free_principal(ctx, me);
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 68103a701b..7a59da5a6d 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -481,15 +481,15 @@ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path,
ber_printf(cookie_be, "{io}", (ber_int_t) 1000, "", 0);
}
ber_flatten(cookie_be, &cookie_bv);
- PagedResults.ldctl_oid = ADS_PAGE_CTL_OID;
+ PagedResults.ldctl_oid = CONST_DISCARD(char *, ADS_PAGE_CTL_OID);
PagedResults.ldctl_iscritical = (char) 1;
PagedResults.ldctl_value.bv_len = cookie_bv->bv_len;
PagedResults.ldctl_value.bv_val = cookie_bv->bv_val;
- NoReferrals.ldctl_oid = ADS_NO_REFERRALS_OID;
+ NoReferrals.ldctl_oid = CONST_DISCARD(char *, ADS_NO_REFERRALS_OID);
NoReferrals.ldctl_iscritical = (char) 0;
NoReferrals.ldctl_value.bv_len = 0;
- NoReferrals.ldctl_value.bv_val = "";
+ NoReferrals.ldctl_value.bv_val = CONST_DISCARD(char *, "");
controls[0] = &NoReferrals;
@@ -962,7 +962,7 @@ ADS_STATUS ads_gen_mod(ADS_STRUCT *ads, const char *mod_dn, ADS_MODLIST mods)
non-existent attribute (but allowable for the object) to run
*/
LDAPControl PermitModify = {
- ADS_PERMIT_MODIFY_OID,
+ CONST_DISCARD(char *, ADS_PERMIT_MODIFY_OID),
{0, NULL},
(char) 1};
LDAPControl *controls[2];
diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c
index 68e6735891..61275e40d1 100644
--- a/source3/libads/ldap_printer.c
+++ b/source3/libads/ldap_printer.c
@@ -61,8 +61,10 @@ ADS_STATUS ads_find_printers(ADS_STRUCT *ads, void **res)
/* For the moment only display all printers */
- ldap_expr = "(&(!(showInAdvancedViewOnly=TRUE))(uncName=*)"
- "(objectCategory=printQueue))";
+ ldap_expr =
+ CONST_DISCARD(char *,
+ "(&(!(showInAdvancedViewOnly=TRUE))(uncName=*)"
+ "(objectCategory=printQueue))");
return ads_search(ads, res, ldap_expr, attrs);
}
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 0164b0c740..e657f2114e 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -18,6 +18,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#define KRB5_PRIVATE 1 /* this file uses PRIVATE interfaces! */
+
#include "includes.h"
#ifdef HAVE_LDAP
@@ -285,7 +287,8 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
ENCTYPE_DES_CBC_MD5,
ENCTYPE_NULL};
gss_OID_desc nt_principal =
- {10, "\052\206\110\206\367\022\001\002\002\002"};
+ {10, CONST_DISCARD(char *,
+ "\052\206\110\206\367\022\001\002\002\002")};
/* we need to fetch a service ticket as the ldap user in the
servers realm, regardless of our realm */