Changeset 988 for vendor/current/nsswitch/libwbclient/wbclient.h
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/nsswitch/libwbclient/wbclient.h
r740 r988 6 6 Copyright (C) Gerald (Jerry) Carter 2007 7 7 Copyright (C) Volker Lendecke 2009 8 Copyright (C) Matthew Newton 2015 8 9 9 10 This library is free software; you can redistribute it and/or … … 69 70 * 0.7: Added wbcSidToStringBuf() 70 71 * 0.8: Added wbcSidsToUnixIds() and wbcLookupSids() 72 * 0.9: Added support for WBC_ID_TYPE_BOTH 73 * 0.10: Added wbcPingDc2() 74 * 0.11: Extended wbcAuthenticateUserEx to provide PAC parsing 75 * 0.12: Added wbcCtxCreate and friends 71 76 **/ 72 77 #define WBCLIENT_MAJOR_VERSION 0 73 #define WBCLIENT_MINOR_VERSION 878 #define WBCLIENT_MINOR_VERSION 12 74 79 #define WBCLIENT_VENDOR_VERSION "Samba libwbclient" 75 80 struct wbcLibraryDetails { … … 91 96 char *dns_domain; 92 97 }; 98 99 /** 100 * @brief Library context data 101 * 102 **/ 103 104 struct wbcContext; 93 105 94 106 /* … … 196 208 197 209 /** 210 * @brief Generic Blob 211 **/ 212 213 struct wbcBlob { 214 uint8_t *data; 215 size_t length; 216 }; 217 218 /** 219 * @brief Named Blob 220 **/ 221 222 struct wbcNamedBlob { 223 const char *name; 224 uint32_t flags; 225 struct wbcBlob blob; 226 }; 227 228 /** 198 229 * @brief Auth User Parameters 199 230 **/ … … 211 242 WBC_AUTH_USER_LEVEL_PLAIN = 1, 212 243 WBC_AUTH_USER_LEVEL_HASH = 2, 213 WBC_AUTH_USER_LEVEL_RESPONSE = 3 244 WBC_AUTH_USER_LEVEL_RESPONSE = 3, 245 WBC_AUTH_USER_LEVEL_PAC = 4 214 246 } level; 215 247 union { … … 226 258 uint8_t *lm_data; 227 259 } response; 260 struct wbcBlob pac; 228 261 } password; 229 };230 231 /**232 * @brief Generic Blob233 **/234 235 struct wbcBlob {236 uint8_t *data;237 size_t length;238 };239 240 /**241 * @brief Named Blob242 **/243 244 struct wbcNamedBlob {245 const char *name;246 uint32_t flags;247 struct wbcBlob blob;248 262 }; 249 263 … … 519 533 520 534 535 /********************************************************** 536 * Context Management 537 **********************************************************/ 538 539 /** 540 * @brief Create a new wbcContext context 541 * 542 * @return wbcContext 543 **/ 544 struct wbcContext *wbcCtxCreate(void); 545 546 /** 547 * @brief Free a library context 548 * 549 * @param ctx wbcContext to free 550 * 551 * @return void 552 **/ 553 void wbcCtxFree(struct wbcContext *ctx); 554 555 556 521 557 /* 522 558 * Utility functions for dealing with SIDs … … 596 632 * @brief Ping winbindd to see if the daemon is running 597 633 * 634 * @param *ctx wbclient Context 635 * 636 * @return #wbcErr 637 **/ 638 wbcErr wbcCtxPing(struct wbcContext *ctx); 639 640 /** 641 * @brief Ping winbindd to see if the daemon is running 642 * 598 643 * @return #wbcErr 599 644 **/ … … 602 647 wbcErr wbcLibraryDetails(struct wbcLibraryDetails **details); 603 648 649 wbcErr wbcCtxInterfaceDetails(struct wbcContext *ctx, 650 struct wbcInterfaceDetails **details); 604 651 wbcErr wbcInterfaceDetails(struct wbcInterfaceDetails **details); 605 652 … … 611 658 * @brief Convert a domain and name to SID 612 659 * 660 * @param *ctx wbclient Context 613 661 * @param dom_name Domain name (possibly "") 614 662 * @param name User or group name … … 618 666 * @return #wbcErr 619 667 **/ 668 wbcErr wbcCtxLookupName(struct wbcContext *ctx, 669 const char *dom_name, 670 const char *name, 671 struct wbcDomainSid *sid, 672 enum wbcSidType *name_type); 673 674 /** 675 * @brief Convert a domain and name to SID 676 * 677 * @param dom_name Domain name (possibly "") 678 * @param name User or group name 679 * @param *sid Pointer to the resolved domain SID 680 * @param *name_type Pointer to the SID type 681 * 682 * @return #wbcErr 683 **/ 620 684 wbcErr wbcLookupName(const char *dom_name, 621 685 const char *name, … … 626 690 * @brief Convert a SID to a domain and name 627 691 * 628 * @param *sid Pointer to the domain SID to be resolved 692 * @param *ctx wbclient Context 693 * @param *sid Pointer to the domain SID to be resolved 694 * @param domain Resolved Domain name (possibly "") 695 * @param name Resolved User or group name 696 * @param *name_type Pointer to the resolved SID type 697 * 698 * @return #wbcErr 699 **/ 700 wbcErr wbcCtxLookupSid(struct wbcContext *ctx, 701 const struct wbcDomainSid *sid, 702 char **domain, 703 char **name, 704 enum wbcSidType *name_type); 705 706 /** 707 * @brief Convert a SID to a domain and name 708 * 709 * @param *sid Pointer to the domain SID to be resolved 629 710 * @param domain Resolved Domain name (possibly "") 630 711 * @param name Resolved User or group name … … 644 725 }; 645 726 727 wbcErr wbcCtxLookupSids(struct wbcContext *ctx, 728 const struct wbcDomainSid *sids, int num_sids, 729 struct wbcDomainInfo **domains, int *num_domains, 730 struct wbcTranslatedName **names); 731 646 732 wbcErr wbcLookupSids(const struct wbcDomainSid *sids, int num_sids, 647 733 struct wbcDomainInfo **domains, int *num_domains, 648 734 struct wbcTranslatedName **names); 735 736 /** 737 * @brief Translate a collection of RIDs within a domain to names 738 */ 739 wbcErr wbcCtxLookupRids(struct wbcContext *ctx, 740 struct wbcDomainSid *dom_sid, 741 int num_rids, 742 uint32_t *rids, 743 const char **domain_name, 744 const char ***names, 745 enum wbcSidType **types); 649 746 650 747 /** … … 661 758 * @brief Get the groups a user belongs to 662 759 **/ 760 wbcErr wbcCtxLookupUserSids(struct wbcContext *ctx, 761 const struct wbcDomainSid *user_sid, 762 bool domain_groups_only, 763 uint32_t *num_sids, 764 struct wbcDomainSid **sids); 765 766 /* 767 * @brief Get the groups a user belongs to 768 **/ 663 769 wbcErr wbcLookupUserSids(const struct wbcDomainSid *user_sid, 664 770 bool domain_groups_only, 665 771 uint32_t *num_sids, 666 772 struct wbcDomainSid **sids); 773 774 /* 775 * @brief Get alias membership for sids 776 **/ 777 wbcErr wbcCtxGetSidAliases(struct wbcContext *ctx, 778 const struct wbcDomainSid *dom_sid, 779 struct wbcDomainSid *sids, 780 uint32_t num_sids, 781 uint32_t **alias_rids, 782 uint32_t *num_alias_rids); 667 783 668 784 /* … … 678 794 * @brief Lists Users 679 795 **/ 796 wbcErr wbcCtxListUsers(struct wbcContext *ctx, 797 const char *domain_name, 798 uint32_t *num_users, 799 const char ***users); 800 801 /** 802 * @brief Lists Users 803 **/ 680 804 wbcErr wbcListUsers(const char *domain_name, 681 805 uint32_t *num_users, … … 685 809 * @brief Lists Groups 686 810 **/ 811 wbcErr wbcCtxListGroups(struct wbcContext *ctx, 812 const char *domain_name, 813 uint32_t *num_groups, 814 const char ***groups); 815 816 /** 817 * @brief Lists Groups 818 **/ 687 819 wbcErr wbcListGroups(const char *domain_name, 688 820 uint32_t *num_groups, 689 821 const char ***groups); 822 823 wbcErr wbcCtxGetDisplayName(struct wbcContext *ctx, 824 const struct wbcDomainSid *sid, 825 char **pdomain, 826 char **pfullname, 827 enum wbcSidType *pname_type); 690 828 691 829 wbcErr wbcGetDisplayName(const struct wbcDomainSid *sid, … … 701 839 * @brief Convert a Windows SID to a Unix uid, allocating an uid if needed 702 840 * 841 * @param *ctx wbclient Context 703 842 * @param *sid Pointer to the domain SID to be resolved 704 843 * @param *puid Pointer to the resolved uid_t value … … 707 846 * 708 847 **/ 848 wbcErr wbcCtxSidToUid(struct wbcContext *ctx, 849 const struct wbcDomainSid *sid, 850 uid_t *puid); 851 852 /** 853 * @brief Convert a Windows SID to a Unix uid, allocating an uid if needed 854 * 855 * @param *sid Pointer to the domain SID to be resolved 856 * @param *puid Pointer to the resolved uid_t value 857 * 858 * @return #wbcErr 859 * 860 **/ 709 861 wbcErr wbcSidToUid(const struct wbcDomainSid *sid, 710 862 uid_t *puid); … … 725 877 * @brief Convert a Unix uid to a Windows SID, allocating a SID if needed 726 878 * 879 * @param *ctx wbclient Context 727 880 * @param uid Unix uid to be resolved 728 881 * @param *sid Pointer to the resolved domain SID … … 731 884 * 732 885 **/ 886 wbcErr wbcCtxUidToSid(struct wbcContext *ctx, uid_t uid, 887 struct wbcDomainSid *sid); 888 889 /** 890 * @brief Convert a Unix uid to a Windows SID, allocating a SID if needed 891 * 892 * @param uid Unix uid to be resolved 893 * @param *sid Pointer to the resolved domain SID 894 * 895 * @return #wbcErr 896 * 897 **/ 733 898 wbcErr wbcUidToSid(uid_t uid, 734 899 struct wbcDomainSid *sid); … … 749 914 * @brief Convert a Windows SID to a Unix gid, allocating a gid if needed 750 915 * 916 * @param *ctx wbclient Context 751 917 * @param *sid Pointer to the domain SID to be resolved 752 918 * @param *pgid Pointer to the resolved gid_t value … … 755 921 * 756 922 **/ 923 wbcErr wbcCtxSidToGid(struct wbcContext *ctx, 924 const struct wbcDomainSid *sid, 925 gid_t *pgid); 926 927 /** 928 * @brief Convert a Windows SID to a Unix gid, allocating a gid if needed 929 * 930 * @param *sid Pointer to the domain SID to be resolved 931 * @param *pgid Pointer to the resolved gid_t value 932 * 933 * @return #wbcErr 934 * 935 **/ 757 936 wbcErr wbcSidToGid(const struct wbcDomainSid *sid, 758 937 gid_t *pgid); … … 769 948 wbcErr wbcQuerySidToGid(const struct wbcDomainSid *sid, 770 949 gid_t *pgid); 950 951 /** 952 * @brief Convert a Unix gid to a Windows SID, allocating a SID if needed 953 * 954 * @param *ctx wbclient Context 955 * @param gid Unix gid to be resolved 956 * @param *sid Pointer to the resolved domain SID 957 * 958 * @return #wbcErr 959 * 960 **/ 961 wbcErr wbcCtxGidToSid(struct wbcContext *ctx, gid_t gid, 962 struct wbcDomainSid *sid); 771 963 772 964 /** … … 797 989 WBC_ID_TYPE_NOT_SPECIFIED, 798 990 WBC_ID_TYPE_UID, 799 WBC_ID_TYPE_GID 991 WBC_ID_TYPE_GID, 992 WBC_ID_TYPE_BOTH 800 993 }; 801 994 … … 813 1006 * @brief Convert a list of sids to unix ids 814 1007 * 1008 * @param *ctx wbclient Context 815 1009 * @param sids Pointer to an array of SIDs to convert 816 1010 * @param num_sids Number of SIDs … … 820 1014 * 821 1015 **/ 1016 wbcErr wbcCtxSidsToUnixIds(struct wbcContext *ctx, 1017 const struct wbcDomainSid *sids, uint32_t num_sids, 1018 struct wbcUnixId *ids); 1019 1020 /** 1021 * @brief Convert a list of sids to unix ids 1022 * 1023 * @param sids Pointer to an array of SIDs to convert 1024 * @param num_sids Number of SIDs 1025 * @param ids Preallocated output array for translated IDs 1026 * 1027 * @return #wbcErr 1028 * 1029 **/ 822 1030 wbcErr wbcSidsToUnixIds(const struct wbcDomainSid *sids, uint32_t num_sids, 823 1031 struct wbcUnixId *ids); … … 826 1034 * @brief Obtain a new uid from Winbind 827 1035 * 828 * @param *puid *pointer to the allocated uid 1036 * @param *ctx wbclient Context 1037 * @param *puid Pointer to the allocated uid 1038 * 1039 * @return #wbcErr 1040 **/ 1041 wbcErr wbcCtxAllocateUid(struct wbcContext *ctx, uid_t *puid); 1042 1043 /** 1044 * @brief Obtain a new uid from Winbind 1045 * 1046 * @param *puid Pointer to the allocated uid 829 1047 * 830 1048 * @return #wbcErr … … 835 1053 * @brief Obtain a new gid from Winbind 836 1054 * 837 * @param *pgid Pointer to the allocated gid 1055 * @param *ctx wbclient Context 1056 * @param *pgid Pointer to the allocated gid 1057 * 1058 * @return #wbcErr 1059 **/ 1060 wbcErr wbcCtxAllocateGid(struct wbcContext *ctx, gid_t *pgid); 1061 1062 /** 1063 * @brief Obtain a new gid from Winbind 1064 * 1065 * @param *pgid Pointer to the allocated gid 838 1066 * 839 1067 * @return #wbcErr … … 845 1073 * 846 1074 * @param uid Uid of the desired mapping. 847 * @param *sid Pointer to the sid of the d iresired mapping.1075 * @param *sid Pointer to the sid of the desired mapping. 848 1076 * 849 1077 * @return #wbcErr … … 858 1086 * 859 1087 * @param gid Gid of the desired mapping. 860 * @param *sid Pointer to the sid of the d iresired mapping.1088 * @param *sid Pointer to the sid of the desired mapping. 861 1089 * 862 1090 * @return #wbcErr … … 925 1153 * on username 926 1154 * 1155 * @param *ctx wbclient Context 927 1156 * @param *name Username to lookup 928 1157 * @param **pwd Pointer to resulting struct passwd* from the query. … … 930 1159 * @return #wbcErr 931 1160 **/ 1161 wbcErr wbcCtxGetpwnam(struct wbcContext *ctx, 1162 const char *name, struct passwd **pwd); 1163 1164 /** 1165 * @brief Fill in a struct passwd* for a domain user based 1166 * on username 1167 * 1168 * @param *name Username to lookup 1169 * @param **pwd Pointer to resulting struct passwd* from the query. 1170 * 1171 * @return #wbcErr 1172 **/ 932 1173 wbcErr wbcGetpwnam(const char *name, struct passwd **pwd); 933 1174 … … 936 1177 * on uid 937 1178 * 1179 * @param *ctx wbclient Context 938 1180 * @param uid Uid to lookup 939 1181 * @param **pwd Pointer to resulting struct passwd* from the query. … … 941 1183 * @return #wbcErr 942 1184 **/ 1185 wbcErr wbcCtxGetpwuid(struct wbcContext *ctx, 1186 uid_t uid, struct passwd **pwd); 1187 1188 /** 1189 * @brief Fill in a struct passwd* for a domain user based 1190 * on uid 1191 * 1192 * @param uid Uid to lookup 1193 * @param **pwd Pointer to resulting struct passwd* from the query. 1194 * 1195 * @return #wbcErr 1196 **/ 943 1197 wbcErr wbcGetpwuid(uid_t uid, struct passwd **pwd); 944 1198 … … 947 1201 * on sid 948 1202 * 1203 * @param *ctx wbclient Context 949 1204 * @param sid Sid to lookup 950 1205 * @param **pwd Pointer to resulting struct passwd* from the query. … … 952 1207 * @return #wbcErr 953 1208 **/ 1209 wbcErr wbcCtxGetpwsid(struct wbcContext *ctx, 1210 struct wbcDomainSid * sid, struct passwd **pwd); 1211 1212 /** 1213 * @brief Fill in a struct passwd* for a domain user based 1214 * on sid 1215 * 1216 * @param sid Sid to lookup 1217 * @param **pwd Pointer to resulting struct passwd* from the query. 1218 * 1219 * @return #wbcErr 1220 **/ 954 1221 wbcErr wbcGetpwsid(struct wbcDomainSid * sid, struct passwd **pwd); 955 1222 … … 958 1225 * on username 959 1226 * 1227 * @param *ctx wbclient Context 960 1228 * @param *name Username to lookup 961 1229 * @param **grp Pointer to resulting struct group* from the query. … … 963 1231 * @return #wbcErr 964 1232 **/ 1233 wbcErr wbcCtxGetgrnam(struct wbcContext *ctx, 1234 const char *name, struct group **grp); 1235 1236 /** 1237 * @brief Fill in a struct passwd* for a domain user based 1238 * on username 1239 * 1240 * @param *name Username to lookup 1241 * @param **grp Pointer to resulting struct group* from the query. 1242 * 1243 * @return #wbcErr 1244 **/ 965 1245 wbcErr wbcGetgrnam(const char *name, struct group **grp); 966 1246 … … 969 1249 * on uid 970 1250 * 1251 * @param *ctx wbclient Context 971 1252 * @param gid Uid to lookup 972 1253 * @param **grp Pointer to resulting struct group* from the query. … … 974 1255 * @return #wbcErr 975 1256 **/ 1257 wbcErr wbcCtxGetgrgid(struct wbcContext *ctx, 1258 gid_t gid, struct group **grp); 1259 1260 /** 1261 * @brief Fill in a struct passwd* for a domain user based 1262 * on uid 1263 * 1264 * @param gid Uid to lookup 1265 * @param **grp Pointer to resulting struct group* from the query. 1266 * 1267 * @return #wbcErr 1268 **/ 976 1269 wbcErr wbcGetgrgid(gid_t gid, struct group **grp); 977 1270 … … 979 1272 * @brief Reset the passwd iterator 980 1273 * 1274 * @param *ctx wbclient Context 1275 * 1276 * @return #wbcErr 1277 **/ 1278 wbcErr wbcCtxSetpwent(struct wbcContext *ctx); 1279 1280 /** 1281 * @brief Reset the passwd iterator 1282 * 981 1283 * @return #wbcErr 982 1284 **/ … … 986 1288 * @brief Close the passwd iterator 987 1289 * 1290 * @param *ctx wbclient Context 1291 * 1292 * @return #wbcErr 1293 **/ 1294 wbcErr wbcCtxEndpwent(struct wbcContext *ctx); 1295 1296 /** 1297 * @brief Close the passwd iterator 1298 * 988 1299 * @return #wbcErr 989 1300 **/ … … 993 1304 * @brief Return the next struct passwd* entry from the pwent iterator 994 1305 * 995 * @param **pwd Pointer to resulting struct passwd* from the query. 1306 * @param *ctx wbclient Context 1307 * @param **pwd Pointer to resulting struct passwd* from the query. 1308 * 1309 * @return #wbcErr 1310 **/ 1311 wbcErr wbcCtxGetpwent(struct wbcContext *ctx, struct passwd **pwd); 1312 1313 /** 1314 * @brief Return the next struct passwd* entry from the pwent iterator 1315 * 1316 * @param **pwd Pointer to resulting struct passwd* from the query. 996 1317 * 997 1318 * @return #wbcErr … … 1002 1323 * @brief Reset the group iterator 1003 1324 * 1325 * @param *ctx wbclient Context 1326 * 1327 * @return #wbcErr 1328 **/ 1329 wbcErr wbcCtxSetgrent(struct wbcContext *ctx); 1330 1331 /** 1332 * @brief Reset the group iterator 1333 * 1004 1334 * @return #wbcErr 1005 1335 **/ … … 1009 1339 * @brief Close the group iterator 1010 1340 * 1341 * @param *ctx wbclient Context 1342 * 1343 * @return #wbcErr 1344 **/ 1345 wbcErr wbcCtxEndgrent(struct wbcContext *ctx); 1346 1347 /** 1348 * @brief Close the group iterator 1349 * 1011 1350 * @return #wbcErr 1012 1351 **/ … … 1016 1355 * @brief Return the next struct group* entry from the pwent iterator 1017 1356 * 1018 * @param **grp Pointer to resulting struct group* from the query. 1357 * @param *ctx wbclient Context 1358 * @param **grp Pointer to resulting struct group* from the query. 1359 * 1360 * @return #wbcErr 1361 **/ 1362 wbcErr wbcCtxGetgrent(struct wbcContext *ctx, struct group **grp); 1363 1364 /** 1365 * @brief Return the next struct group* entry from the pwent iterator 1366 * 1367 * @param **grp Pointer to resulting struct group* from the query. 1019 1368 * 1020 1369 * @return #wbcErr … … 1027 1376 * This is similar to #wbcGetgrent, just that the member list is empty 1028 1377 * 1029 * @param **grp Pointer to resulting struct group* from the query. 1378 * @param *ctx wbclient Context 1379 * @param **grp Pointer to resulting struct group* from the query. 1380 * 1381 * @return #wbcErr 1382 **/ 1383 wbcErr wbcCtxGetgrlist(struct wbcContext *ctx, struct group **grp); 1384 1385 /** 1386 * @brief Return the next struct group* entry from the pwent iterator 1387 * 1388 * This is similar to #wbcGetgrent, just that the member list is empty 1389 * 1390 * @param **grp Pointer to resulting struct group* from the query. 1030 1391 * 1031 1392 * @return #wbcErr … … 1036 1397 * @brief Return the unix group array belonging to the given user 1037 1398 * 1399 * @param *ctx wbclient Context 1038 1400 * @param *account The given user name 1039 1401 * @param *num_groups Number of elements returned in the groups array … … 1042 1404 * @return #wbcErr 1043 1405 **/ 1406 wbcErr wbcCtxGetGroups(struct wbcContext *ctx, 1407 const char *account, 1408 uint32_t *num_groups, 1409 gid_t **_groups); 1410 1411 /** 1412 * @brief Return the unix group array belonging to the given user 1413 * 1414 * @param *account The given user name 1415 * @param *num_groups Number of elements returned in the groups array 1416 * @param **_groups Pointer to resulting gid_t array. 1417 * 1418 * @return #wbcErr 1419 **/ 1044 1420 wbcErr wbcGetGroups(const char *account, 1045 1421 uint32_t *num_groups, … … 1054 1430 * @brief Lookup the current status of a trusted domain 1055 1431 * 1056 * @param domain The domain to query 1432 * @param *ctx wbclient Context 1433 * @param domain The domain to query 1434 * 1435 * @param dinfo A pointer to store the returned domain_info struct. 1436 * 1437 * @return #wbcErr 1438 **/ 1439 wbcErr wbcCtxDomainInfo(struct wbcContext *ctx, 1440 const char *domain, 1441 struct wbcDomainInfo **dinfo); 1442 1443 /** 1444 * @brief Lookup the current status of a trusted domain 1445 * 1446 * @param domain The domain to query 1057 1447 * 1058 1448 * @param dinfo A pointer to store the returned domain_info struct. … … 1066 1456 * @brief Lookup the currently contacted DCs 1067 1457 * 1458 * @param *ctx wbclient Context 1068 1459 * @param domain The domain to query 1069 1460 * … … 1074 1465 * @return #wbcErr 1075 1466 **/ 1467 wbcErr wbcCtxDcInfo(struct wbcContext *ctx, 1468 const char *domain, size_t *num_dcs, 1469 const char ***dc_names, const char ***dc_ips); 1470 1471 /** 1472 * @brief Lookup the currently contacted DCs 1473 * 1474 * @param domain The domain to query 1475 * 1476 * @param num_dcs Number of DCs currently known 1477 * @param dc_names Names of the currently known DCs 1478 * @param dc_ips IP addresses of the currently known DCs 1479 * 1480 * @return #wbcErr 1481 **/ 1076 1482 wbcErr wbcDcInfo(const char *domain, size_t *num_dcs, 1077 1483 const char ***dc_names, const char ***dc_ips); 1484 1485 /** 1486 * @brief Enumerate the domain trusts known by Winbind 1487 * 1488 * @param *ctx wbclient Context 1489 * @param **domains Pointer to the allocated domain list array 1490 * @param *num_domains Pointer to number of domains returned 1491 * 1492 * @return #wbcErr 1493 **/ 1494 wbcErr wbcCtxListTrusts(struct wbcContext *ctx, 1495 struct wbcDomainInfo **domains, 1496 size_t *num_domains); 1078 1497 1079 1498 /** … … 1113 1532 * @brief Enumerate the domain trusts known by Winbind 1114 1533 * 1534 * @param *ctx wbclient Context 1115 1535 * @param domain Name of the domain to query for a DC 1116 1536 * @param flags Bit flags used to control the domain location query … … 1119 1539 * @return #wbcErr 1120 1540 **/ 1541 wbcErr wbcCtxLookupDomainController(struct wbcContext *ctx, 1542 const char *domain, 1543 uint32_t flags, 1544 struct wbcDomainControllerInfo **dc_info); 1545 1546 /** 1547 * @brief Enumerate the domain trusts known by Winbind 1548 * 1549 * @param domain Name of the domain to query for a DC 1550 * @param flags Bit flags used to control the domain location query 1551 * @param *dc_info Pointer to the returned domain controller information 1552 * 1553 * @return #wbcErr 1554 **/ 1121 1555 wbcErr wbcLookupDomainController(const char *domain, 1122 1556 uint32_t flags, … … 1126 1560 * @brief Get extended domain controller information 1127 1561 * 1562 * @param *ctx wbclient Context 1128 1563 * @param domain Name of the domain to query for a DC 1129 1564 * @param guid Guid of the domain to query for a DC … … 1134 1569 * @return #wbcErr 1135 1570 **/ 1571 wbcErr wbcCtxLookupDomainControllerEx(struct wbcContext *ctx, 1572 const char *domain, 1573 struct wbcGuid *guid, 1574 const char *site, 1575 uint32_t flags, 1576 struct wbcDomainControllerInfoEx **dc_info); 1577 1578 /** 1579 * @brief Get extended domain controller information 1580 * 1581 * @param domain Name of the domain to query for a DC 1582 * @param guid Guid of the domain to query for a DC 1583 * @param site Site of the domain to query for a DC 1584 * @param flags Bit flags used to control the domain location query 1585 * @param *dc_info Pointer to the returned extended domain controller information 1586 * 1587 * @return #wbcErr 1588 **/ 1136 1589 wbcErr wbcLookupDomainControllerEx(const char *domain, 1137 1590 struct wbcGuid *guid, … … 1147 1600 * @brief Authenticate a username/password pair 1148 1601 * 1602 * @param *ctx wbclient Context 1149 1603 * @param username Name of user to authenticate 1150 1604 * @param password Clear text password os user … … 1152 1606 * @return #wbcErr 1153 1607 **/ 1608 wbcErr wbcCtxAuthenticateUser(struct wbcContext *ctx, 1609 const char *username, 1610 const char *password); 1611 1612 /** 1613 * @brief Authenticate a username/password pair 1614 * 1615 * @param username Name of user to authenticate 1616 * @param password Clear text password os user 1617 * 1618 * @return #wbcErr 1619 **/ 1154 1620 wbcErr wbcAuthenticateUser(const char *username, 1155 1621 const char *password); … … 1158 1624 * @brief Authenticate with more detailed information 1159 1625 * 1626 * @param *ctx wbclient Context 1160 1627 * @param params Input parameters, WBC_AUTH_USER_LEVEL_HASH 1161 1628 * is not supported yet … … 1165 1632 * @return #wbcErr 1166 1633 **/ 1634 wbcErr wbcCtxAuthenticateUserEx(struct wbcContext *ctx, 1635 const struct wbcAuthUserParams *params, 1636 struct wbcAuthUserInfo **info, 1637 struct wbcAuthErrorInfo **error); 1638 1639 /** 1640 * @brief Authenticate with more detailed information 1641 * 1642 * @param params Input parameters, WBC_AUTH_USER_LEVEL_HASH 1643 * is not supported yet 1644 * @param info Output details on WBC_ERR_SUCCESS 1645 * @param error Output details on WBC_ERR_AUTH_ERROR 1646 * 1647 * @return #wbcErr 1648 **/ 1167 1649 wbcErr wbcAuthenticateUserEx(const struct wbcAuthUserParams *params, 1168 1650 struct wbcAuthUserInfo **info, … … 1172 1654 * @brief Logon a User 1173 1655 * 1656 * @param[in] *ctx wbclient Context 1174 1657 * @param[in] params Pointer to a wbcLogonUserParams structure 1175 1658 * @param[out] info Pointer to a pointer to a wbcLogonUserInfo structure … … 1179 1662 * @return #wbcErr 1180 1663 **/ 1664 wbcErr wbcCtxLogonUser(struct wbcContext *ctx, 1665 const struct wbcLogonUserParams *params, 1666 struct wbcLogonUserInfo **info, 1667 struct wbcAuthErrorInfo **error, 1668 struct wbcUserPasswordPolicyInfo **policy); 1669 1670 /** 1671 * @brief Logon a User 1672 * 1673 * @param[in] params Pointer to a wbcLogonUserParams structure 1674 * @param[out] info Pointer to a pointer to a wbcLogonUserInfo structure 1675 * @param[out] error Pointer to a pointer to a wbcAuthErrorInfo structure 1676 * @param[out] policy Pointer to a pointer to a wbcUserPasswordPolicyInfo structure 1677 * 1678 * @return #wbcErr 1679 **/ 1181 1680 wbcErr wbcLogonUser(const struct wbcLogonUserParams *params, 1182 1681 struct wbcLogonUserInfo **info, … … 1187 1686 * @brief Trigger a logoff notification to Winbind for a specific user 1188 1687 * 1688 * @param *ctx wbclient Context 1189 1689 * @param username Name of user to remove from Winbind's list of 1190 1690 * logged on users. … … 1195 1695 * @return #wbcErr 1196 1696 **/ 1697 wbcErr wbcCtxLogoffUser(struct wbcContext *ctx, 1698 const char *username, uid_t uid, 1699 const char *ccfilename); 1700 1701 /** 1702 * @brief Trigger a logoff notification to Winbind for a specific user 1703 * 1704 * @param username Name of user to remove from Winbind's list of 1705 * logged on users. 1706 * @param uid Uid assigned to the username 1707 * @param ccfilename Absolute path to the Krb5 credentials cache to 1708 * be removed 1709 * 1710 * @return #wbcErr 1711 **/ 1197 1712 wbcErr wbcLogoffUser(const char *username, 1198 1713 uid_t uid, … … 1202 1717 * @brief Trigger an extended logoff notification to Winbind for a specific user 1203 1718 * 1719 * @param *ctx wbclient Context 1204 1720 * @param params A wbcLogoffUserParams structure 1205 1721 * @param error User output details on error … … 1207 1723 * @return #wbcErr 1208 1724 **/ 1725 wbcErr wbcCtxLogoffUserEx(struct wbcContext *ctx, 1726 const struct wbcLogoffUserParams *params, 1727 struct wbcAuthErrorInfo **error); 1728 1729 /** 1730 * @brief Trigger an extended logoff notification to Winbind for a specific user 1731 * 1732 * @param params A wbcLogoffUserParams structure 1733 * @param error User output details on error 1734 * 1735 * @return #wbcErr 1736 **/ 1209 1737 wbcErr wbcLogoffUserEx(const struct wbcLogoffUserParams *params, 1210 1738 struct wbcAuthErrorInfo **error); … … 1213 1741 * @brief Change a password for a user 1214 1742 * 1743 * @param *ctx wbclient Context 1215 1744 * @param username Name of user to authenticate 1216 1745 * @param old_password Old clear text password of user … … 1219 1748 * @return #wbcErr 1220 1749 **/ 1750 wbcErr wbcCtxChangeUserPassword(struct wbcContext *ctx, 1751 const char *username, 1752 const char *old_password, 1753 const char *new_password); 1754 1755 /** 1756 * @brief Change a password for a user 1757 * 1758 * @param username Name of user to authenticate 1759 * @param old_password Old clear text password of user 1760 * @param new_password New clear text password of user 1761 * 1762 * @return #wbcErr 1763 **/ 1221 1764 wbcErr wbcChangeUserPassword(const char *username, 1222 1765 const char *old_password, … … 1227 1770 * failure 1228 1771 * 1772 * @param *ctx wbclient Context 1229 1773 * @param params Input parameters 1230 1774 * @param error User output details on WBC_ERR_PWD_CHANGE_FAILED … … 1234 1778 * @return #wbcErr 1235 1779 **/ 1780 wbcErr wbcCtxChangeUserPasswordEx(struct wbcContext *ctx, 1781 const struct wbcChangePasswordParams *params, 1782 struct wbcAuthErrorInfo **error, 1783 enum wbcPasswordChangeRejectReason *reject_reason, 1784 struct wbcUserPasswordPolicyInfo **policy); 1785 1786 /** 1787 * @brief Change a password for a user with more detailed information upon 1788 * failure 1789 * 1790 * @param params Input parameters 1791 * @param error User output details on WBC_ERR_PWD_CHANGE_FAILED 1792 * @param reject_reason New password reject reason on WBC_ERR_PWD_CHANGE_FAILED 1793 * @param policy Password policy output details on WBC_ERR_PWD_CHANGE_FAILED 1794 * 1795 * @return #wbcErr 1796 **/ 1236 1797 wbcErr wbcChangeUserPasswordEx(const struct wbcChangePasswordParams *params, 1237 1798 struct wbcAuthErrorInfo **error, … … 1242 1803 * @brief Authenticate a user with cached credentials 1243 1804 * 1805 * @param *ctx wbclient Context 1244 1806 * @param *params Pointer to a wbcCredentialCacheParams structure 1245 1807 * @param **info Pointer to a pointer to a wbcCredentialCacheInfo structure … … 1248 1810 * @return #wbcErr 1249 1811 **/ 1812 wbcErr wbcCtxCredentialCache(struct wbcContext *ctx, 1813 struct wbcCredentialCacheParams *params, 1814 struct wbcCredentialCacheInfo **info, 1815 struct wbcAuthErrorInfo **error); 1816 1817 /** 1818 * @brief Authenticate a user with cached credentials 1819 * 1820 * @param *params Pointer to a wbcCredentialCacheParams structure 1821 * @param **info Pointer to a pointer to a wbcCredentialCacheInfo structure 1822 * @param **error Pointer to a pointer to a wbcAuthErrorInfo structure 1823 * 1824 * @return #wbcErr 1825 **/ 1250 1826 wbcErr wbcCredentialCache(struct wbcCredentialCacheParams *params, 1251 1827 struct wbcCredentialCacheInfo **info, … … 1255 1831 * @brief Save a password with winbind for doing wbcCredentialCache() later 1256 1832 * 1833 * @param *ctx wbclient Context 1834 * @param *user Username 1835 * @param *password Password 1836 * 1837 * @return #wbcErr 1838 **/ 1839 wbcErr wbcCtxCredentialSave(struct wbcContext *ctx, 1840 const char *user, const char *password); 1841 1842 /** 1843 * @brief Save a password with winbind for doing wbcCredentialCache() later 1844 * 1257 1845 * @param *user Username 1258 1846 * @param *password Password … … 1269 1857 * @brief Resolve a NetbiosName via WINS 1270 1858 * 1859 * @param *ctx wbclient Context 1271 1860 * @param name Name to resolve 1272 1861 * @param *ip Pointer to the ip address string … … 1274 1863 * @return #wbcErr 1275 1864 **/ 1865 wbcErr wbcCtxResolveWinsByName(struct wbcContext *ctx, 1866 const char *name, char **ip); 1867 1868 /** 1869 * @brief Resolve a NetbiosName via WINS 1870 * 1871 * @param name Name to resolve 1872 * @param *ip Pointer to the ip address string 1873 * 1874 * @return #wbcErr 1875 **/ 1276 1876 wbcErr wbcResolveWinsByName(const char *name, char **ip); 1277 1877 … … 1279 1879 * @brief Resolve an IP address via WINS into a NetbiosName 1280 1880 * 1281 * @param ip The ip address string 1282 * @param *name Pointer to the name 1881 * @param *ctx wbclient Context 1882 * @param ip The ip address string 1883 * @param *name Pointer to the name 1884 * 1885 * @return #wbcErr 1886 * 1887 **/ 1888 wbcErr wbcCtxResolveWinsByIP(struct wbcContext *ctx, 1889 const char *ip, char **name); 1890 1891 /** 1892 * @brief Resolve an IP address via WINS into a NetbiosName 1893 * 1894 * @param ip The ip address string 1895 * @param *name Pointer to the name 1283 1896 * 1284 1897 * @return #wbcErr … … 1294 1907 * @brief Trigger a verification of the trust credentials of a specific domain 1295 1908 * 1909 * @param *ctx wbclient Context 1296 1910 * @param *domain The name of the domain. 1297 1911 * @param error Output details on WBC_ERR_AUTH_ERROR … … 1299 1913 * @return #wbcErr 1300 1914 **/ 1915 wbcErr wbcCtxCheckTrustCredentials(struct wbcContext *ctx, const char *domain, 1916 struct wbcAuthErrorInfo **error); 1917 1918 /** 1919 * @brief Trigger a verification of the trust credentials of a specific domain 1920 * 1921 * @param *domain The name of the domain. 1922 * @param error Output details on WBC_ERR_AUTH_ERROR 1923 * 1924 * @return #wbcErr 1925 **/ 1301 1926 wbcErr wbcCheckTrustCredentials(const char *domain, 1302 1927 struct wbcAuthErrorInfo **error); … … 1305 1930 * @brief Trigger a change of the trust credentials for a specific domain 1306 1931 * 1932 * @param *ctx wbclient Context 1307 1933 * @param *domain The name of the domain. 1308 1934 * @param error Output details on WBC_ERR_AUTH_ERROR … … 1310 1936 * @return #wbcErr 1311 1937 **/ 1938 wbcErr wbcCtxChangeTrustCredentials(struct wbcContext *ctx, const char *domain, 1939 struct wbcAuthErrorInfo **error); 1940 1941 /** 1942 * @brief Trigger a change of the trust credentials for a specific domain 1943 * 1944 * @param *domain The name of the domain. 1945 * @param error Output details on WBC_ERR_AUTH_ERROR 1946 * 1947 * @return #wbcErr 1948 **/ 1312 1949 wbcErr wbcChangeTrustCredentials(const char *domain, 1313 1950 struct wbcAuthErrorInfo **error); … … 1317 1954 * version of wbcCheckTrustCredentials 1318 1955 * 1956 * @param *ctx wbclient Context 1319 1957 * @param *domain The name of the domain, only NULL for the default domain is 1320 1958 * supported yet. Other values than NULL will result in … … 1324 1962 * @return #wbcErr 1325 1963 **/ 1964 wbcErr wbcCtxPingDc(struct wbcContext *ctx, const char *domain, 1965 struct wbcAuthErrorInfo **error); 1966 1967 /** 1968 * @brief Trigger a no-op call through the NETLOGON pipe. Low-cost 1969 * version of wbcCheckTrustCredentials 1970 * 1971 * @param *domain The name of the domain, only NULL for the default domain is 1972 * supported yet. Other values than NULL will result in 1973 * WBC_ERR_NOT_IMPLEMENTED. 1974 * @param error Output details on WBC_ERR_AUTH_ERROR 1975 * 1976 * @return #wbcErr 1977 **/ 1326 1978 wbcErr wbcPingDc(const char *domain, struct wbcAuthErrorInfo **error); 1979 1980 /** 1981 * @brief Trigger a no-op call through the NETLOGON pipe. Low-cost 1982 * version of wbcCheckTrustCredentials 1983 * 1984 * @param *ctx wbclient Context 1985 * @param *domain The name of the domain, only NULL for the default domain is 1986 * supported yet. Other values than NULL will result in 1987 * WBC_ERR_NOT_IMPLEMENTED. 1988 * @param error Output details on WBC_ERR_AUTH_ERROR 1989 * @param dcname DC that was attempted to ping 1990 * 1991 * @return #wbcErr 1992 **/ 1993 wbcErr wbcCtxPingDc2(struct wbcContext *ctx, const char *domain, 1994 struct wbcAuthErrorInfo **error, 1995 char **dcname); 1996 1997 /** 1998 * @brief Trigger a no-op call through the NETLOGON pipe. Low-cost 1999 * version of wbcCheckTrustCredentials 2000 * 2001 * @param *domain The name of the domain, only NULL for the default domain is 2002 * supported yet. Other values than NULL will result in 2003 * WBC_ERR_NOT_IMPLEMENTED. 2004 * @param error Output details on WBC_ERR_AUTH_ERROR 2005 * @param dcname DC that was attempted to ping 2006 * 2007 * @return #wbcErr 2008 **/ 2009 wbcErr wbcPingDc2(const char *domain, struct wbcAuthErrorInfo **error, 2010 char **dcname); 1327 2011 1328 2012 /**********************************************************
Note:
See TracChangeset
for help on using the changeset viewer.