1 /* used to remember the names of the posix attributes in AD */
2 /* see the rfc2307 & sfu nss backends */
5 char *posix_homedir_attr
;
6 char *posix_shell_attr
;
7 char *posix_uidnumber_attr
;
8 char *posix_gidnumber_attr
;
9 char *posix_gecos_attr
;
13 /* ldap attribute oids (Services for Unix 3.0, 3.5) */
14 #define ADS_ATTR_SFU_UIDNUMBER_OID "1.2.840.113556.1.6.18.1.310"
15 #define ADS_ATTR_SFU_GIDNUMBER_OID "1.2.840.113556.1.6.18.1.311"
16 #define ADS_ATTR_SFU_HOMEDIR_OID "1.2.840.113556.1.6.18.1.344"
17 #define ADS_ATTR_SFU_SHELL_OID "1.2.840.113556.1.6.18.1.312"
18 #define ADS_ATTR_SFU_GECOS_OID "1.2.840.113556.1.6.18.1.337"
19 #define ADS_ATTR_SFU_UID_OID "1.2.840.113556.1.6.18.1.309"
21 /* ldap attribute oids (Services for Unix 2.0) */
22 #define ADS_ATTR_SFU20_UIDNUMBER_OID "1.2.840.113556.1.4.7000.187.70"
23 #define ADS_ATTR_SFU20_GIDNUMBER_OID "1.2.840.113556.1.4.7000.187.71"
24 #define ADS_ATTR_SFU20_HOMEDIR_OID "1.2.840.113556.1.4.7000.187.106"
25 #define ADS_ATTR_SFU20_SHELL_OID "1.2.840.113556.1.4.7000.187.72"
26 #define ADS_ATTR_SFU20_GECOS_OID "1.2.840.113556.1.4.7000.187.97"
27 #define ADS_ATTR_SFU20_UID_OID "1.2.840.113556.1.4.7000.187.102"
30 /* ldap attribute oids (RFC2307) */
31 #define ADS_ATTR_RFC2307_UIDNUMBER_OID "1.3.6.1.1.1.1.0"
32 #define ADS_ATTR_RFC2307_GIDNUMBER_OID "1.3.6.1.1.1.1.1"
33 #define ADS_ATTR_RFC2307_HOMEDIR_OID "1.3.6.1.1.1.1.3"
34 #define ADS_ATTR_RFC2307_SHELL_OID "1.3.6.1.1.1.1.4"
35 #define ADS_ATTR_RFC2307_GECOS_OID "1.3.6.1.1.1.1.2"
36 #define ADS_ATTR_RFC2307_UID_OID "0.9.2342.19200300.100.1.1"
38 enum wb_posix_mapping
{
39 WB_POSIX_MAP_UNKNOWN
= -1,
40 WB_POSIX_MAP_TEMPLATE
= 0,
42 WB_POSIX_MAP_SFU20
= 2,
43 WB_POSIX_MAP_RFC2307
= 3,
44 WB_POSIX_MAP_UNIXINFO
= 4
47 /* The following definitions come from libads/ldap_schema.c */
49 ADS_STATUS
ads_get_attrnames_by_oids(ADS_STRUCT
*ads
, TALLOC_CTX
*mem_ctx
,
50 const char *schema_path
,
51 const char **OIDs
, size_t num_OIDs
,
52 char ***OIDs_out
, char ***names
, size_t *count
);
53 const char *ads_get_attrname_by_guid(ADS_STRUCT
*ads
,
54 const char *schema_path
,
56 const struct GUID
*schema_guid
);
57 const char *ads_get_attrname_by_oid(ADS_STRUCT
*ads
, const char *schema_path
, TALLOC_CTX
*mem_ctx
, const char * OID
);
58 ADS_STATUS
ads_schema_path(ADS_STRUCT
*ads
, TALLOC_CTX
*mem_ctx
, char **schema_path
);
59 ADS_STATUS
ads_check_posix_schema_mapping(TALLOC_CTX
*mem_ctx
,
61 enum wb_posix_mapping map_type
,
62 struct posix_schema
**s
) ;