• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/samba-3.0.25b/source/libmsrpc/

Lines Matching refs:hnd

33 DOM_SID *cac_get_domain_sid( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
36 int cac_SamConnect( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
43 if ( !hnd )
46 if ( !hnd->_internal.ctx ) {
47 hnd->status = NT_STATUS_INVALID_HANDLE;
52 hnd->status = NT_STATUS_INVALID_PARAMETER;
56 srv = cac_GetServer( hnd );
58 hnd->status = NT_STATUS_INVALID_CONNECTION;
63 if ( !hnd->_internal.pipes[PI_SAMR] ) {
67 &hnd->status ) ) ) {
71 hnd->_internal.pipes[PI_SAMR] = True;
74 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
76 hnd->status = NT_STATUS_INVALID_HANDLE;
82 hnd->status = NT_STATUS_NO_MEMORY;
86 if ( hnd->_internal.srv_level >= SRV_WIN_2K_SP3 ) {
87 hnd->status =
92 if ( hnd->_internal.srv_level < SRV_WIN_2K_SP3
93 || !NT_STATUS_IS_OK( hnd->status ) ) {
96 hnd->status =
100 if ( NT_STATUS_IS_OK( hnd->status )
101 && hnd->_internal.srv_level > SRV_WIN_2K ) {
102 hnd->_internal.srv_level = SRV_WIN_2K;
106 if ( !NT_STATUS_IS_OK( hnd->status ) )
114 int cac_SamClose( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
119 if ( !hnd )
122 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
123 hnd->status = NT_STATUS_INVALID_HANDLE;
128 hnd->status = NT_STATUS_INVALID_PARAMETER;
132 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
134 hnd->status = NT_STATUS_INVALID_HANDLE;
138 hnd->status = rpccli_samr_close( pipe_hnd, mem_ctx, sam );
140 if ( !NT_STATUS_IS_OK( hnd->status ) )
151 DOM_SID *cac_get_domain_sid( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
165 if ( !cac_LsaOpenPolicy( hnd, mem_ctx, &lop ) )
171 if ( !cac_LsaFetchSid( hnd, mem_ctx, &fs ) )
174 cac_LsaClosePolicy( hnd, mem_ctx, lop.out.pol );
184 hnd->status = NT_STATUS_NO_MEMORY;
191 int cac_SamOpenDomain( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
202 if ( !hnd )
205 if ( !hnd->_internal.ctx ) {
206 hnd->status = NT_STATUS_INVALID_HANDLE;
211 hnd->status = NT_STATUS_INVALID_PARAMETER;
223 if ( !cac_SamConnect( hnd, mem_ctx, &sc ) ) {
239 sld.in.name = hnd->domain;
241 if ( cac_SamLookupDomain( hnd, mem_ctx, &sld ) ) {
247 cac_get_domain_sid( hnd, mem_ctx,
255 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
257 hnd->status = NT_STATUS_INVALID_HANDLE;
263 hnd->status = NT_STATUS_NO_MEMORY;
268 hnd->status =
272 if ( !NT_STATUS_IS_OK( hnd->status ) )
281 int cac_SamOpenUser( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
293 if ( !hnd )
296 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
297 hnd->status = NT_STATUS_INVALID_HANDLE;
302 hnd->status = NT_STATUS_INVALID_PARAMETER;
307 hnd->status = NT_STATUS_INVALID_PARAMETER;
311 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
313 hnd->status = NT_STATUS_INVALID_HANDLE;
320 hnd->status =
328 if ( !NT_STATUS_IS_OK( hnd->status ) )
333 hnd->status = NT_STATUS_INVALID_PARAMETER;
345 hnd->status = NT_STATUS_NO_MEMORY;
349 hnd->status =
353 if ( !NT_STATUS_IS_OK( hnd->status ) )
361 int cac_SamCreateUser( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
372 if ( !hnd )
375 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
376 hnd->status = NT_STATUS_INVALID_HANDLE;
382 hnd->status = NT_STATUS_INVALID_PARAMETER;
386 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
388 hnd->status = NT_STATUS_INVALID_HANDLE;
394 hnd->status = NT_STATUS_NO_MEMORY;
398 hnd->status =
404 if ( !NT_STATUS_IS_OK( hnd->status ) )
413 int cac_SamDeleteUser( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
418 if ( !hnd )
421 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
422 hnd->status = NT_STATUS_INVALID_HANDLE;
427 hnd->status = NT_STATUS_INVALID_PARAMETER;
431 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
433 hnd->status = NT_STATUS_INVALID_HANDLE;
437 hnd->status =
440 if ( !NT_STATUS_IS_OK( hnd->status ) )
446 int cac_SamEnumUsers( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
456 if ( !hnd )
459 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
460 hnd->status = NT_STATUS_INVALID_HANDLE;
465 hnd->status = NT_STATUS_INVALID_PARAMETER;
473 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
475 hnd->status = NT_STATUS_INVALID_HANDLE;
481 hnd->status =
488 if ( NT_STATUS_IS_OK( hnd->status ) )
493 if ( !NT_STATUS_IS_OK( hnd->status )
494 && NT_STATUS_V( hnd->status ) !=
506 int cac_SamGetNamesFromRids( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
520 if ( !hnd )
523 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
524 hnd->status = NT_STATUS_INVALID_HANDLE;
529 hnd->status = NT_STATUS_INVALID_PARAMETER;
534 hnd->status = NT_STATUS_INVALID_PARAMETER;
544 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
546 hnd->status = NT_STATUS_INVALID_HANDLE;
550 hnd->status =
556 if ( !NT_STATUS_IS_OK( hnd->status )
557 && !NT_STATUS_EQUAL( hnd->status, STATUS_SOME_UNMAPPED ) )
563 hnd->status = NT_STATUS_NO_MEMORY;
590 if ( NT_STATUS_EQUAL( hnd->status, STATUS_SOME_UNMAPPED ) )
596 int cac_SamGetRidsFromNames( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
609 if ( !hnd )
612 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
613 hnd->status = NT_STATUS_INVALID_HANDLE;
618 hnd->status = NT_STATUS_INVALID_PARAMETER;
623 hnd->status = NT_STATUS_INVALID_PARAMETER;
633 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
635 hnd->status = NT_STATUS_INVALID_HANDLE;
639 hnd->status =
646 if ( !NT_STATUS_IS_OK( hnd->status )
647 && !NT_STATUS_EQUAL( hnd->status, STATUS_SOME_UNMAPPED ) )
653 hnd->status = NT_STATUS_NO_MEMORY;
681 if ( NT_STATUS_EQUAL( hnd->status, STATUS_SOME_UNMAPPED ) )
688 int cac_SamGetGroupsForUser( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
701 if ( !hnd )
704 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
705 hnd->status = NT_STATUS_INVALID_HANDLE;
710 hnd->status = NT_STATUS_INVALID_PARAMETER;
714 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
716 hnd->status = NT_STATUS_INVALID_HANDLE;
720 hnd->status =
725 if ( !NT_STATUS_IS_OK( hnd->status ) )
732 hnd->status = NT_STATUS_NO_MEMORY;
737 hnd->status = NT_STATUS_NO_MEMORY;
760 int cac_SamOpenGroup( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
767 if ( !hnd )
770 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
771 hnd->status = NT_STATUS_INVALID_HANDLE;
776 hnd->status = NT_STATUS_INVALID_PARAMETER;
780 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
782 hnd->status = NT_STATUS_INVALID_HANDLE;
788 hnd->status = NT_STATUS_NO_MEMORY;
792 hnd->status =
797 if ( !NT_STATUS_IS_OK( hnd->status ) )
805 int cac_SamCreateGroup( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
812 if ( !hnd )
815 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
816 hnd->status = NT_STATUS_INVALID_HANDLE;
822 hnd->status = NT_STATUS_INVALID_PARAMETER;
826 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
828 hnd->status = NT_STATUS_INVALID_HANDLE;
834 hnd->status = NT_STATUS_NO_MEMORY;
838 hnd->status =
843 if ( !NT_STATUS_IS_OK( hnd->status ) )
852 int cac_SamDeleteGroup( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
857 if ( !hnd )
860 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
861 hnd->status = NT_STATUS_INVALID_HANDLE;
866 hnd->status = NT_STATUS_INVALID_PARAMETER;
870 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
872 hnd->status = NT_STATUS_INVALID_HANDLE;
876 hnd->status =
879 if ( !NT_STATUS_IS_OK( hnd->status ) )
886 int cac_SamGetGroupMembers( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
895 if ( !hnd )
898 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
899 hnd->status = NT_STATUS_INVALID_HANDLE;
904 hnd->status = NT_STATUS_INVALID_PARAMETER;
908 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
910 hnd->status = NT_STATUS_INVALID_HANDLE;
914 hnd->status =
919 if ( !NT_STATUS_IS_OK( hnd->status ) )
930 int cac_SamAddGroupMember( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
935 if ( !hnd )
938 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
939 hnd->status = NT_STATUS_INVALID_HANDLE;
944 hnd->status = NT_STATUS_INVALID_PARAMETER;
948 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
950 hnd->status = NT_STATUS_INVALID_HANDLE;
954 hnd->status =
958 if ( !NT_STATUS_IS_OK( hnd->status ) )
964 int cac_SamRemoveGroupMember( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
969 if ( !hnd )
972 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
973 hnd->status = NT_STATUS_INVALID_HANDLE;
978 hnd->status = NT_STATUS_INVALID_PARAMETER;
982 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
984 hnd->status = NT_STATUS_INVALID_HANDLE;
988 hnd->status =
992 if ( !NT_STATUS_IS_OK( hnd->status ) )
998 int cac_SamClearGroupMembers( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1013 if ( !hnd )
1016 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1017 hnd->status = NT_STATUS_INVALID_HANDLE;
1022 hnd->status = NT_STATUS_INVALID_PARAMETER;
1026 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1028 hnd->status = NT_STATUS_INVALID_HANDLE;
1032 hnd->status =
1036 if ( !NT_STATUS_IS_OK( hnd->status ) )
1040 for ( i = 0; i < num_mem && NT_STATUS_IS_OK( hnd->status ); i++ ) {
1041 hnd->status =
1047 if ( !NT_STATUS_IS_OK( hnd->status ) ) {
1066 int cac_SamSetGroupMembers( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1073 if ( !hnd )
1076 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1077 hnd->status = NT_STATUS_INVALID_HANDLE;
1082 hnd->status = NT_STATUS_INVALID_PARAMETER;
1086 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1088 hnd->status = NT_STATUS_INVALID_HANDLE;
1093 if ( !cac_SamClearGroupMembers( hnd, mem_ctx, op->in.group_hnd ) )
1094 return CAC_FAILURE; /*hnd->status is already set */
1097 for ( i = 0; i < op->in.num_members && NT_STATUS_IS_OK( hnd->status );
1099 hnd->status =
1105 if ( !NT_STATUS_IS_OK( hnd->status ) )
1112 int cac_SamEnumGroups( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1127 if ( !hnd )
1130 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1131 hnd->status = NT_STATUS_INVALID_HANDLE;
1136 hnd->status = NT_STATUS_INVALID_PARAMETER;
1144 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1146 hnd->status = NT_STATUS_INVALID_HANDLE;
1152 hnd->status =
1159 if ( NT_STATUS_IS_OK( hnd->status ) ) {
1161 } else if ( NT_STATUS_V( hnd->status ) !=
1171 hnd->status = NT_STATUS_NO_MEMORY;
1178 hnd->status = NT_STATUS_NO_MEMORY;
1186 hnd->status = NT_STATUS_NO_MEMORY;
1205 hnd->status = NT_STATUS_NO_MEMORY;
1219 int cac_SamEnumAliases( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1234 if ( !hnd )
1237 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1238 hnd->status = NT_STATUS_INVALID_HANDLE;
1243 hnd->status = NT_STATUS_INVALID_PARAMETER;
1252 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1254 hnd->status = NT_STATUS_INVALID_HANDLE;
1260 hnd->status =
1267 if ( NT_STATUS_IS_OK( hnd->status ) )
1272 if ( !NT_STATUS_IS_OK( hnd->status )
1273 && NT_STATUS_V( hnd->status ) !=
1280 hnd->status = NT_STATUS_NO_MEMORY;
1287 hnd->status = NT_STATUS_NO_MEMORY;
1295 hnd->status = NT_STATUS_NO_MEMORY;
1314 hnd->status = NT_STATUS_NO_MEMORY;
1328 int cac_SamCreateAlias( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1335 if ( !hnd )
1338 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1339 hnd->status = NT_STATUS_INVALID_HANDLE;
1344 hnd->status = NT_STATUS_INVALID_PARAMETER;
1348 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1350 hnd->status = NT_STATUS_INVALID_HANDLE;
1356 hnd->status = NT_STATUS_NO_MEMORY;
1360 hnd->status =
1365 if ( !NT_STATUS_IS_OK( hnd->status ) )
1374 int cac_SamOpenAlias( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1381 if ( !hnd )
1384 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1385 hnd->status = NT_STATUS_INVALID_HANDLE;
1390 hnd->status = NT_STATUS_INVALID_PARAMETER;
1394 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1396 hnd->status = NT_STATUS_INVALID_HANDLE;
1402 hnd->status = NT_STATUS_NO_MEMORY;
1406 hnd->status =
1411 if ( !NT_STATUS_IS_OK( hnd->status ) )
1419 int cac_SamDeleteAlias( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1424 if ( !hnd )
1427 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1428 hnd->status = NT_STATUS_INVALID_HANDLE;
1433 hnd->status = NT_STATUS_INVALID_PARAMETER;
1437 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1439 hnd->status = NT_STATUS_INVALID_HANDLE;
1443 hnd->status =
1446 if ( !NT_STATUS_IS_OK( hnd->status ) )
1453 int cac_SamAddAliasMember( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1458 if ( !hnd )
1461 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1462 hnd->status = NT_STATUS_INVALID_HANDLE;
1467 hnd->status = NT_STATUS_INVALID_PARAMETER;
1471 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1473 hnd->status = NT_STATUS_INVALID_HANDLE;
1477 hnd->status =
1481 if ( !NT_STATUS_IS_OK( hnd->status ) )
1487 int cac_SamRemoveAliasMember( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1492 if ( !hnd )
1495 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1496 hnd->status = NT_STATUS_INVALID_HANDLE;
1501 hnd->status = NT_STATUS_INVALID_PARAMETER;
1505 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1507 hnd->status = NT_STATUS_INVALID_HANDLE;
1511 hnd->status =
1515 if ( !NT_STATUS_IS_OK( hnd->status ) )
1521 int cac_SamGetAliasMembers( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1529 if ( !hnd )
1532 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1533 hnd->status = NT_STATUS_INVALID_HANDLE;
1538 hnd->status = NT_STATUS_INVALID_PARAMETER;
1542 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1544 hnd->status = NT_STATUS_INVALID_HANDLE;
1548 hnd->status =
1553 if ( !NT_STATUS_IS_OK( hnd->status ) )
1562 int cac_SamClearAliasMembers( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1576 if ( !hnd )
1579 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1580 hnd->status = NT_STATUS_INVALID_HANDLE;
1585 hnd->status = NT_STATUS_INVALID_PARAMETER;
1589 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1591 hnd->status = NT_STATUS_INVALID_HANDLE;
1595 hnd->status =
1599 if ( !NT_STATUS_IS_OK( hnd->status ) )
1603 for ( i = 0; i < num_mem && NT_STATUS_IS_OK( hnd->status ); i++ ) {
1604 hnd->status =
1610 if ( !NT_STATUS_IS_OK( hnd->status ) ) {
1628 int cac_SamSetAliasMembers( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1635 if ( !hnd )
1638 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1639 hnd->status = NT_STATUS_INVALID_HANDLE;
1644 hnd->status = NT_STATUS_INVALID_PARAMETER;
1648 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1650 hnd->status = NT_STATUS_INVALID_HANDLE;
1655 if ( !cac_SamClearAliasMembers( hnd, mem_ctx, op->in.alias_hnd ) )
1656 return CAC_FAILURE; /*hnd->status is already set */
1659 for ( i = 0; i < op->in.num_members && NT_STATUS_IS_OK( hnd->status );
1661 hnd->status =
1667 if ( !NT_STATUS_IS_OK( hnd->status ) )
1674 int cac_SamUserChangePasswd( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1680 if ( !hnd )
1683 if ( !hnd->_internal.ctx ) {
1684 hnd->status = NT_STATUS_INVALID_HANDLE;
1690 hnd->status = NT_STATUS_INVALID_PARAMETER;
1694 srv = cac_GetServer( hnd );
1696 hnd->status = NT_STATUS_INVALID_CONNECTION;
1701 if ( !hnd->_internal.pipes[PI_SAMR] ) {
1705 &hnd->status ) ) ) {
1709 hnd->_internal.pipes[PI_SAMR] = True;
1712 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1714 hnd->status = NT_STATUS_INVALID_HANDLE;
1718 hnd->status =
1724 if ( !NT_STATUS_IS_OK( hnd->status ) )
1730 int cac_SamEnableUser( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1738 if ( !hnd )
1741 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1742 hnd->status = NT_STATUS_INVALID_HANDLE;
1747 hnd->status = NT_STATUS_INVALID_PARAMETER;
1751 srv = cac_GetServer( hnd );
1753 hnd->status = NT_STATUS_INVALID_CONNECTION;
1757 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1759 hnd->status = NT_STATUS_INVALID_HANDLE;
1764 hnd->status =
1768 if ( !NT_STATUS_IS_OK( hnd->status ) )
1781 hnd->status =
1786 if ( !NT_STATUS_IS_OK( hnd->status ) )
1792 int cac_SamDisableUser( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1800 if ( !hnd )
1803 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1804 hnd->status = NT_STATUS_INVALID_HANDLE;
1809 hnd->status = NT_STATUS_INVALID_PARAMETER;
1813 srv = cac_GetServer( hnd );
1815 hnd->status = NT_STATUS_INVALID_CONNECTION;
1819 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1821 hnd->status = NT_STATUS_INVALID_HANDLE;
1825 hnd->status =
1829 if ( !NT_STATUS_IS_OK( hnd->status ) )
1841 hnd->status =
1846 if ( !NT_STATUS_IS_OK( hnd->status ) )
1852 int cac_SamSetPassword( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1862 if ( !hnd )
1865 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1866 hnd->status = NT_STATUS_INVALID_HANDLE;
1871 hnd->status = NT_STATUS_INVALID_PARAMETER;
1875 srv = cac_GetServer( hnd );
1877 hnd->status = NT_STATUS_INVALID_CONNECTION;
1881 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1883 hnd->status = NT_STATUS_INVALID_HANDLE;
1897 hnd->status =
1902 if ( !NT_STATUS_IS_OK( hnd->status ) )
1908 int cac_SamGetUserInfo( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1915 if ( !hnd )
1918 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1919 hnd->status = NT_STATUS_INVALID_HANDLE;
1924 hnd->status = NT_STATUS_INVALID_PARAMETER;
1928 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1930 hnd->status = NT_STATUS_INVALID_HANDLE;
1934 hnd->status =
1938 if ( !NT_STATUS_IS_OK( hnd->status ) )
1944 hnd->status = NT_STATUS_NO_MEMORY;
1951 int cac_SamSetUserInfo( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
1959 if ( !hnd )
1962 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
1963 hnd->status = NT_STATUS_INVALID_HANDLE;
1968 hnd->status = NT_STATUS_INVALID_PARAMETER;
1974 hnd->status = NT_STATUS_NO_MEMORY;
1978 srv = cac_GetServer( hnd );
1980 hnd->status = NT_STATUS_INVALID_CONNECTION;
1984 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
1986 hnd->status = NT_STATUS_INVALID_HANDLE;
1990 if ( hnd->_internal.srv_level >= SRV_WIN_NT4 ) {
1991 hnd->status =
1998 if ( hnd->_internal.srv_level < SRV_WIN_NT4
1999 || !NT_STATUS_IS_OK( hnd->status ) ) {
2000 hnd->status =
2006 if ( NT_STATUS_IS_OK( hnd->status )
2007 && hnd->_internal.srv_level > SRV_WIN_NT4 ) {
2008 hnd->_internal.srv_level = SRV_WIN_NT4;
2013 if ( !NT_STATUS_IS_OK( hnd->status ) )
2020 int cac_SamGetUserInfoCtr( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2027 if ( !hnd )
2030 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2031 hnd->status = NT_STATUS_INVALID_HANDLE;
2036 hnd->status = NT_STATUS_INVALID_PARAMETER;
2040 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2042 hnd->status = NT_STATUS_INVALID_HANDLE;
2046 hnd->status =
2051 if ( !NT_STATUS_IS_OK( hnd->status ) )
2059 int cac_SamSetUserInfoCtr( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2065 if ( !hnd )
2068 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2069 hnd->status = NT_STATUS_INVALID_HANDLE;
2074 hnd->status = NT_STATUS_INVALID_PARAMETER;
2078 srv = cac_GetServer( hnd );
2080 hnd->status = NT_STATUS_INVALID_CONNECTION;
2084 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2086 hnd->status = NT_STATUS_INVALID_HANDLE;
2091 hnd->status =
2097 if ( !NT_STATUS_IS_OK( hnd->status ) )
2104 int cac_SamRenameUser( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2113 if ( !hnd )
2116 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2117 hnd->status = NT_STATUS_INVALID_HANDLE;
2123 hnd->status = NT_STATUS_INVALID_PARAMETER;
2127 srv = cac_GetServer( hnd );
2129 hnd->status = NT_STATUS_INVALID_CONNECTION;
2133 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2135 hnd->status = NT_STATUS_INVALID_HANDLE;
2147 hnd->status =
2152 if ( !NT_STATUS_IS_OK( hnd->status ) )
2159 int cac_SamGetGroupInfo( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2166 if ( !hnd )
2169 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2170 hnd->status = NT_STATUS_INVALID_HANDLE;
2175 hnd->status = NT_STATUS_INVALID_PARAMETER;
2179 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2181 hnd->status = NT_STATUS_INVALID_HANDLE;
2187 hnd->status =
2191 if ( !NT_STATUS_IS_OK( hnd->status ) )
2196 hnd->status = NT_STATUS_NO_MEMORY;
2203 int cac_SamSetGroupInfo( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2210 if ( !hnd )
2213 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2214 hnd->status = NT_STATUS_INVALID_HANDLE;
2219 hnd->status = NT_STATUS_INVALID_PARAMETER;
2225 hnd->status = NT_STATUS_NO_MEMORY;
2229 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2231 hnd->status = NT_STATUS_INVALID_HANDLE;
2235 hnd->status =
2239 if ( !NT_STATUS_IS_OK( hnd->status ) )
2245 int cac_SamRenameGroup( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2252 if ( !hnd )
2255 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2256 hnd->status = NT_STATUS_INVALID_HANDLE;
2262 hnd->status = NT_STATUS_INVALID_PARAMETER;
2266 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2268 hnd->status = NT_STATUS_INVALID_HANDLE;
2277 hnd->status =
2281 if ( !NT_STATUS_IS_OK( hnd->status ) )
2287 int cac_SamGetAliasInfo( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2294 if ( !hnd )
2297 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2298 hnd->status = NT_STATUS_INVALID_HANDLE;
2303 hnd->status = NT_STATUS_INVALID_PARAMETER;
2307 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2309 hnd->status = NT_STATUS_INVALID_HANDLE;
2314 hnd->status =
2318 if ( !NT_STATUS_IS_OK( hnd->status ) )
2323 hnd->status = NT_STATUS_NO_MEMORY;
2331 int cac_SamSetAliasInfo( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2338 if ( !hnd )
2341 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2342 hnd->status = NT_STATUS_INVALID_HANDLE;
2347 hnd->status = NT_STATUS_INVALID_PARAMETER;
2353 hnd->status = NT_STATUS_NO_MEMORY;
2357 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2359 hnd->status = NT_STATUS_INVALID_HANDLE;
2363 hnd->status =
2367 if ( !NT_STATUS_IS_OK( hnd->status ) )
2373 int cac_SamGetDomainInfo( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2389 if ( !hnd )
2392 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2393 hnd->status = NT_STATUS_INVALID_HANDLE;
2398 hnd->status = NT_STATUS_INVALID_PARAMETER;
2402 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2404 hnd->status = NT_STATUS_INVALID_HANDLE;
2409 hnd->status =
2413 if ( NT_STATUS_IS_OK( hnd->status ) ) {
2419 status_buf = hnd->status;
2424 hnd->status =
2428 if ( NT_STATUS_IS_OK( hnd->status ) ) {
2434 status_buf = hnd->status;
2439 hnd->status =
2443 if ( NT_STATUS_IS_OK( hnd->status ) ) {
2447 status_buf = hnd->status;
2458 hnd->status = NT_STATUS_NO_MEMORY;
2463 hnd->status = status_buf;
2470 int cac_SamGetDomainInfoCtr( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2477 if ( !hnd )
2480 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2481 hnd->status = NT_STATUS_INVALID_HANDLE;
2486 hnd->status = NT_STATUS_INVALID_PARAMETER;
2490 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2492 hnd->status = NT_STATUS_INVALID_HANDLE;
2498 hnd->status = NT_STATUS_NO_MEMORY;
2502 hnd->status =
2506 if ( !NT_STATUS_IS_OK( hnd->status ) )
2514 int cac_SamGetDisplayInfo( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2527 if ( !hnd )
2530 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2531 hnd->status = NT_STATUS_INVALID_HANDLE;
2536 hnd->status = NT_STATUS_INVALID_PARAMETER;
2543 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2545 hnd->status = NT_STATUS_INVALID_HANDLE;
2559 hnd->status =
2566 if ( !NT_STATUS_IS_OK( hnd->status )
2567 && !NT_STATUS_EQUAL( hnd->status, STATUS_MORE_ENTRIES ) ) {
2574 if ( NT_STATUS_IS_OK( hnd->status ) ) {
2587 int cac_SamLookupDomain( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2594 if ( !hnd )
2597 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2598 hnd->status = NT_STATUS_INVALID_HANDLE;
2603 hnd->status = NT_STATUS_INVALID_PARAMETER;
2607 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2609 hnd->status = NT_STATUS_INVALID_HANDLE;
2615 hnd->status = NT_STATUS_NO_MEMORY;
2619 hnd->status =
2623 if ( !NT_STATUS_IS_OK( hnd->status ) )
2631 int cac_SamGetSecurityObject( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2641 if ( !hnd )
2644 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2645 hnd->status = NT_STATUS_INVALID_HANDLE;
2650 hnd->status = NT_STATUS_INVALID_PARAMETER;
2654 pipe_hnd = cac_GetPipe( hnd, PI_SAMR );
2656 hnd->status = NT_STATUS_INVALID_HANDLE;
2660 hnd->status =
2664 if ( !NT_STATUS_IS_OK( hnd->status ) )
2672 int cac_SamFlush( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
2677 if ( !hnd )
2680 if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SAMR] ) {
2681 hnd->status = NT_STATUS_INVALID_HANDLE;
2686 hnd->status = NT_STATUS_INVALID_PARAMETER;
2690 if ( !cac_SamClose( hnd, mem_ctx, op->in.dom_hnd ) )
2698 if ( !cac_SamOpenDomain( hnd, mem_ctx, &od ) )