diff options
author | Günther Deschner <gd@samba.org> | 2006-05-18 16:08:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:08 -0500 |
commit | 52423e01dc209ba5abde808a446287714ed11567 (patch) | |
tree | b5802f00cc34e12d96defcaf55356e5a9b3bf213 /source/include/ads.h | |
parent | ec26c355b3ef1d3d809c4fbe911ce6fcef5db955 (diff) | |
download | samba-52423e01dc209ba5abde808a446287714ed11567.tar.gz samba-52423e01dc209ba5abde808a446287714ed11567.tar.xz samba-52423e01dc209ba5abde808a446287714ed11567.zip |
r15697: I take no comments as no objections :)
Expand the "winbind nss info" to also take "rfc2307" to support the
plain posix attributes LDAP schema from win2k3-r2.
This work is based on patches from Howard Wilkinson and Bob Gautier
(and closes bug #3345).
Guenther
Diffstat (limited to 'source/include/ads.h')
-rw-r--r-- | source/include/ads.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/source/include/ads.h b/source/include/ads.h index 48b9bbffa02..e93d36a5cab 100644 --- a/source/include/ads.h +++ b/source/include/ads.h @@ -4,6 +4,13 @@ basically this is a wrapper around ldap */ +enum wb_posix_mapping { + WB_POSIX_MAP_TEMPLATE = 0, + WB_POSIX_MAP_SFU = 1, + WB_POSIX_MAP_RFC2307 = 2, + WB_POSIX_MAP_UNIXINFO = 3 +}; + typedef struct { void *ld; /* the active ldap structure */ struct in_addr ldap_ip; /* the ip of the active connection, if any */ @@ -42,11 +49,12 @@ typedef struct { /* info derived from the servers schema */ struct { - char *sfu_homedir_attr; - char *sfu_shell_attr; - char *sfu_uidnumber_attr; - char *sfu_gidnumber_attr; - char *sfu_gecos_attr; + enum wb_posix_mapping map_type; + char *posix_homedir_attr; + char *posix_shell_attr; + char *posix_uidnumber_attr; + char *posix_gidnumber_attr; + char *posix_gecos_attr; } schema; } ADS_STRUCT; @@ -83,6 +91,13 @@ typedef void **ADS_MODLIST; #define ADS_ERR_OK(status) ((status.error_type == ENUM_ADS_ERROR_NT) ? NT_STATUS_IS_OK(status.err.nt_status):(status.err.rc == 0)) #define ADS_SUCCESS ADS_ERROR(0) +#define ADS_ERROR_HAVE_NO_MEMORY(x) do { \ + if (!(x)) {\ + return ADS_ERROR(LDAP_NO_MEMORY);\ + }\ +} while (0) + + /* time between reconnect attempts */ #define ADS_RECONNECT_TIME 5 @@ -100,6 +115,13 @@ typedef void **ADS_MODLIST; #define ADS_ATTR_SFU_SHELL_OID "1.2.840.113556.1.6.18.1.312" #define ADS_ATTR_SFU_GECOS_OID "1.2.840.113556.1.6.18.1.337" +/* ldap attribute oids (RFC2307) */ +#define ADS_ATTR_RFC2307_UIDNUMBER_OID "1.3.6.1.1.1.1.0" +#define ADS_ATTR_RFC2307_GIDNUMBER_OID "1.3.6.1.1.1.1.1" +#define ADS_ATTR_RFC2307_HOMEDIR_OID "1.3.6.1.1.1.1.3" +#define ADS_ATTR_RFC2307_SHELL_OID "1.3.6.1.1.1.1.4" +#define ADS_ATTR_RFC2307_GECOS_OID "1.3.6.1.1.1.1.2" + /* ldap bitwise searches */ #define ADS_LDAP_MATCHING_RULE_BIT_AND "1.2.840.113556.1.4.803" #define ADS_LDAP_MATCHING_RULE_BIT_OR "1.2.840.113556.1.4.804" |