diff options
author | Günther Deschner <gd@samba.org> | 2010-04-29 23:34:27 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-05-28 00:22:18 +0200 |
commit | 7803bcdae654f1474c57f0d31ed17f56492441e3 (patch) | |
tree | ffb63c41a9b45b5a01297b990dfc150be23c8d66 /source4/torture/rap | |
parent | 82982bd48086712d5efd2e9be79c16a4338605f7 (diff) | |
download | samba-7803bcdae654f1474c57f0d31ed17f56492441e3.tar.gz samba-7803bcdae654f1474c57f0d31ed17f56492441e3.tar.bz2 samba-7803bcdae654f1474c57f0d31ed17f56492441e3.zip |
s4-smbtorture: remove obsolete handmarshalled rap code.
Guenther
Diffstat (limited to 'source4/torture/rap')
-rw-r--r-- | source4/torture/rap/rap.c | 281 |
1 files changed, 0 insertions, 281 deletions
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c index d263f80660..33d67156a3 100644 --- a/source4/torture/rap/rap.c +++ b/source4/torture/rap/rap.c @@ -564,153 +564,6 @@ NTSTATUS smbcli_rap_netservergetinfo(struct smbcli_tree *tree, return result; } -static NTSTATUS rap_pull_rap_JobInfo0(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintJobInfo0 *r) -{ - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobID)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_JobInfo1(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintJobInfo1 *r) -{ - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobID)); - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->UserName, 21, sizeof(uint8_t), CH_DOS)); - NDR_RETURN(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Pad)); - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->NotifyName, 16, sizeof(uint8_t), CH_DOS)); - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->DataType, 10, sizeof(uint8_t), CH_DOS)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintParameterString)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobPosition)); - NDR_RETURN(ndr_pull_rap_PrintJStatusCode(ndr, NDR_SCALARS, &r->JobStatus)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->JobStatusString)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeSubmitted)); - NDR_RETURN(ndr_pull_uint32(ndr, NDR_SCALARS, &r->JobSize)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->JobCommentString)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_JobInfo2(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintJobInfo2 *r) -{ - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobID)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Priority)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->UserName)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobPosition)); - NDR_RETURN(ndr_pull_rap_PrintJStatusCode(ndr, NDR_SCALARS, &r->JobStatus)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeSubmitted)); - NDR_RETURN(ndr_pull_uint32(ndr, NDR_SCALARS, &r->JobSize)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->JobCommentString)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->DocumentName)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_JobInfo3(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintJobInfo3 *r) -{ - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobID)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Priority)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->UserName)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobPosition)); - NDR_RETURN(ndr_pull_rap_PrintJStatusCode(ndr, NDR_SCALARS, &r->JobStatus)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeSubmitted)); - NDR_RETURN(ndr_pull_uint32(ndr, NDR_SCALARS, &r->JobSize)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->JobCommentString)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->DocumentName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->NotifyName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->DataType)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintParameterString)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->StatusString)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->QueueName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintProcessorName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintProcessorParams)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->DriverName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->DriverDataOffset)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrinterNameOffset)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_PrintQueue0(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintQueue0 *r) -{ - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintQName, 13, sizeof(uint8_t), CH_DOS)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_PrintQueue1(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintQueue1 *r) -{ - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintQName, 13, sizeof(uint8_t), CH_DOS)); - NDR_RETURN(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Pad1)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Priority)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->StartTime)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UntilTime)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->SeparatorPageFilename)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintProcessorDllName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintDestinationsName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintParameterString)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->CommentString)); - NDR_RETURN(ndr_pull_rap_PrintQStatusCode(ndr, NDR_SCALARS, &r->PrintQStatus)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintJobCount)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_PrintQueue2(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintQueue2 *r) -{ - int i; - RAP_RETURN(rap_pull_rap_PrintQueue1(mem_ctx, ndr, convert, &r->queue)); - r->job = talloc_zero_array(mem_ctx, struct rap_PrintJobInfo1, r->queue.PrintJobCount); - if (r->job == NULL) { - return NT_STATUS_NO_MEMORY; - } - for (i=0; i < r->queue.PrintJobCount; i++) { - RAP_RETURN(rap_pull_rap_JobInfo1(mem_ctx, ndr, convert, &r->job[i])); - } - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_PrintQueue3(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintQueue3 *r) -{ - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintQueueName)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Priority)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->StartTime)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UntilTime)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Pad)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->SeparatorPageFilename)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintProcessorDllName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintParameterString)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->CommentString)); - NDR_RETURN(ndr_pull_rap_PrintQStatusCode(ndr, NDR_SCALARS, &r->PrintQStatus)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintJobCount)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->Printers)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->DriverName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintDriverData)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_PrintQueue4(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintQueue4 *r) -{ - int i; - RAP_RETURN(rap_pull_rap_PrintQueue3(mem_ctx, ndr, convert, &r->queue)); - r->job = talloc_zero_array(mem_ctx, struct rap_PrintJobInfo2, r->queue.PrintJobCount); - if (r->job == NULL) { - return NT_STATUS_NO_MEMORY; - } - for (i=0; i < r->queue.PrintJobCount; i++) { - RAP_RETURN(rap_pull_rap_JobInfo2(mem_ctx, ndr, convert, &r->job[i])); - } - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_PrintQueue5(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintQueue5 *r) -{ - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrintQueueName)); - - return NT_STATUS_OK; -} - static enum ndr_err_code ndr_pull_rap_NetPrintQEnum_data(struct ndr_pull *ndr, struct rap_NetPrintQEnum *r) { uint32_t cntr_info_0; @@ -1326,49 +1179,6 @@ NTSTATUS smbcli_rap_netprintjobsetinfo(struct smbcli_tree *tree, return result; } -static NTSTATUS rap_pull_rap_PrintDest0(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintDest0 *r) -{ - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintDestName, 9, sizeof(uint8_t), CH_DOS)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_PrintDest1(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintDest1 *r) -{ - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintDestName, 9, sizeof(uint8_t), CH_DOS)); - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->UserName, 21, sizeof(uint8_t), CH_DOS)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobId)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Status)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->StatusStringName)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Time)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_PrintDest2(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintDest2 *r) -{ - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrinterName)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_PrintDest3(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_PrintDest3 *r) -{ - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->PrinterName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->UserName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->LogAddr)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobId)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Status)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->StatusStringName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->Comment)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->Drivers)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Time)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Pad1)); - - return NT_STATUS_OK; - -} - static enum ndr_err_code ndr_pull_rap_NetPrintDestEnum_data(struct ndr_pull *ndr, struct rap_NetPrintDestEnum *r) { uint32_t cntr_info_0; @@ -1624,97 +1434,6 @@ NTSTATUS smbcli_rap_netoemchangepassword(struct smbcli_tree *tree, return result; } -static NTSTATUS rap_pull_rap_NetUserInfo0(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_NetUserInfo0 *r) -{ - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->Name, 21, sizeof(uint8_t), CH_DOS)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_NetUserInfo1(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_NetUserInfo1 *r) -{ - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->Name, 21, sizeof(uint8_t), CH_DOS)); - NDR_RETURN(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Pad)); - NDR_RETURN(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Password, 16)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->PasswordAge)); - NDR_RETURN(ndr_pull_rap_UserPriv(ndr, NDR_SCALARS, &r->Priv)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->HomeDir)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->Comment)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Flags)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->ScriptPath)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_NetUserInfo2(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_NetUserInfo2 *r) -{ - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->Name, 21, sizeof(uint8_t), CH_DOS)); - NDR_RETURN(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Pad)); - NDR_RETURN(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Password, 16)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->PasswordAge)); - NDR_RETURN(ndr_pull_rap_UserPriv(ndr, NDR_SCALARS, &r->Priv)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->HomeDir)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->Comment)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Flags)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->ScriptPath)); - NDR_RETURN(ndr_pull_rap_AuthFlags(ndr, NDR_SCALARS, &r->AuthFlags)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->FullName)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->UsrComment)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->pParms)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->WorkStations)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->LastLogon)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->LastLogOff)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->AcctExpires)); - NDR_RETURN(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MaxStorage)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UnitsPerWeek)); - /* NDR_RETURN(ndr_pull_rap_LogonHours(ndr, NDR_SCALARS, r->LogonHours)); */ - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->BadPwCount)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->NumLogons)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->LogonServer)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->CountryCode)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->CodePage)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_NetUserInfo10(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_NetUserInfo10 *r) -{ - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->Name, 21, sizeof(uint8_t), CH_DOS)); - NDR_RETURN(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Pad)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->Comment)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->UsrComment)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->FullName)); - - return NT_STATUS_OK; -} - -static NTSTATUS rap_pull_rap_NetUserInfo11(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, uint16_t convert, struct rap_NetUserInfo11 *r) -{ - NDR_RETURN(ndr_pull_charset(ndr, NDR_SCALARS, &r->Name, 21, sizeof(uint8_t), CH_DOS)); - NDR_RETURN(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Pad)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->Comment)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->UsrComment)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->FullName)); - NDR_RETURN(ndr_pull_rap_UserPriv(ndr, NDR_SCALARS, &r->Priv)); - NDR_RETURN(ndr_pull_rap_AuthFlags(ndr, NDR_SCALARS, &r->AuthFlags)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->PasswordAge)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->HomeDir)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->Parms)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->LastLogon)); - NDR_RETURN(ndr_pull_time_t(ndr, NDR_SCALARS, &r->LastLogOff)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->BadPWCount)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->NumLogons)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->LogonServer)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->CountryCode)); - RAP_RETURN(rap_pull_string(mem_ctx, ndr, convert, &r->WorkStations)); - NDR_RETURN(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MaxStorage)); - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UnitsPerWeek)); - /* NDR_RETURN(ndr_pull_rap_LogonHours(ndr, NDR_SCALARS, r->LogonHours)); */ - NDR_RETURN(ndr_pull_uint16(ndr, NDR_SCALARS, &r->CodePage)); - - return NT_STATUS_OK; -} - NTSTATUS smbcli_rap_netusergetinfo(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, struct rap_NetUserGetInfo *r) |