diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-04-08 17:31:36 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-04-08 17:31:36 +1000 |
commit | 0e59c73fe3a5cde76881294f17bf6ca9258f67a1 (patch) | |
tree | 6007f25ac8af86370db09dfaaa138c618eb08ac0 | |
parent | b2805c50eecddfa4cbd0945e713567eddce05895 (diff) | |
parent | 1f474f4a545752f7ac0ad402d01d1e768b973dbe (diff) | |
download | samba-0e59c73fe3a5cde76881294f17bf6ca9258f67a1.tar.gz samba-0e59c73fe3a5cde76881294f17bf6ca9258f67a1.tar.bz2 samba-0e59c73fe3a5cde76881294f17bf6ca9258f67a1.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit c0416a0b73f06ef57db1b83a75433e36b93a9981)
27 files changed, 553 insertions, 396 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index e53e512bc6..b6f3fdac52 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -654,5 +654,17 @@ PRIVATE_DEPENDENCIES = RPC_NDR_LSA OBJ_FILES = gen_ndr/py_wkssvc.o PRIVATE_DEPENDENCIES = RPC_NDR_WKSSVC +[PYTHON::python_dfs] +OBJ_FILES = gen_ndr/py_dfs.o +PRIVATE_DEPENDENCIES = RPC_NDR_DFS + +[PYTHON::python_unixinfo] +OBJ_FILES = gen_ndr/py_unixinfo.o +PRIVATE_DEPENDENCIES = RPC_NDR_UNIXINFO + +[PYTHON::python_drsuapi] +OBJ_FILES = gen_ndr/py_drsuapi.o +PRIVATE_DEPENDENCIES = RPC_NDR_DRSUAPI + [PYTHON::python_dcerpc_security] OBJ_FILES = gen_ndr/py_security.o diff --git a/source4/librpc/idl/audiosrv.idl b/source4/librpc/idl/audiosrv.idl index 9b9399ffee..1b059868ff 100644 --- a/source4/librpc/idl/audiosrv.idl +++ b/source4/librpc/idl/audiosrv.idl @@ -5,19 +5,19 @@ helpstring("Audio Server") ] interface audiosrv { - void audiosrv_CreatezoneFactoriesList(); - void audiosrv_CreateGfxFactoriesList(); - void audiosrv_CreateGfxList(); - void audiosrv_RemoveGfx(); - void audiosrv_AddGfx(); - void audiosrv_ModifyGfx(); - void audiosrv_OpenGfx(); - void audiosrv_Logon(); - void audiosrv_Logoff(); - void audiosrv_RegisterSessionNotificationEvent(); - void audiosrv_UnregisterSessionNotificationEvent(); - void audiosrv_SessionConnectState(); - void audiosrv_DriverOpenDrvRegKey(); - void audiosrv_AdvisePreferredDeviceChange(); - void audiosrv_GetPnpInfo(); + [todo] void audiosrv_CreatezoneFactoriesList(); + [todo] void audiosrv_CreateGfxFactoriesList(); + [todo] void audiosrv_CreateGfxList(); + [todo] void audiosrv_RemoveGfx(); + [todo] void audiosrv_AddGfx(); + [todo] void audiosrv_ModifyGfx(); + [todo] void audiosrv_OpenGfx(); + [todo] void audiosrv_Logon(); + [todo] void audiosrv_Logoff(); + [todo] void audiosrv_RegisterSessionNotificationEvent(); + [todo] void audiosrv_UnregisterSessionNotificationEvent(); + [todo] void audiosrv_SessionConnectState(); + [todo] void audiosrv_DriverOpenDrvRegKey(); + [todo] void audiosrv_AdvisePreferredDeviceChange(); + [todo] void audiosrv_GetPnpInfo(); } diff --git a/source4/librpc/idl/browser.idl b/source4/librpc/idl/browser.idl index 5cc2475119..5b05be9cbb 100644 --- a/source4/librpc/idl/browser.idl +++ b/source4/librpc/idl/browser.idl @@ -9,50 +9,50 @@ interface browser { /******************/ /* Function 0x00 */ - NTSTATUS BrowserrServerEnum(); + [todo] NTSTATUS BrowserrServerEnum(); /******************/ /* Function 0x01 */ - NTSTATUS BrowserrDebugCall(); + [todo] NTSTATUS BrowserrDebugCall(); /******************/ /* Function 0x02 */ - NTSTATUS BrowserrQueryOtherDomains(); + [todo] NTSTATUS BrowserrQueryOtherDomains(); /******************/ /* Function 0x03 */ - NTSTATUS BrowserrResetNetlogonState(); + [todo] NTSTATUS BrowserrResetNetlogonState(); /******************/ /* Function 0x04 */ - NTSTATUS BrowserrDebugTrace(); + [todo] NTSTATUS BrowserrDebugTrace(); /******************/ /* Function 0x05 */ - NTSTATUS BrowserrQueryStatistics(); + [todo] NTSTATUS BrowserrQueryStatistics(); /******************/ /* Function 0x06 */ - NTSTATUS BrowserResetStatistics(); + [todo] NTSTATUS BrowserResetStatistics(); /******************/ /* Function 0x07 */ - NTSTATUS NetrBrowserStatisticsClear(); + [todo] NTSTATUS NetrBrowserStatisticsClear(); /******************/ /* Function 0x08 */ - NTSTATUS NetrBrowserStatisticsGet(); + [todo] NTSTATUS NetrBrowserStatisticsGet(); /******************/ /* Function 0x09 */ - NTSTATUS BrowserrSetNetlogonState(); + [todo] NTSTATUS BrowserrSetNetlogonState(); /******************/ /* Function 0x0a */ - NTSTATUS BrowserrQueryEmulatedDomains(); + [todo] NTSTATUS BrowserrQueryEmulatedDomains(); /******************/ /* Function 0x0b */ - NTSTATUS BrowserrServerEnumEx(); + [todo] NTSTATUS BrowserrServerEnumEx(); } diff --git a/source4/librpc/idl/dfs.idl b/source4/librpc/idl/dfs.idl index dbbd15039c..b279f555d9 100644 --- a/source4/librpc/idl/dfs.idl +++ b/source4/librpc/idl/dfs.idl @@ -308,16 +308,16 @@ import "misc.idl"; ); /* Function 0x06 */ - WERROR dfs_Rename(); + [todo] WERROR dfs_Rename(); /* Function 0x07 */ - WERROR dfs_Move(); + [todo] WERROR dfs_Move(); /* Function 0x08 */ - WERROR dfs_ManagerGetConfigInfo(); + [todo] WERROR dfs_ManagerGetConfigInfo(); /* Function 0x09 */ - WERROR dfs_ManagerSendSiteInfo(); + [todo] WERROR dfs_ManagerSendSiteInfo(); /* Function 0x0a */ typedef struct { @@ -399,10 +399,10 @@ import "misc.idl"; ); /* Function 0x13 */ - WERROR dfs_Add2(); + [todo] WERROR dfs_Add2(); /* Function 0x14 */ - WERROR dfs_Remove2(); + [todo] WERROR dfs_Remove2(); /* Function 0x15 */ [public] WERROR dfs_EnumEx( @@ -414,5 +414,5 @@ import "misc.idl"; ); /* Function 0x16 */ - WERROR dfs_SetInfo2(); + [todo] WERROR dfs_SetInfo2(); } diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl index fb24122e26..9652571668 100644 --- a/source4/librpc/idl/drsuapi.idl +++ b/source4/librpc/idl/drsuapi.idl @@ -666,7 +666,7 @@ interface drsuapi /* TODO ... */ } drsuapi_DsReplicaAddOptions; - WERROR DRSUAPI_REPLICA_ADD(); + [todo] WERROR DRSUAPI_REPLICA_ADD(); /*****************/ /* Function 0x06 */ @@ -676,7 +676,7 @@ interface drsuapi /* TODO ... */ } drsuapi_DsReplicaDeleteOptions; - WERROR DRSUAPI_REPLICA_DEL(); + [todo] WERROR DRSUAPI_REPLICA_DEL(); /*****************/ /* Function 0x07 */ @@ -685,11 +685,11 @@ interface drsuapi DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE = 0x00000002 } drsuapi_DsReplicaModifyOptions; - WERROR DRSUAPI_REPLICA_MODIFY(); + [todo] WERROR DRSUAPI_REPLICA_MODIFY(); /*****************/ /* Function 0x08 */ - WERROR DRSUAPI_VERIFY_NAMES(); + [todo] WERROR DRSUAPI_VERIFY_NAMES(); /*****************/ /* Function 0x09 */ @@ -732,7 +732,7 @@ interface drsuapi [case(1)] drsuapi_DsGetMembershipsRequest1 req1; } drsuapi_DsGetMembershipsRequest; - WERROR drsuapi_DsGetMemberships( + [todo] WERROR drsuapi_DsGetMemberships( [in] policy_handle *bind_handle, [in,out] int32 level, [in] [switch_is(level)] drsuapi_DsGetMembershipsRequest req, @@ -741,7 +741,7 @@ interface drsuapi /*****************/ /* Function 0x0a */ - WERROR DRSUAPI_INTER_DOMAIN_MOVE(); + [todo] WERROR DRSUAPI_INTER_DOMAIN_MOVE(); /*****************/ /* Function 0x0b */ @@ -774,7 +774,7 @@ interface drsuapi [case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1; } drsuapi_DsGetNT4ChangeLogInfo; - WERROR drsuapi_DsGetNT4ChangeLog( + [todo] WERROR drsuapi_DsGetNT4ChangeLog( [in] policy_handle *bind_handle, [in,out] uint32 level, [in] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest req, @@ -849,7 +849,7 @@ interface drsuapi [case(1)] drsuapi_DsNameCtr1 *ctr1; } drsuapi_DsNameCtr; - WERROR drsuapi_DsCrackNames( + [todo] WERROR drsuapi_DsCrackNames( [in] policy_handle *bind_handle, [in, out] int32 level, [in,switch_is(level)] drsuapi_DsNameRequest req, @@ -920,7 +920,7 @@ interface drsuapi /*****************/ /* Function 0x0f */ - WERROR DRSUAPI_REMOVE_DS_DOMAIN(); + [todo] WERROR DRSUAPI_REMOVE_DS_DOMAIN(); /*****************/ /* Function 0x10 */ @@ -1138,7 +1138,7 @@ interface drsuapi /*****************/ /* Function 0x12 */ - WERROR DRSUAPI_EXECUTE_KCC(); + [todo] WERROR DRSUAPI_EXECUTE_KCC(); /*****************/ /* Function 0x13 */ @@ -1419,7 +1419,7 @@ interface drsuapi /*****************/ /* Function 0x14 */ - WERROR DRSUAPI_ADD_SID_HISTORY(); + [todo] WERROR DRSUAPI_ADD_SID_HISTORY(); /*****************/ /* Function 0x15 */ @@ -1452,11 +1452,11 @@ interface drsuapi /*****************/ /* Function 0x16 */ - WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS(); + [todo] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS(); /*****************/ /* Function 0x17 */ - WERROR DRSUAPI_GET_OBJECT_EXISTENCE(); + [todo] WERROR DRSUAPI_GET_OBJECT_EXISTENCE(); /*****************/ /* Function 0x18 */ diff --git a/source4/librpc/idl/dsbackup.idl b/source4/librpc/idl/dsbackup.idl index 21dca8fa0e..72e8bf9c2b 100644 --- a/source4/librpc/idl/dsbackup.idl +++ b/source4/librpc/idl/dsbackup.idl @@ -5,15 +5,15 @@ helpstring("Backup support for Active Directory") ] interface ad_backup { - void HrRBackupPrepare(); - void HrRBackupEnd(); - void HrRBackupGetAttachmentInformation(); - void HrRBackupOpenFile(); - void HrRBackupRead(); - void HrRBackupClose(); - void HrRBackupGetBackupLogs(); - void HrRBackupTruncateLogs(); - void HrRBackupPing(); + [todo] void HrRBackupPrepare(); + [todo] void HrRBackupEnd(); + [todo] void HrRBackupGetAttachmentInformation(); + [todo] void HrRBackupOpenFile(); + [todo] void HrRBackupRead(); + [todo] void HrRBackupClose(); + [todo] void HrRBackupGetBackupLogs(); + [todo] void HrRBackupTruncateLogs(); + [todo] void HrRBackupPing(); } [ @@ -23,12 +23,12 @@ helpstring("Restoring Active Directory backups") ] interface ad_restore { - void HrRIsNTDSOnline(); - void HrRRestorePrepare(); - void HrRRestoreRegister(); - void HrRRestoreRegisterComplete(); - void HrRRestoreGetDatabaseLocations(); - void HrRRestoreEnd(); - void HrRRestoreSetCurrentLogNumber(); - void HrRRestoreCheckLogsForBackup(); + [todo] void HrRIsNTDSOnline(); + [todo] void HrRRestorePrepare(); + [todo] void HrRRestoreRegister(); + [todo] void HrRRestoreRegisterComplete(); + [todo] void HrRRestoreGetDatabaseLocations(); + [todo] void HrRRestoreEnd(); + [todo] void HrRRestoreSetCurrentLogNumber(); + [todo] void HrRRestoreCheckLogsForBackup(); } diff --git a/source4/librpc/idl/dssetup.idl b/source4/librpc/idl/dssetup.idl index af6350cc43..14de9f7633 100644 --- a/source4/librpc/idl/dssetup.idl +++ b/source4/librpc/idl/dssetup.idl @@ -88,14 +88,14 @@ import "misc.idl"; These stubs are left here only as a way of documenting the names of the calls in case they ever turn up on the wire. */ - WERROR dssetup_DsRoleDnsNameToFlatName(); - WERROR dssetup_DsRoleDcAsDc(); - WERROR dssetup_DsRoleDcAsReplica(); - WERROR dssetup_DsRoleDemoteDc(); - WERROR dssetup_DsRoleGetDcOperationProgress(); - WERROR dssetup_DsRoleGetDcOperationResults(); - WERROR dssetup_DsRoleCancel(); - WERROR dssetup_DsRoleServerSaveStateForUpgrade(); - WERROR dssetup_DsRoleUpgradeDownlevelServer(); - WERROR dssetup_DsRoleAbortDownlevelServerUpgrade(); + [todo] WERROR dssetup_DsRoleDnsNameToFlatName(); + [todo] WERROR dssetup_DsRoleDcAsDc(); + [todo] WERROR dssetup_DsRoleDcAsReplica(); + [todo] WERROR dssetup_DsRoleDemoteDc(); + [todo] WERROR dssetup_DsRoleGetDcOperationProgress(); + [todo] WERROR dssetup_DsRoleGetDcOperationResults(); + [todo] WERROR dssetup_DsRoleCancel(); + [todo] WERROR dssetup_DsRoleServerSaveStateForUpgrade(); + [todo] WERROR dssetup_DsRoleUpgradeDownlevelServer(); + [todo] WERROR dssetup_DsRoleAbortDownlevelServerUpgrade(); } diff --git a/source4/librpc/idl/efs.idl b/source4/librpc/idl/efs.idl index 62fefda606..4279b08d13 100644 --- a/source4/librpc/idl/efs.idl +++ b/source4/librpc/idl/efs.idl @@ -18,13 +18,13 @@ WERROR EfsRpcOpenFileRaw( [in] uint32 Flags ); -WERROR EfsRpcReadFileRaw( +[todo] WERROR EfsRpcReadFileRaw( [in,ref] policy_handle *pvContext /* incomplete */ ); -WERROR EfsRpcWriteFileRaw( +[todo] WERROR EfsRpcWriteFileRaw( [in,ref] policy_handle *pvContext /* incomplete */ ); @@ -70,12 +70,12 @@ WERROR EfsRpcQueryRecoveryAgents( [out,ref,unique] ENCRYPTION_CERTIFICATE_HASH_LIST **pRecoveryAgents ); -WERROR EfsRpcRemoveUsersFromFile( +[todo] WERROR EfsRpcRemoveUsersFromFile( [in] [charset(UTF16),string] uint16 FileName[] /* [in] ENCRYPTION_CERTIFICATE_LIST Hashes*/ ); -WERROR EfsRpcAddUsersToFile( +[todo] WERROR EfsRpcAddUsersToFile( [in] [charset(UTF16),string] uint16 FileName[] /* [in] ENCRYPTION_CERTIFICATE_LIST Hashes*/ ); @@ -96,13 +96,13 @@ WERROR EfsRpcSetFileEncryptionKey( [in] [unique] ENCRYPTION_CERTIFICATE *pEncryptionCertificate ); -WERROR EfsRpcNotSupported( +[todo] WERROR EfsRpcNotSupported( ); -WERROR EfsRpcFileKeyInfo( +[todo] WERROR EfsRpcFileKeyInfo( ); -WERROR EfsRpcDuplicateEncryptionInfoFile( +[todo] WERROR EfsRpcDuplicateEncryptionInfoFile( ); } diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl index 60ff338ec4..ea04878094 100644 --- a/source4/librpc/idl/epmapper.idl +++ b/source4/librpc/idl/epmapper.idl @@ -310,5 +310,5 @@ interface epmapper /**********************/ /* Function 0x07 */ - error_status_t epm_MapAuth(); + [todo] error_status_t epm_MapAuth(); } diff --git a/source4/librpc/idl/eventlog.idl b/source4/librpc/idl/eventlog.idl index 3defd99400..ee42300c7c 100644 --- a/source4/librpc/idl/eventlog.idl +++ b/source4/librpc/idl/eventlog.idl @@ -65,7 +65,7 @@ import "lsa.idl", "security.idl"; /******************/ /* Function: 0x01 */ - NTSTATUS eventlog_BackupEventLogW(); + [todo] NTSTATUS eventlog_BackupEventLogW(); /******************/ /* Function: 0x02 */ @@ -75,7 +75,7 @@ import "lsa.idl", "security.idl"; /******************/ /* Function: 0x03 */ - NTSTATUS eventlog_DeregisterEventSource(); + [todo] NTSTATUS eventlog_DeregisterEventSource(); /******************/ /* Function: 0x04 */ @@ -86,11 +86,11 @@ import "lsa.idl", "security.idl"; /******************/ /* Function: 0x05 */ - NTSTATUS eventlog_GetOldestRecord(); + [todo] NTSTATUS eventlog_GetOldestRecord(); /******************/ /* Function: 0x06 */ - NTSTATUS eventlog_ChangeNotify(); + [todo] NTSTATUS eventlog_ChangeNotify(); /******************/ /* Function: 0x07 */ @@ -105,11 +105,11 @@ import "lsa.idl", "security.idl"; /******************/ /* Function: 0x08 */ - NTSTATUS eventlog_RegisterEventSourceW(); + [todo] NTSTATUS eventlog_RegisterEventSourceW(); /******************/ /* Function: 0x09 */ - NTSTATUS eventlog_OpenBackupEventLogW(); + [todo] NTSTATUS eventlog_OpenBackupEventLogW(); /******************/ /* Function: 0x0a */ @@ -125,51 +125,51 @@ import "lsa.idl", "security.idl"; /*****************/ /* Function 0x0b */ - NTSTATUS eventlog_ReportEventW(); + [todo] NTSTATUS eventlog_ReportEventW(); /*****************/ /* Function 0x0c */ - NTSTATUS eventlog_ClearEventLogA(); + [todo] NTSTATUS eventlog_ClearEventLogA(); /******************/ /* Function: 0x0d */ - NTSTATUS eventlog_BackupEventLogA(); + [todo] NTSTATUS eventlog_BackupEventLogA(); /*****************/ /* Function 0x0e */ - NTSTATUS eventlog_OpenEventLogA(); + [todo] NTSTATUS eventlog_OpenEventLogA(); /*****************/ /* Function 0x0f */ - NTSTATUS eventlog_RegisterEventSourceA(); + [todo] NTSTATUS eventlog_RegisterEventSourceA(); /*****************/ /* Function 0x10 */ - NTSTATUS eventlog_OpenBackupEventLogA(); + [todo] NTSTATUS eventlog_OpenBackupEventLogA(); /*****************/ /* Function 0x11 */ - NTSTATUS eventlog_ReadEventLogA(); + [todo] NTSTATUS eventlog_ReadEventLogA(); /*****************/ /* Function 0x12 */ - NTSTATUS eventlog_ReportEventA(); + [todo] NTSTATUS eventlog_ReportEventA(); /*****************/ /* Function 0x13 */ - NTSTATUS eventlog_RegisterClusterSvc(); + [todo] NTSTATUS eventlog_RegisterClusterSvc(); /*****************/ /* Function 0x14 */ - NTSTATUS eventlog_DeregisterClusterSvc(); + [todo] NTSTATUS eventlog_DeregisterClusterSvc(); /*****************/ /* Function 0x15 */ - NTSTATUS eventlog_WriteClusterEvents(); + [todo] NTSTATUS eventlog_WriteClusterEvents(); /*****************/ /* Function 0x16 */ - NTSTATUS eventlog_GetLogIntormation(); + [todo] NTSTATUS eventlog_GetLogIntormation(); /*****************/ /* Function 0x17 */ diff --git a/source4/librpc/idl/frsapi.idl b/source4/librpc/idl/frsapi.idl index 2931a83da4..11593f479a 100644 --- a/source4/librpc/idl/frsapi.idl +++ b/source4/librpc/idl/frsapi.idl @@ -13,19 +13,19 @@ interface frsapi { /****************/ /* Function 0x00 */ - void FRSAPI_VERIFY_PROMOTION(); + [todo] void FRSAPI_VERIFY_PROMOTION(); /****************/ /* Function 0x01 */ - void FRSAPI_PROMOTION_STATUS(); + [todo] void FRSAPI_PROMOTION_STATUS(); /****************/ /* Function 0x02 */ - void FRSAPI_START_DEMOTION(); + [todo] void FRSAPI_START_DEMOTION(); /****************/ /* Function 0x03 */ - void FRSAPI_COMMIT_DEMOTION(); + [todo] void FRSAPI_COMMIT_DEMOTION(); /****************/ /* Function 0x04 */ @@ -49,7 +49,7 @@ interface frsapi /****************/ /* Function 0x06 */ - void FRSAPI_VERIFY_PROMOTION_W(); + [todo] void FRSAPI_VERIFY_PROMOTION_W(); /****************/ /* Function 0x07 */ @@ -106,7 +106,7 @@ interface frsapi /****************/ /* Function 0x09 */ - void FRSAPI_WRITER_COMMAND(); + [todo] void FRSAPI_WRITER_COMMAND(); /****************/ /* Function 0x0a */ diff --git a/source4/librpc/idl/frsrpc.idl b/source4/librpc/idl/frsrpc.idl index 6a0ec394d0..1019a25b28 100644 --- a/source4/librpc/idl/frsrpc.idl +++ b/source4/librpc/idl/frsrpc.idl @@ -128,41 +128,41 @@ interface frsrpc /*****************/ /* Function 0x01 */ - void FRSRPC_VERIFY_PROMOTION_PARENT(); + [todo] void FRSRPC_VERIFY_PROMOTION_PARENT(); /*****************/ /* Function 0x02 */ - void FRSRPC_START_PROMOTION_PARENT(); + [todo] void FRSRPC_START_PROMOTION_PARENT(); /*****************/ /* Function 0x03 */ - void FRSRPC_NOP(); + [todo] void FRSRPC_NOP(); /*****************/ /* Function 0x04 */ - void FRSRPC_BACKUP_COMPLETE(); + [todo] void FRSRPC_BACKUP_COMPLETE(); /*****************/ /* Function 0x05 */ - void FRSRPC_BACKUP_COMPLETE_5(); + [todo] void FRSRPC_BACKUP_COMPLETE_5(); /*****************/ /* Function 0x06 */ - void FRSRPC_BACKUP_COMPLETE_6(); + [todo] void FRSRPC_BACKUP_COMPLETE_6(); /*****************/ /* Function 0x07 */ - void FRSRPC_BACKUP_COMPLETE_7(); + [todo] void FRSRPC_BACKUP_COMPLETE_7(); /*****************/ /* Function 0x08 */ - void FRSRPC_BACKUP_COMPLETE_8(); + [todo] void FRSRPC_BACKUP_COMPLETE_8(); /*****************/ /* Function 0x09 */ - void FRSRPC_BACKUP_COMPLETE_9(); + [todo] void FRSRPC_BACKUP_COMPLETE_9(); /*****************/ /* Function 0x0a */ - void FRSRPC_VERIFY_PROMOTION_PARENT_EX(); + [todo] void FRSRPC_VERIFY_PROMOTION_PARENT_EX(); } diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index e36e79f5c4..93cfdee201 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -94,12 +94,12 @@ import "misc.idl", "security.idl"; /******************/ /* Function: 0x04 */ - NTSTATUS lsa_SetSecObj (); + [todo] NTSTATUS lsa_SetSecObj (); /******************/ /* Function: 0x05 */ - NTSTATUS lsa_ChangePassword (); + [todo] NTSTATUS lsa_ChangePassword (); /******************/ @@ -273,7 +273,7 @@ import "misc.idl", "security.idl"; /******************/ /* Function: 0x09 */ - NTSTATUS lsa_ClearAuditLog (); + [todo] NTSTATUS lsa_ClearAuditLog (); /******************/ /* Function: 0x0a */ @@ -477,15 +477,15 @@ import "misc.idl", "security.idl"; ); /* Function: 0x15 */ - NTSTATUS lsa_GetQuotasForAccount(); + [todo] NTSTATUS lsa_GetQuotasForAccount(); /* Function: 0x16 */ - NTSTATUS lsa_SetQuotasForAccount(); + [todo] NTSTATUS lsa_SetQuotasForAccount(); /* Function: 0x17 */ - NTSTATUS lsa_GetSystemAccessAccount(); + [todo] NTSTATUS lsa_GetSystemAccessAccount(); /* Function: 0x18 */ - NTSTATUS lsa_SetSystemAccessAccount(); + [todo] NTSTATUS lsa_SetSystemAccessAccount(); /* Function: 0x19 */ NTSTATUS lsa_OpenTrustedDomain( @@ -599,7 +599,7 @@ import "misc.idl", "security.idl"; ); /* Function: 0x1b */ - NTSTATUS lsa_SetInformationTrustedDomain(); + [todo] NTSTATUS lsa_SetInformationTrustedDomain(); /* Function: 0x1c */ [public] NTSTATUS lsa_OpenSecret( @@ -659,7 +659,7 @@ import "misc.idl", "security.idl"; ); /* Function: 0x22 */ - NTSTATUS lsa_DeleteObject(); + [todo] NTSTATUS lsa_DeleteObject(); /*******************/ @@ -713,7 +713,7 @@ import "misc.idl", "security.idl"; ); /* Function: 0x28 */ - NTSTATUS lsa_SetTrustedDomainInfo(); + [todo] NTSTATUS lsa_SetTrustedDomainInfo(); /* Function: 0x29 */ NTSTATUS lsa_DeleteTrustedDomain( [in] policy_handle *handle, @@ -721,9 +721,9 @@ import "misc.idl", "security.idl"; ); /* Function: 0x2a */ - NTSTATUS lsa_StorePrivateData(); + [todo] NTSTATUS lsa_StorePrivateData(); /* Function: 0x2b */ - NTSTATUS lsa_RetrievePrivateData(); + [todo] NTSTATUS lsa_RetrievePrivateData(); /**********************/ @@ -800,7 +800,7 @@ import "misc.idl", "security.idl"; /* Function 0x33 */ - NTSTATUS lsa_CreateTrustedDomainEx(); + [todo] NTSTATUS lsa_CreateTrustedDomainEx(); /* Function 0x34 */ NTSTATUS lsa_CloseTrustedDomainEx( @@ -858,7 +858,7 @@ import "misc.idl", "security.idl"; ); /* Function 0x38 */ - NTSTATUS lsa_TestCall(); + [todo] NTSTATUS lsa_TestCall(); /**********************/ /* Function 0x39 */ @@ -914,31 +914,31 @@ import "misc.idl", "security.idl"; ); /* Function 0x3b */ - NTSTATUS lsa_CreateTrustedDomainEx2(); + [todo] NTSTATUS lsa_CreateTrustedDomainEx2(); /* Function 0x3c */ - NTSTATUS lsa_CREDRWRITE(); + [todo] NTSTATUS lsa_CREDRWRITE(); /* Function 0x3d */ - NTSTATUS lsa_CREDRREAD(); + [todo] NTSTATUS lsa_CREDRREAD(); /* Function 0x3e */ - NTSTATUS lsa_CREDRENUMERATE(); + [todo] NTSTATUS lsa_CREDRENUMERATE(); /* Function 0x3f */ - NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS(); + [todo] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS(); /* Function 0x40 */ - NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS(); + [todo] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS(); /* Function 0x41 */ - NTSTATUS lsa_CREDRDELETE(); + [todo] NTSTATUS lsa_CREDRDELETE(); /* Function 0x42 */ - NTSTATUS lsa_CREDRGETTARGETINFO(); + [todo] NTSTATUS lsa_CREDRGETTARGETINFO(); /* Function 0x43 */ - NTSTATUS lsa_CREDRPROFILELOADED(); + [todo] NTSTATUS lsa_CREDRPROFILELOADED(); /**********************/ /* Function 0x44 */ @@ -967,16 +967,16 @@ import "misc.idl", "security.idl"; ); /* Function 0x45 */ - NTSTATUS lsa_CREDRGETSESSIONTYPES(); + [todo] NTSTATUS lsa_CREDRGETSESSIONTYPES(); /* Function 0x46 */ - NTSTATUS lsa_LSARREGISTERAUDITEVENT(); + [todo] NTSTATUS lsa_LSARREGISTERAUDITEVENT(); /* Function 0x47 */ - NTSTATUS lsa_LSARGENAUDITEVENT(); + [todo] NTSTATUS lsa_LSARGENAUDITEVENT(); /* Function 0x48 */ - NTSTATUS lsa_LSARUNREGISTERAUDITEVENT(); + [todo] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT(); /* Function 0x49 */ typedef struct { @@ -1024,10 +1024,10 @@ import "misc.idl", "security.idl"; ); /* Function 0x4a */ - NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION(); + [todo] NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION(); /* Function 0x4b */ - NTSTATUS lsa_CREDRRENAME(); + [todo] NTSTATUS lsa_CREDRRENAME(); /*****************/ /* Function 0x4c */ @@ -1055,15 +1055,15 @@ import "misc.idl", "security.idl"; ); /* Function 0x4e */ - NTSTATUS lsa_LSAROPENPOLICYSCE(); + [todo] NTSTATUS lsa_LSAROPENPOLICYSCE(); /* Function 0x4f */ - NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE(); + [todo] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE(); /* Function 0x50 */ - NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(); + [todo] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(); /* Function 0x51 */ - NTSTATUS lsa_LSARADTREPORTSECURITYEVENT(); + [todo] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT(); } diff --git a/source4/librpc/idl/msgsvc.idl b/source4/librpc/idl/msgsvc.idl index 09878ac7a4..d196daf06b 100644 --- a/source4/librpc/idl/msgsvc.idl +++ b/source4/librpc/idl/msgsvc.idl @@ -7,10 +7,10 @@ helpstring("Messaging Service") ] interface msgsvc { - void NetrMessageNameAdd(); - void NetrMessageNameEnum(); - void NetrMessageNameGetInfo(); - void NetrMessageNameDel(); + [todo] void NetrMessageNameAdd(); + [todo] void NetrMessageNameEnum(); + [todo] void NetrMessageNameGetInfo(); + [todo] void NetrMessageNameDel(); } [ @@ -18,5 +18,5 @@ version(1.0) ] interface msgsvcsend { - void NetrSendMessage(); + [todo] void NetrSendMessage(); } diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl index b29fc50bfa..6da496a486 100644 --- a/source4/librpc/idl/netlogon.idl +++ b/source4/librpc/idl/netlogon.idl @@ -983,11 +983,11 @@ interface netlogon /*****************/ /* Function 0x15 */ - WERROR netr_NETRLOGONDUMMYROUTINE1(); + [todo] WERROR netr_NETRLOGONDUMMYROUTINE1(); /****************/ /* Function 0x16 */ - WERROR netr_NETRLOGONSETSERVICEBITS(); + [todo] WERROR netr_NETRLOGONSETSERVICEBITS(); /****************/ /* Function 0x17 */ @@ -999,11 +999,11 @@ interface netlogon /****************/ /* Function 0x18 */ - WERROR netr_NETRLOGONCOMPUTESERVERDIGEST(); + [todo] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST(); /****************/ /* Function 0x19 */ - WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST(); + [todo] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST(); /****************/ /* Function 0x1a */ @@ -1128,7 +1128,7 @@ interface netlogon /****************/ /* Function 0x20 */ - WERROR netr_NETRLOGONSENDTOSAM(); + [todo] WERROR netr_NETRLOGONSENDTOSAM(); /****************/ /* Function 0x21 */ @@ -1164,7 +1164,7 @@ interface netlogon /****************/ /* Function 0x23 */ - WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(); + [todo] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(); /****************/ /* Function 0x24 */ @@ -1332,5 +1332,5 @@ interface netlogon /****************/ /* Function 0x2e */ - WERROR netr_NETRSERVERGETTRUSTINFO(); + [todo] WERROR netr_NETRSERVERGETTRUSTINFO(); } diff --git a/source4/librpc/idl/ntsvcs.idl b/source4/librpc/idl/ntsvcs.idl index 05ba68e727..1cdf8eecaa 100644 --- a/source4/librpc/idl/ntsvcs.idl +++ b/source4/librpc/idl/ntsvcs.idl @@ -9,69 +9,69 @@ ] interface ntsvcs { - void PNP_Disconnect(); - void PNP_Connect(); - void PNP_GetVersion(); - void PNP_GetGlobalState(); - void PNP_InitDetection(); - void PNP_ReportLogOn(); - void PNP_ValidateDeviceInstance(); - void PNP_GetRootDeviceInstance(); - void PNP_GetRelatedDeviceInstance(); - void PNP_EnumerateSubKeys(); - void PNP_GetDeviceList(); - void PNP_GetDeviceListSize(); - void PNP_GetDepth(); - void PNP_GetDeviceRegProp(); - void PNP_SetDeviceRegProp(); - void PNP_GetClassInstance(); - void PNP_CreateKey(); - void PNP_DeleteRegistryKey(); - void PNP_GetClassCount(); - void PNP_GetClassName(); - void PNP_DeleteClassKey(); - void PNP_GetInterfaceDeviceAlias(); - void PNP_GetInterfaceDeviceList(); - void PNP_GetInterfaceDeviceListSize(); - void PNP_RegisterDeviceClassAssociation(); - void PNP_UnregisterDeviceClassAssociation(); - void PNP_GetClassRegProp(); - void PNP_SetClassRegProp(); - void PNP_CreateDevInst(); - void PNP_DeviceInstanceAction(); - void PNP_GetDeviceStatus(); - void PNP_SetDeviceProblem(); - void PNP_DisableDevInst(); - void PNP_UninstallDevInst(); - void PNP_AddID(); - void PNP_RegisterDriver(); - void PNP_QueryRemove(); - void PNP_RequestDeviceEject(); - void PNP_IsDockStationPresent(); - void PNP_RequestEjectPC(); - void PNP_HwProfFlags(); - void PNP_GetHwProfInfo(); - void PNP_AddEmptyLogConf(); - void PNP_FreeLogConf(); - void PNP_GetFirstLogConf(); - void PNP_GetNextLogConf(); - void PNP_GetLogConfPriority(); - void PNP_AddResDes(); - void PNP_FreeResDes(); - void PNP_GetNextResDes(); - void PNP_GetResDesData(); - void PNP_GetResDesDataSize(); - void PNP_ModifyResDes(); - void PNP_DetectResourceLimit(); - void PNP_QueryResConfList(); - void PNP_SetHwProf(); - void PNP_QueryArbitratorFreeData(); - void PNP_QueryArbitratorFreeSize(); - void PNP_RunDetection(); - void PNP_RegisterNotification(); - void PNP_UnregisterNotification(); - void PNP_GetCustomDevProp(); - void PNP_GetVersionInternal(); - void PNP_GetBlockedDriverInfo(); - void PNP_GetServerSideDeviceInstallFlags(); + [todo] void PNP_Disconnect(); + [todo] void PNP_Connect(); + [todo] void PNP_GetVersion(); + [todo] void PNP_GetGlobalState(); + [todo] void PNP_InitDetection(); + [todo] void PNP_ReportLogOn(); + [todo] void PNP_ValidateDeviceInstance(); + [todo] void PNP_GetRootDeviceInstance(); + [todo] void PNP_GetRelatedDeviceInstance(); + [todo] void PNP_EnumerateSubKeys(); + [todo] void PNP_GetDeviceList(); + [todo] void PNP_GetDeviceListSize(); + [todo] void PNP_GetDepth(); + [todo] void PNP_GetDeviceRegProp(); + [todo] void PNP_SetDeviceRegProp(); + [todo] void PNP_GetClassInstance(); + [todo] void PNP_CreateKey(); + [todo] void PNP_DeleteRegistryKey(); + [todo] void PNP_GetClassCount(); + [todo] void PNP_GetClassName(); + [todo] void PNP_DeleteClassKey(); + [todo] void PNP_GetInterfaceDeviceAlias(); + [todo] void PNP_GetInterfaceDeviceList(); + [todo] void PNP_GetInterfaceDeviceListSize(); + [todo] void PNP_RegisterDeviceClassAssociation(); + [todo] void PNP_UnregisterDeviceClassAssociation(); + [todo] void PNP_GetClassRegProp(); + [todo] void PNP_SetClassRegProp(); + [todo] void PNP_CreateDevInst(); + [todo] void PNP_DeviceInstanceAction(); + [todo] void PNP_GetDeviceStatus(); + [todo] void PNP_SetDeviceProblem(); + [todo] void PNP_DisableDevInst(); + [todo] void PNP_UninstallDevInst(); + [todo] void PNP_AddID(); + [todo] void PNP_RegisterDriver(); + [todo] void PNP_QueryRemove(); + [todo] void PNP_RequestDeviceEject(); + [todo] void PNP_IsDockStationPresent(); + [todo] void PNP_RequestEjectPC(); + [todo] void PNP_HwProfFlags(); + [todo] void PNP_GetHwProfInfo(); + [todo] void PNP_AddEmptyLogConf(); + [todo] void PNP_FreeLogConf(); + [todo] void PNP_GetFirstLogConf(); + [todo] void PNP_GetNextLogConf(); + [todo] void PNP_GetLogConfPriority(); + [todo] void PNP_AddResDes(); + [todo] void PNP_FreeResDes(); + [todo] void PNP_GetNextResDes(); + [todo] void PNP_GetResDesData(); + [todo] void PNP_GetResDesDataSize(); + [todo] void PNP_ModifyResDes(); + [todo] void PNP_DetectResourceLimit(); + [todo] void PNP_QueryResConfList(); + [todo] void PNP_SetHwProf(); + [todo] void PNP_QueryArbitratorFreeData(); + [todo] void PNP_QueryArbitratorFreeSize(); + [todo] void PNP_RunDetection(); + [todo] void PNP_RegisterNotification(); + [todo] void PNP_UnregisterNotification(); + [todo] void PNP_GetCustomDevProp(); + [todo] void PNP_GetVersionInternal(); + [todo] void PNP_GetBlockedDriverInfo(); + [todo] void PNP_GetServerSideDeviceInstallFlags(); } diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl index 64cfd46b0e..6b4b0b8a16 100644 --- a/source4/librpc/idl/spoolss.idl +++ b/source4/librpc/idl/spoolss.idl @@ -386,14 +386,14 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x05 */ - WERROR spoolss_AddPrinter( + [todo] WERROR spoolss_AddPrinter( /* This function is not implemented in Samba 3 as no clients have been observed using it. */ ); /******************/ /* Function: 0x06 */ - WERROR spoolss_DeletePrinter( + [todo] WERROR spoolss_DeletePrinter( ); /******************/ @@ -442,7 +442,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x09 */ - WERROR spoolss_AddPrinterDriver( + [todo] WERROR spoolss_AddPrinterDriver( ); typedef struct { @@ -564,7 +564,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x0b */ - WERROR spoolss_GetPrinterDriver( + [todo] WERROR spoolss_GetPrinterDriver( ); /******************/ @@ -602,7 +602,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x0e */ - WERROR spoolss_AddPrintProcessor( + [todo] WERROR spoolss_AddPrintProcessor( ); /******************/ @@ -644,7 +644,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x10 */ - WERROR spoolss_GetPrintProcessorDirectory( + [todo] WERROR spoolss_GetPrintProcessorDirectory( ); /******************/ @@ -713,12 +713,12 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x18 */ - WERROR spoolss_AddJob( + [todo] WERROR spoolss_AddJob( ); /******************/ /* Function: 0x19 */ - WERROR spoolss_ScheduleJob( + [todo] WERROR spoolss_ScheduleJob( ); /******************/ @@ -806,7 +806,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x1c */ - WERROR spoolss_WaitForPrinterChange( + [todo] WERROR spoolss_WaitForPrinterChange( ); /******************/ @@ -1022,79 +1022,79 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x26 */ - WERROR spoolss_ConfigurePort( + [todo] WERROR spoolss_ConfigurePort( ); /******************/ /* Function: 0x27 */ - WERROR spoolss_DeletePort( + [todo] WERROR spoolss_DeletePort( ); /******************/ /* Function: 0x28 */ - WERROR spoolss_CreatePrinterIC( + [todo] WERROR spoolss_CreatePrinterIC( ); /******************/ /* Function: 0x29 */ - WERROR spoolss_PlayGDIScriptOnPrinterIC( + [todo] WERROR spoolss_PlayGDIScriptOnPrinterIC( ); /******************/ /* Function: 0x2a */ - WERROR spoolss_DeletePrinterIC( + [todo] WERROR spoolss_DeletePrinterIC( ); /******************/ /* Function: 0x2b */ - WERROR spoolss_AddPrinterConnection( + [todo] WERROR spoolss_AddPrinterConnection( ); /******************/ /* Function: 0x2c */ - WERROR spoolss_DeletePrinterConnection( + [todo] WERROR spoolss_DeletePrinterConnection( ); /******************/ /* Function: 0x2d */ - WERROR spoolss_PrinterMessageBox( + [todo] WERROR spoolss_PrinterMessageBox( /* Marked as obsolete in MSDN. "Not necessary and has no effect". */ ); /******************/ /* Function: 0x2e */ - WERROR spoolss_AddMonitor( + [todo] WERROR spoolss_AddMonitor( ); /******************/ /* Function: 0x2f */ - WERROR spoolss_DeleteMonitor( + [todo] WERROR spoolss_DeleteMonitor( ); /******************/ /* Function: 0x30 */ - WERROR spoolss_DeletePrintProcessor( + [todo] WERROR spoolss_DeletePrintProcessor( ); /******************/ /* Function: 0x31 */ - WERROR spoolss_AddPrintProvidor( + [todo] WERROR spoolss_AddPrintProvidor( ); /******************/ /* Function: 0x32 */ - WERROR spoolss_DeletePrintProvidor( + [todo] WERROR spoolss_DeletePrintProvidor( ); /******************/ /* Function: 0x33 */ - WERROR spoolss_EnumPrintProcDataTypes( + [todo] WERROR spoolss_EnumPrintProcDataTypes( ); /******************/ /* Function: 0x34 */ - WERROR spoolss_ResetPrinter( + [todo] WERROR spoolss_ResetPrinter( ); /******************/ @@ -1115,12 +1115,12 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x36 */ - WERROR spoolss_FindFirstPrinterChangeNotification( + [todo] WERROR spoolss_FindFirstPrinterChangeNotification( ); /******************/ /* Function: 0x37 */ - WERROR spoolss_FindNextPrinterChangeNotification( + [todo] WERROR spoolss_FindNextPrinterChangeNotification( ); /******************/ @@ -1131,7 +1131,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x39 */ - WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld( + [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld( ); /******************/ @@ -1147,7 +1147,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x3b */ - WERROR spoolss_RouterReplyPrinter( + [todo] WERROR spoolss_RouterReplyPrinter( ); /******************/ @@ -1158,22 +1158,22 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x3d */ - WERROR spoolss_AddPortEx( + [todo] WERROR spoolss_AddPortEx( ); /******************/ /* Function: 0x3e */ - WERROR spoolss_RouterFindFirstPrinterChangeNotification( + [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotification( ); /******************/ /* Function: 0x3f */ - WERROR spoolss_SpoolerInit( + [todo] WERROR spoolss_SpoolerInit( ); /******************/ /* Function: 0x40 */ - WERROR spoolss_ResetPrinterEx( + [todo] WERROR spoolss_ResetPrinterEx( ); typedef [enum16bit] enum { @@ -1239,7 +1239,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x42 */ - WERROR spoolss_RouterRefreshPrinterChangeNotification( + [todo] WERROR spoolss_RouterRefreshPrinterChangeNotification( ); typedef struct { @@ -1295,7 +1295,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x44 */ - WERROR spoolss_44( + [todo] WERROR spoolss_44( ); typedef struct { @@ -1399,7 +1399,7 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x47 */ - WERROR spoolss_47( + [todo] WERROR spoolss_47( ); /******************/ @@ -1425,17 +1425,17 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x4a */ - WERROR spoolss_4a( + [todo] WERROR spoolss_4a( ); /******************/ /* Function: 0x4b */ - WERROR spoolss_4b( + [todo] WERROR spoolss_4b( ); /******************/ /* Function: 0x4c */ - WERROR spoolss_4c( + [todo] WERROR spoolss_4c( ); /******************/ @@ -1492,32 +1492,32 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x52 */ - WERROR spoolss_DeletePrinterKey( + [todo] WERROR spoolss_DeletePrinterKey( ); /******************/ /* Function: 0x53 */ - WERROR spoolss_53( + [todo] WERROR spoolss_53( ); /******************/ /* Function: 0x54 */ - WERROR spoolss_DeletePrinterDriverEx( + [todo] WERROR spoolss_DeletePrinterDriverEx( ); /******************/ /* Function: 0x55 */ - WERROR spoolss_55( + [todo] WERROR spoolss_55( ); /******************/ /* Function: 0x56 */ - WERROR spoolss_56( + [todo] WERROR spoolss_56( ); /******************/ /* Function: 0x57 */ - WERROR spoolss_57( + [todo] WERROR spoolss_57( ); /******************/ @@ -1536,36 +1536,36 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x59 */ - [public] WERROR spoolss_AddPrinterDriverEx( + [public,todo] WERROR spoolss_AddPrinterDriverEx( ); /******************/ /* Function: 0x5a */ - WERROR spoolss_5a( + [todo] WERROR spoolss_5a( ); /******************/ /* Function: 0x5b */ - WERROR spoolss_5b( + [todo] WERROR spoolss_5b( ); /******************/ /* Function: 0x5c */ - WERROR spoolss_5c( + [todo] WERROR spoolss_5c( ); /******************/ /* Function: 0x5d */ - WERROR spoolss_5d( + [todo] WERROR spoolss_5d( ); /******************/ /* Function: 0x5e */ - WERROR spoolss_5e( + [todo] WERROR spoolss_5e( ); /******************/ /* Function: 0x5f */ - WERROR spoolss_5f( + [todo] WERROR spoolss_5f( ); } diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl index 8ef49413bc..703f3281cf 100644 --- a/source4/librpc/idl/srvsvc.idl +++ b/source4/librpc/idl/srvsvc.idl @@ -1370,7 +1370,7 @@ import "security.idl", "svcctl.idl"; /******************/ /* Function: 0x22 */ - WERROR srvsvc_NETRPRNAMECANONICALIZE( + [todo] WERROR srvsvc_NETRPRNAMECANONICALIZE( ); /******************/ @@ -1464,56 +1464,56 @@ import "security.idl", "svcctl.idl"; /******************/ /* Function: 0x2b */ - WERROR srvsvc_NETRDFSGETVERSION( + [todo] WERROR srvsvc_NETRDFSGETVERSION( ); /******************/ /* Function: 0x2c */ - WERROR srvsvc_NETRDFSCREATELOCALPARTITION( + [todo] WERROR srvsvc_NETRDFSCREATELOCALPARTITION( ); /******************/ /* Function: 0x2d */ - WERROR srvsvc_NETRDFSDELETELOCALPARTITION( + [todo] WERROR srvsvc_NETRDFSDELETELOCALPARTITION( ); /******************/ /* Function: 0x2e */ - WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE( + [todo] WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE( ); /******************/ /* Function: 0x2f */ - WERROR srvsvc_NETRDFSSETSERVERINFO( + [todo] WERROR srvsvc_NETRDFSSETSERVERINFO( ); /******************/ /* Function: 0x30 */ - WERROR srvsvc_NETRDFSCREATEEXITPOINT( + [todo] WERROR srvsvc_NETRDFSCREATEEXITPOINT( ); /******************/ /* Function: 0x31 */ - WERROR srvsvc_NETRDFSDELETEEXITPOINT( + [todo] WERROR srvsvc_NETRDFSDELETEEXITPOINT( ); /******************/ /* Function: 0x32 */ - WERROR srvsvc_NETRDFSMODIFYPREFIX( + [todo] WERROR srvsvc_NETRDFSMODIFYPREFIX( ); /******************/ /* Function: 0x33 */ - WERROR srvsvc_NETRDFSFIXLOCALVOLUME( + [todo] WERROR srvsvc_NETRDFSFIXLOCALVOLUME( ); /******************/ /* Function: 0x34 */ - WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO( + [todo] WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO( ); /******************/ /* Function: 0x35 */ - WERROR srvsvc_NETRSERVERTRANSPORTDELEX( + [todo] WERROR srvsvc_NETRSERVERTRANSPORTDELEX( ); } diff --git a/source4/librpc/idl/svcctl.idl b/source4/librpc/idl/svcctl.idl index 8f368ef878..615f4e3dab 100644 --- a/source4/librpc/idl/svcctl.idl +++ b/source4/librpc/idl/svcctl.idl @@ -115,12 +115,12 @@ import "misc.idl"; /*****************/ /* Function 0x04 */ - WERROR svcctl_QueryServiceObjectSecurity( + [todo] WERROR svcctl_QueryServiceObjectSecurity( ); /*****************/ /* Function 0x05 */ - WERROR svcctl_SetServiceObjectSecurity( + [todo] WERROR svcctl_SetServiceObjectSecurity( ); /*****************/ @@ -132,7 +132,7 @@ import "misc.idl"; /*****************/ /* Function 0x07 */ - WERROR svcctl_SetServiceStatus( + [todo] WERROR svcctl_SetServiceStatus( ); /*****************/ @@ -143,7 +143,7 @@ import "misc.idl"; /*****************/ /* Function 0x09 */ - WERROR svcctl_NotifyBootConfigStatus( + [todo] WERROR svcctl_NotifyBootConfigStatus( ); /*****************/ @@ -408,12 +408,12 @@ import "misc.idl"; /*****************/ /* Function 0x22 */ - WERROR svcctl_GetCurrentGroupeStateW( + [todo] WERROR svcctl_GetCurrentGroupeStateW( ); /*****************/ /* Function 0x23 */ - WERROR svcctl_EnumServiceGroupW( + [todo] WERROR svcctl_EnumServiceGroupW( ); /*****************/ @@ -494,6 +494,6 @@ import "misc.idl"; /*****************/ /* Function 0x2b */ - WERROR svcctl_SCSendTSMessage( + [todo] WERROR svcctl_SCSendTSMessage( ); } diff --git a/source4/librpc/idl/w32time.idl b/source4/librpc/idl/w32time.idl index c3c6e014de..4839899629 100644 --- a/source4/librpc/idl/w32time.idl +++ b/source4/librpc/idl/w32time.idl @@ -14,8 +14,8 @@ interface w32time /*****************/ /* Function 0x00 */ - WERROR w32time_SyncTime(); + [todo] WERROR w32time_SyncTime(); - WERROR w32time_GetNetLogonServiceBits(); - WERROR w32time_QueryProviderStatus(); + [todo] WERROR w32time_GetNetLogonServiceBits(); + [todo] WERROR w32time_QueryProviderStatus(); } diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl index 5e5d5542b6..1e01a91197 100644 --- a/source4/librpc/idl/winreg.idl +++ b/source4/librpc/idl/winreg.idl @@ -249,7 +249,7 @@ import "lsa.idl", "security.idl"; /******************/ /* Function: 0x12 */ - WERROR winreg_ReplaceKey( + [todo] WERROR winreg_ReplaceKey( ); /******************/ @@ -295,7 +295,7 @@ import "lsa.idl", "security.idl"; /******************/ /* Function: 0x17 */ - WERROR winreg_UnLoadKey( + [todo] WERROR winreg_UnLoadKey( ); /******************/ @@ -375,7 +375,7 @@ import "lsa.idl", "security.idl"; /******************/ /* Function: 0x1f */ - WERROR winreg_SaveKeyEx( + [todo] WERROR winreg_SaveKeyEx( ); /******************/ @@ -396,6 +396,6 @@ import "lsa.idl", "security.idl"; /******************/ /* Function: 0x22 */ - WERROR winreg_QueryMultipleValues2( + [todo] WERROR winreg_QueryMultipleValues2( ); } diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index 86ed1a8d10..33e5ad3196 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -866,6 +866,7 @@ my %property_list = ( "nosize" => ["FUNCTION", "TYPEDEF"], "noprint" => ["FUNCTION", "TYPEDEF"], "noejs" => ["FUNCTION", "TYPEDEF"], + "todo" => ["FUNCTION"], # union "switch_is" => ["ELEMENT"], diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm index 2475925377..c04324e992 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -21,7 +21,7 @@ $VERSION = '0.01'; sub new($) { my ($class) = @_; my $self = { res => "", res_hdr => "", tabs => "", constants => {}, - module_methods => []}; + module_methods => [], module_objects => [], module_types => []}; bless($self, $class); } @@ -163,46 +163,35 @@ sub FromPythonToUnionFunction($$$$$) $self->pidl("return ret;"); } -sub PythonStruct($$$$) +sub PythonStruct($$$$$$) { - my ($self, $name, $cname, $d) = @_; + my ($self, $modulename, $prettyname, $name, $cname, $d) = @_; my $env = GenerateStructEnv($d, "object"); $self->pidl(""); - $self->pidl("static PyObject *py_$name\_getattr(PyObject *obj, char *name)"); - $self->pidl("{"); - $self->indent; + my $getsetters = "NULL"; + if ($#{$d->{ELEMENTS}} > -1) { - $self->pidl("$cname *object = py_talloc_get_ptr(obj);"); foreach my $e (@{$d->{ELEMENTS}}) { - $self->pidl("if (!strcmp(name, \"$e->{NAME}\")) {"); my $varname = "object->$e->{NAME}"; + $self->pidl("static PyObject *py_$name\_get_$e->{NAME}(PyObject *obj, void *closure)"); + $self->pidl("{"); $self->indent; + $self->pidl("$cname *object = py_talloc_get_ptr(obj);"); $self->pidl("PyObject *py_$e->{NAME};"); $self->ConvertObjectToPython("py_talloc_get_mem_ctx(obj)", $env, $e, $varname, "py_$e->{NAME}"); $self->pidl("return py_$e->{NAME};"); $self->deindent; $self->pidl("}"); - } - } - $self->pidl("PyErr_SetString(PyExc_AttributeError, \"no such attribute\");"); - $self->pidl("return NULL;"); - $self->deindent; - $self->pidl("}"); - $self->pidl(""); + $self->pidl(""); - $self->pidl("static int py_$name\_setattr(PyObject *py_obj, char *name, PyObject *value)"); - $self->pidl("{"); - $self->indent; - if ($#{$d->{ELEMENTS}} > -1) { - $self->pidl("$cname *object = py_talloc_get_ptr(py_obj);"); - my $mem_ctx = "py_talloc_get_mem_ctx(py_obj)"; - foreach my $e (@{$d->{ELEMENTS}}) { - $self->pidl("if (!strcmp(name, \"$e->{NAME}\")) {"); - my $varname = "object->$e->{NAME}"; + $self->pidl("static int py_$name\_set_$e->{NAME}(PyObject *py_obj, PyObject *value, void *closure)"); + $self->pidl("{"); $self->indent; + $self->pidl("$cname *object = py_talloc_get_ptr(py_obj);"); + my $mem_ctx = "py_talloc_get_mem_ctx(py_obj)"; my $l = $e->{LEVELS}[0]; my $nl = GetNextLevel($e, $l); if ($l->{TYPE} eq "POINTER" and @@ -214,52 +203,60 @@ sub PythonStruct($$$$) $self->pidl("return 0;"); $self->deindent; $self->pidl("}"); + $self->pidl(""); + } + + $getsetters = "py_$name\_getsetters"; + $self->pidl("static PyGetSetDef ".$getsetters."[] = {"); + $self->indent; + foreach my $e (@{$d->{ELEMENTS}}) { + $self->pidl("{ discard_const_p(char, \"$e->{NAME}\"), py_$name\_get_$e->{NAME}, py_$name\_set_$e->{NAME} },"); } + $self->pidl("{ NULL }"); + $self->deindent; + $self->pidl("};"); + $self->pidl(""); } - $self->pidl("PyErr_SetString(PyExc_AttributeError, \"no such attribute\");"); - $self->pidl("return -1;"); + + $self->pidl("static PyObject *py_$name\_new(PyTypeObject *self, PyObject *args, PyObject *kwargs)"); + $self->pidl("{"); + $self->indent; + $self->pidl("$cname *ret = talloc_zero(NULL, $cname);"); + $self->pidl("return py_talloc_import(&$name\_Type, ret);"); $self->deindent; $self->pidl("}"); + $self->pidl(""); $self->pidl_hdr("PyAPI_DATA(PyTypeObject) $name\_Type;\n"); $self->pidl_hdr("#define $name\_Check(op) PyObject_TypeCheck(op, &$name\_Type)\n"); $self->pidl_hdr("#define $name\_CheckExact(op) ((op)->ob_type == &$name\_Type)\n"); $self->pidl_hdr("\n"); - $self->pidl("PyTypeObject $name\_Type = {"); + my $docstring = ($self->DocString($d, $name) or "NULL"); + my $typeobject = "$name\_Type"; + $self->pidl("PyTypeObject $typeobject = {"); $self->indent; $self->pidl("PyObject_HEAD_INIT(NULL) 0,"); - $self->pidl(".tp_name = \"$name\","); + $self->pidl(".tp_name = \"$modulename.$prettyname\","); $self->pidl(".tp_basicsize = sizeof(py_talloc_Object),"); $self->pidl(".tp_dealloc = py_talloc_dealloc,"); - $self->pidl(".tp_getattr = py_$name\_getattr,"); - $self->pidl(".tp_setattr = py_$name\_setattr,"); + $self->pidl(".tp_getset = $getsetters,"); $self->pidl(".tp_repr = py_talloc_default_repr,"); + $self->pidl(".tp_doc = $docstring,"); + $self->pidl(".tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,"); + $self->pidl(".tp_new = py_$name\_new,"); $self->deindent; $self->pidl("};"); $self->pidl(""); - my $py_fnname = "py_$name"; - $self->pidl("static PyObject *$py_fnname(PyObject *self, PyObject *args)"); - $self->pidl("{"); - $self->indent; - $self->pidl("$cname *ret = talloc_zero(NULL, $cname);"); - $self->pidl("return py_talloc_import(&$name\_Type, ret);"); - $self->deindent; - $self->pidl("}"); - $self->pidl(""); - - return $py_fnname; + return "&$typeobject"; } -sub PythonFunction($$$) +sub PythonFunctionBody($$$) { - my ($self, $fn, $iface) = @_; + my ($self, $fn, $iface, $prettyname) = @_; - $self->pidl("static PyObject *py_$fn->{NAME}(PyObject *self, PyObject *args, PyObject *kwargs)"); - $self->pidl("{"); - $self->indent; $self->pidl("$iface\_InterfaceObject *iface = ($iface\_InterfaceObject *)self;"); $self->pidl("NTSTATUS status;"); $self->pidl("TALLOC_CTX *mem_ctx = talloc_new(NULL);"); @@ -273,6 +270,8 @@ sub PythonFunction($$$) my $args_string = ""; my $args_names = ""; + my $signature = "S.$prettyname("; + foreach my $e (@{$fn->{ELEMENTS}}) { $self->pidl("PyObject *py_$e->{NAME};"); if (grep(/out/,@{$e->{DIRECTION}})) { @@ -282,8 +281,14 @@ sub PythonFunction($$$) $args_format .= "O"; $args_string .= ", &py_$e->{NAME}"; $args_names .= "\"$e->{NAME}\", "; + $signature .= "$e->{NAME}, "; } } + if (substr($signature, -2) eq ", ") { + $signature = substr($signature, 0, -2); + } + $signature.= ") -> "; + $self->pidl("const char *kwnames[] = {"); $self->indent; $self->pidl($args_names . "NULL"); @@ -314,6 +319,9 @@ sub PythonFunction($$$) if ($result_size > 1) { $self->pidl("result = PyTuple_New($result_size);"); + $signature .= "("; + } elsif ($result_size == 0) { + $signature .= "None"; } foreach my $e (@{$fn->{ELEMENTS}}) { @@ -323,8 +331,10 @@ sub PythonFunction($$$) if ($result_size > 1) { $self->pidl("PyTuple_SetItem(result, $i, $py_name);"); $i++; + $signature .= "$e->{NAME}, "; } else { $self->pidl("result = $py_name;"); + $signature .= "result"; } } } @@ -337,16 +347,55 @@ sub PythonFunction($$$) my $conv = $self->ConvertObjectToPythonData("r", $fn->{RETURN_TYPE}, "r->out.result"); if ($result_size > 1) { $self->pidl("PyTuple_SetItem(result, $i, $conv);"); + $signature .= "result"; } else { $self->pidl("result = $conv;"); + $signature .= "result"; } } + if (substr($signature, -2) eq ", ") { + $signature = substr($signature, 0, -2); + } + if ($result_size > 1) { + $signature .= ")"; + } + $self->pidl("talloc_free(mem_ctx);"); $self->pidl("return result;"); + + return $signature; +} + +sub PythonFunction($$$) +{ + my ($self, $fn, $iface, $prettyname) = @_; + + my $fnname = "py_$fn->{NAME}"; + my $docstring = $self->DocString($fn, $fn->{NAME}); + + $self->pidl("static PyObject *$fnname(PyObject *self, PyObject *args, PyObject *kwargs)"); + $self->pidl("{"); + $self->indent; + if (has_property($fn, "todo")) { + $self->pidl("PyErr_SetString(PyExc_NotImplementedError, \"No marshalling code available yet for $prettyname\");"); + $self->pidl("return NULL;"); + unless ($docstring) { $docstring = "NULL"; } + } else { + my $signature = $self->PythonFunctionBody($fn, $iface, $prettyname); + + if ($docstring) { + $docstring = "\"$signature\\n\\n\"$docstring"; + } else { + $docstring = "\"$signature\""; + } + } + $self->deindent; $self->pidl("}"); $self->pidl(""); + + return ($fnname, $docstring); } sub handle_werror($$$$) @@ -377,9 +426,9 @@ sub handle_ntstatus($$$$) $self->pidl(""); } -sub PythonType($$$) +sub PythonType($$$$) { - my ($self, $d, $interface, $basename) = @_; + my ($self, $modulename, $d, $interface, $basename) = @_; my $actual_ctype = $d; if ($actual_ctype->{TYPE} eq "TYPEDEF") { @@ -387,19 +436,20 @@ sub PythonType($$$) } if ($actual_ctype->{TYPE} eq "STRUCT") { - my $py_fnname; - if ($d->{TYPE} eq "STRUCT") { - $py_fnname = $self->PythonStruct($d->{NAME}, mapTypeName($d), $d); - } else { - $py_fnname = $self->PythonStruct($d->{NAME}, mapTypeName($d), $d->{DATA}); - } - + my $typeobject; my $fn_name = $d->{NAME}; $fn_name =~ s/^$interface->{NAME}_//; $fn_name =~ s/^$basename\_//; - $self->register_module_method($fn_name, $py_fnname, "METH_NOARGS", "NULL"); + + if ($d->{TYPE} eq "STRUCT") { + $typeobject = $self->PythonStruct($modulename, $fn_name, $d->{NAME}, mapTypeName($d), $d); + } else { + $typeobject = $self->PythonStruct($modulename, $fn_name, $d->{NAME}, mapTypeName($d), $d->{DATA}); + } + + $self->register_module_typeobject($fn_name, $typeobject); } if ($d->{TYPE} eq "ENUM" or $d->{TYPE} eq "BITMAP") { @@ -429,6 +479,18 @@ sub PythonType($$$) } } +sub DocString($$$) +{ + my ($self, $d, $name) = @_; + if (has_property($d, "helpstring")) { + my $docstring = uc("py_doc_$name"); + $self->pidl("#define $docstring ".has_property($d, "helpstring")); + return $docstring; + } + + return undef; +} + sub Interface($$$) { my($self,$interface,$basename) = @_; @@ -443,7 +505,7 @@ sub Interface($$$) foreach my $d (@{$interface->{TYPES}}) { next if has_property($d, "nopython"); - $self->PythonType($d, $interface, $basename); + $self->PythonType($basename, $d, $interface, $basename); } if (defined $interface->{PROPERTIES}->{uuid}) { @@ -457,25 +519,27 @@ sub Interface($$$) $self->pidl(""); + my @fns = (); + foreach my $d (@{$interface->{FUNCTIONS}}) { next if not defined($d->{OPNUM}); next if has_property($d, "nopython"); - $self->PythonFunction($d, $interface->{NAME}); - } + my $prettyname = $d->{NAME}; - $self->pidl("static PyMethodDef interface_$interface->{NAME}\_methods[] = {"); - $self->indent; - foreach my $d (@{$interface->{FUNCTIONS}}) { - next if not defined($d->{OPNUM}); - next if has_property($d, "nopython"); + $prettyname =~ s/^$interface->{NAME}_//; + $prettyname =~ s/^$basename\_//; - my $fn_name = $d->{NAME}; + my ($fnname, $fndocstring) = $self->PythonFunction($d, $interface->{NAME}, $prettyname); - $fn_name =~ s/^$interface->{NAME}_//; - $fn_name =~ s/^$basename\_//; + push (@fns, [$fnname, $prettyname, $fndocstring]); + } - $self->pidl("{ \"$fn_name\", (PyCFunction)py_$d->{NAME}, METH_VARARGS|METH_KEYWORDS, NULL },"); + $self->pidl("static PyMethodDef interface_$interface->{NAME}\_methods[] = {"); + $self->indent; + foreach my $d (@fns) { + my ($c_fn, $prettyname, $docstring) = @$d; + $self->pidl("{ \"$prettyname\", (PyCFunction)$c_fn, METH_VARARGS|METH_KEYWORDS, $docstring },"); } $self->pidl("{ NULL, NULL, 0, NULL }"); $self->deindent; @@ -492,29 +556,7 @@ sub Interface($$$) $self->pidl("}"); $self->pidl(""); - $self->pidl("static PyObject *interface_$interface->{NAME}_getattr(PyObject *obj, char *name)"); - $self->pidl("{"); - $self->indent; - $self->pidl("return Py_FindMethod(interface_$interface->{NAME}\_methods, obj, name);"); - $self->deindent; - $self->pidl("}"); - - $self->pidl(""); - - $self->pidl("PyTypeObject $interface->{NAME}_InterfaceType = {"); - $self->indent; - $self->pidl("PyObject_HEAD_INIT(NULL) 0,"); - $self->pidl(".tp_name = \"$interface->{NAME}\","); - $self->pidl(".tp_basicsize = sizeof($interface->{NAME}_InterfaceObject),"); - $self->pidl(".tp_dealloc = interface_$interface->{NAME}_dealloc,"); - $self->pidl(".tp_getattr = interface_$interface->{NAME}_getattr,"); - $self->deindent; - $self->pidl("};"); - - $self->pidl(""); - - $self->register_module_method($interface->{NAME}, "interface_$interface->{NAME}", "METH_VARARGS|METH_KEYWORDS", "NULL"); - $self->pidl("static PyObject *interface_$interface->{NAME}(PyObject *self, PyObject *args, PyObject *kwargs)"); + $self->pidl("static PyObject *interface_$interface->{NAME}_new(PyTypeObject *self, PyObject *args, PyObject *kwargs)"); $self->pidl("{"); $self->indent; $self->pidl("$interface->{NAME}_InterfaceObject *ret;"); @@ -574,6 +616,38 @@ sub Interface($$$) $self->pidl("}"); $self->pidl(""); + + my $signature = +"\"$interface->{NAME}(binding, lp_ctx=None, credentials=None) -> Connection to DCE/RPC interface.\\n\" +\"\\n\" +\"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\\n\" +\"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\\n\" +\"credentials should be a credentials.Credentials object.\\n\\n\""; + + my $docstring = $self->DocString($interface, $interface->{NAME}); + + if ($docstring) { + $docstring = "$signature$docstring"; + } else { + $docstring = $signature; + } + + $self->pidl("PyTypeObject $interface->{NAME}_InterfaceType = {"); + $self->indent; + $self->pidl("PyObject_HEAD_INIT(NULL) 0,"); + $self->pidl(".tp_name = \"$basename.$interface->{NAME}\","); + $self->pidl(".tp_basicsize = sizeof($interface->{NAME}_InterfaceObject),"); + $self->pidl(".tp_dealloc = interface_$interface->{NAME}_dealloc,"); + $self->pidl(".tp_methods = interface_$interface->{NAME}_methods,"); + $self->pidl(".tp_doc = $docstring,"); + $self->pidl(".tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,"); + $self->pidl(".tp_new = interface_$interface->{NAME}_new,"); + $self->deindent; + $self->pidl("};"); + + $self->pidl(""); + + $self->register_module_typeobject($interface->{NAME}, "&$interface->{NAME}_InterfaceType"); } $self->pidl_hdr("\n"); @@ -587,6 +661,22 @@ sub register_module_method($$$$$) push (@{$self->{module_methods}}, [$fn_name, $pyfn_name, $flags, $doc]) } +sub register_module_typeobject($$$) +{ + my ($self, $name, $py_name) = @_; + + $self->register_module_object($name, "(PyObject *)$py_name"); + + push (@{$self->{module_types}}, [$name, $py_name]) +} + +sub register_module_object($$$) +{ + my ($self, $name, $py_name) = @_; + + push (@{$self->{module_objects}}, [$name, $py_name]) +} + sub assign($$$) { my ($self, $dest, $src) = @_; @@ -929,7 +1019,20 @@ sub Parse($$$$$) $self->pidl("{"); $self->indent; $self->pidl("PyObject *m;"); - $self->pidl("m = Py_InitModule(\"$basename\", $basename\_methods);"); + $self->pidl(""); + + foreach (@{$self->{module_types}}) { + my ($object_name, $c_name) = @$_; + $self->pidl("if (PyType_Ready($c_name) < 0)"); + $self->pidl("\treturn;"); + } + + $self->pidl(""); + + $self->pidl("m = Py_InitModule3(\"$basename\", $basename\_methods, \"$basename DCE/RPC\");"); + $self->pidl("if (m == NULL)"); + $self->pidl("\treturn;"); + $self->pidl(""); foreach my $name (keys %{$self->{constants}}) { my $py_obj; my ($ctype, $cvar) = @{$self->{constants}->{$name}}; @@ -943,6 +1046,13 @@ sub Parse($$$$$) $self->pidl("PyModule_AddObject(m, \"$name\", $py_obj);"); } + + foreach (@{$self->{module_objects}}) { + my ($object_name, $c_name) = @$_; + $self->pidl("Py_INCREF($c_name);"); + $self->pidl("PyModule_AddObject(m, \"$object_name\", $c_name);"); + } + $self->deindent; $self->pidl("}"); return ($self->{res_hdr}, $self->{res}); diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c index 2ecad20b8e..ba85994636 100644 --- a/source4/scripting/python/modules.c +++ b/source4/scripting/python/modules.c @@ -35,6 +35,8 @@ extern void init_events(void); extern void inituuid(void); extern void init_net(void); extern void initecho(void); +extern void initdfs(void); +extern void initdrsuapi(void); extern void initwinreg(void); extern void initepmapper(void); extern void initinitshutdown(void); @@ -46,6 +48,7 @@ static void initdcerpc_security(void) {} extern void initlsa(void); extern void initsvcctl(void); extern void initwkssvc(void); +extern void initunixinfo(void); extern void init_libcli_nbt(void); extern void init_libcli_smb(void); diff --git a/source4/scripting/python/pyrpc.h b/source4/scripting/python/pyrpc.h index 3a5d235cfc..f4d0f37c39 100644 --- a/source4/scripting/python/pyrpc.h +++ b/source4/scripting/python/pyrpc.h @@ -26,7 +26,7 @@ #define dom_sid2_Type dom_sid_Type #define dom_sid28_Type dom_sid_Type #define dom_sid2_Check dom_sid_Check -#define dom_sid28_Check dom_sid28_Check +#define dom_sid28_Check dom_sid_Check /* This macro is only provided by Python >= 2.3 */ #ifndef PyAPI_DATA diff --git a/source4/scripting/python/samba/tests/dcerpc/unix.py b/source4/scripting/python/samba/tests/dcerpc/unix.py new file mode 100644 index 0000000000..99c84c08da --- /dev/null +++ b/source4/scripting/python/samba/tests/dcerpc/unix.py @@ -0,0 +1,30 @@ +#!/usr/bin/python + +# Unix SMB/CIFS implementation. +# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +import unixinfo +import unittest +from samba.tests import get_loadparm + +class UnixinfoTests(unittest.TestCase): + def setUp(self): + self.conn = unixinfo.unixinfo("ncalrpc:", get_loadparm()) + + def test_getpwuid(self): + (count, infos) = self.conn.GetPWUid(1, [0]) + self.assertEquals(1, len(infos)) diff --git a/source4/selftest/samba4_tests.sh b/source4/selftest/samba4_tests.sh index 64b2c7b564..7e545664d1 100755 --- a/source4/selftest/samba4_tests.sh +++ b/source4/selftest/samba4_tests.sh @@ -338,6 +338,7 @@ plantest "provision.python" none $SUBUNITRUN samba.tests.provision plantest "samba3.python" none $SUBUNITRUN samba.tests.samba3 plantest "samr.python" dc $SUBUNITRUN samba.tests.dcerpc.sam plantest "samdb.python" dc $SUBUNITRUN samba.tests.samdb +plantest "unixinfo.python" dc $SUBUNITRUN samba.tests.dcerpc.unix plantest "events.python" none PYTHONPATH="$PYTHONPATH:lib/events" $SUBUNITRUN tests plantest "samba3sam.python" none PYTHONPATH="$PYTHONPATH:dsdb/samdb/ldb_modules/tests" $SUBUNITRUN samba3sam plantest "rpcecho.python" dc $SUBUNITRUN samba.tests.dcerpc.rpcecho |