12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824 |
- From 39a3fa39967faaf216be8e108ca57d07de1aa95a Mon Sep 17 00:00:00 2001
- From: Vadim Zhukov <persgray@gmail.com>
- Date: Sat, 25 May 2013 15:19:24 +0100
- Subject: [PATCH 01/41] pidl: Recent Perl warns about "defined(@var)"
- constructs.
- Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
- Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
- Autobuild-Date(master): Sat May 25 18:10:53 CEST 2013 on sn-devel-104
- (cherry picked from commit 92254d09e0ee5a7d9d0cd91fe1803f54e64d9a5f)
- ---
- pidl/lib/Parse/Pidl/ODL.pm | 2 +-
- pidl/pidl | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
- --- a/pidl/lib/Parse/Pidl/ODL.pm
- +++ b/pidl/lib/Parse/Pidl/ODL.pm
- @@ -70,7 +70,7 @@ sub ODL2IDL
- next;
- }
- my $podl = Parse::Pidl::IDL::parse_file($idl_path, $opt_incdirs);
- - if (defined(@$podl)) {
- + if (defined($podl)) {
- require Parse::Pidl::Typelist;
- my $basename = basename($idl_path, ".idl");
-
- --- a/pidl/pidl
- +++ b/pidl/pidl
- @@ -605,7 +605,7 @@ sub process_file($)
- require Parse::Pidl::IDL;
-
- $pidl = Parse::Pidl::IDL::parse_file($idl_file, \@opt_incdirs);
- - defined @$pidl || die "Failed to parse $idl_file";
- + defined $pidl || die "Failed to parse $idl_file";
- }
-
- require Parse::Pidl::Typelist;
- --- a/source4/heimdal/cf/make-proto.pl
- +++ b/source4/heimdal/cf/make-proto.pl
- @@ -1,8 +1,8 @@
- # Make prototypes from .c files
- # $Id$
-
- -##use Getopt::Std;
- -require 'getopts.pl';
- +use Getopt::Std;
- +#require 'getopts.pl';
-
- my $comment = 0;
- my $if_0 = 0;
- @@ -12,7 +12,7 @@ my $debug = 0;
- my $oproto = 1;
- my $private_func_re = "^_";
-
- -Getopts('x:m:o:p:dqE:R:P:') || die "foo";
- +getopts('x:m:o:p:dqE:R:P:') || die "foo";
-
- if($opt_d) {
- $debug = 1;
- --- a/source3/Makefile-smbtorture4
- +++ b/source3/Makefile-smbtorture4
- @@ -6,7 +6,7 @@ SAMBA4_BINARIES="smbtorture,ndrdump"
- samba4-configure:
- @(cd .. && \
- CFLAGS='' $(WAF) reconfigure || \
- - CFLAGS='' $(WAF) configure --enable-socket-wrapper --enable-nss-wrapper --enable-uid-wrapper --nonshared-binary=$(SAMBA4_BINARIES) --enable-auto-reconfigure )
- + CFLAGS='' $(WAF) configure --enable-socket-wrapper --enable-nss-wrapper --enable-uid-wrapper --nonshared-binary=$(SAMBA4_BINARIES) --enable-auto-reconfigure --bundled-libraries=ALL --disable-gnutls )
-
- .PHONY: samba4-configure
-
- --- a/source4/lib/ldb/wscript
- +++ b/source4/lib/ldb/wscript
- @@ -135,9 +135,7 @@ def build(bld):
- pc_files=ldb_pc_files,
- vnum=VERSION,
- private_library=private_library,
- - manpages='man/ldb.3',
- - abi_directory = 'ABI',
- - abi_match = abi_match)
- + manpages='man/ldb.3')
-
- # generate a include/ldb_version.h
- t = bld.SAMBA_GENERATOR('ldb_version.h',
- --- a/source3/selftest/skip
- +++ b/source3/selftest/skip
- @@ -22,3 +22,8 @@ samba3.*raw.ioctl
- samba3.*raw.qfileinfo
- samba3.*raw.qfsinfo
- samba3.*raw.sfileinfo.base
- +# skip, don't work for badlock backports
- +samba3.posix_s3.raw.eas
- +samba3.posix_s3.raw.rename
- +samba3.posix_s3.raw.search
- +samba3.posix_s3.raw.streams
- --- a/librpc/ndr/ndr_ntlmssp.c
- +++ b/librpc/ndr/ndr_ntlmssp.c
- @@ -176,4 +176,20 @@ _PUBLIC_ void ndr_print_ntlmssp_Version(
- }
- }
-
- +_PUBLIC_ struct AV_PAIR *ndr_ntlmssp_find_av(const struct AV_PAIR_LIST *av_list,
- + enum ntlmssp_AvId AvId)
- +{
- + struct AV_PAIR *res = NULL;
- + uint32_t i = 0;
-
- + for (i = 0; i < av_list->count; i++) {
- + if (av_list->pair[i].AvId != AvId) {
- + continue;
- + }
- +
- + res = discard_const_p(struct AV_PAIR, &av_list->pair[i]);
- + break;
- + }
- +
- + return res;
- +}
- --- a/librpc/ndr/ndr_ntlmssp.h
- +++ b/librpc/ndr/ndr_ntlmssp.h
- @@ -31,3 +31,5 @@ _PUBLIC_ void ndr_print_ntlmssp_lm_respo
- bool ntlmv2);
- _PUBLIC_ void ndr_print_ntlmssp_Version(struct ndr_print *ndr, const char *name, const union ntlmssp_Version *r);
-
- +_PUBLIC_ struct AV_PAIR *ndr_ntlmssp_find_av(const struct AV_PAIR_LIST *av_list,
- + enum ntlmssp_AvId AvId);
- --- /dev/null
- +++ b/librpc/ABI/ndr-0.0.2.sigs
- @@ -0,0 +1,247 @@
- +GUID_all_zero: bool (const struct GUID *)
- +GUID_compare: int (const struct GUID *, const struct GUID *)
- +GUID_equal: bool (const struct GUID *, const struct GUID *)
- +GUID_from_data_blob: NTSTATUS (const DATA_BLOB *, struct GUID *)
- +GUID_from_ndr_blob: NTSTATUS (const DATA_BLOB *, struct GUID *)
- +GUID_from_string: NTSTATUS (const char *, struct GUID *)
- +GUID_hexstring: char *(TALLOC_CTX *, const struct GUID *)
- +GUID_random: struct GUID (void)
- +GUID_string: char *(TALLOC_CTX *, const struct GUID *)
- +GUID_string2: char *(TALLOC_CTX *, const struct GUID *)
- +GUID_to_ndr_blob: NTSTATUS (const struct GUID *, TALLOC_CTX *, DATA_BLOB *)
- +GUID_zero: struct GUID (void)
- +ndr_align_size: size_t (uint32_t, size_t)
- +ndr_charset_length: uint32_t (const void *, charset_t)
- +ndr_check_array_length: enum ndr_err_code (struct ndr_pull *, void *, uint32_t)
- +ndr_check_array_size: enum ndr_err_code (struct ndr_pull *, void *, uint32_t)
- +ndr_check_padding: void (struct ndr_pull *, size_t)
- +ndr_check_pipe_chunk_trailer: enum ndr_err_code (struct ndr_pull *, int, uint32_t)
- +ndr_check_string_terminator: enum ndr_err_code (struct ndr_pull *, uint32_t, uint32_t)
- +ndr_get_array_length: uint32_t (struct ndr_pull *, const void *)
- +ndr_get_array_size: uint32_t (struct ndr_pull *, const void *)
- +ndr_map_error2errno: int (enum ndr_err_code)
- +ndr_map_error2ntstatus: NTSTATUS (enum ndr_err_code)
- +ndr_map_error2string: const char *(enum ndr_err_code)
- +ndr_policy_handle_empty: bool (const struct policy_handle *)
- +ndr_policy_handle_equal: bool (const struct policy_handle *, const struct policy_handle *)
- +ndr_print_DATA_BLOB: void (struct ndr_print *, const char *, DATA_BLOB)
- +ndr_print_GUID: void (struct ndr_print *, const char *, const struct GUID *)
- +ndr_print_KRB5_EDATA_NTSTATUS: void (struct ndr_print *, const char *, const struct KRB5_EDATA_NTSTATUS *)
- +ndr_print_NTSTATUS: void (struct ndr_print *, const char *, NTSTATUS)
- +ndr_print_NTTIME: void (struct ndr_print *, const char *, NTTIME)
- +ndr_print_NTTIME_1sec: void (struct ndr_print *, const char *, NTTIME)
- +ndr_print_NTTIME_hyper: void (struct ndr_print *, const char *, NTTIME)
- +ndr_print_WERROR: void (struct ndr_print *, const char *, WERROR)
- +ndr_print_array_uint8: void (struct ndr_print *, const char *, const uint8_t *, uint32_t)
- +ndr_print_bad_level: void (struct ndr_print *, const char *, uint16_t)
- +ndr_print_bitmap_flag: void (struct ndr_print *, size_t, const char *, uint32_t, uint32_t)
- +ndr_print_bool: void (struct ndr_print *, const char *, const bool)
- +ndr_print_debug: void (ndr_print_fn_t, const char *, void *)
- +ndr_print_debug_helper: void (struct ndr_print *, const char *, ...)
- +ndr_print_debugc: void (int, ndr_print_fn_t, const char *, void *)
- +ndr_print_debugc_helper: void (struct ndr_print *, const char *, ...)
- +ndr_print_dlong: void (struct ndr_print *, const char *, int64_t)
- +ndr_print_double: void (struct ndr_print *, const char *, double)
- +ndr_print_enum: void (struct ndr_print *, const char *, const char *, const char *, uint32_t)
- +ndr_print_function_debug: void (ndr_print_function_t, const char *, int, void *)
- +ndr_print_function_string: char *(TALLOC_CTX *, ndr_print_function_t, const char *, int, void *)
- +ndr_print_get_switch_value: uint32_t (struct ndr_print *, const void *)
- +ndr_print_gid_t: void (struct ndr_print *, const char *, gid_t)
- +ndr_print_hyper: void (struct ndr_print *, const char *, uint64_t)
- +ndr_print_int16: void (struct ndr_print *, const char *, int16_t)
- +ndr_print_int32: void (struct ndr_print *, const char *, int32_t)
- +ndr_print_int3264: void (struct ndr_print *, const char *, int32_t)
- +ndr_print_int8: void (struct ndr_print *, const char *, int8_t)
- +ndr_print_ipv4address: void (struct ndr_print *, const char *, const char *)
- +ndr_print_ipv6address: void (struct ndr_print *, const char *, const char *)
- +ndr_print_ndr_syntax_id: void (struct ndr_print *, const char *, const struct ndr_syntax_id *)
- +ndr_print_netr_SamDatabaseID: void (struct ndr_print *, const char *, enum netr_SamDatabaseID)
- +ndr_print_netr_SchannelType: void (struct ndr_print *, const char *, enum netr_SchannelType)
- +ndr_print_null: void (struct ndr_print *)
- +ndr_print_pointer: void (struct ndr_print *, const char *, void *)
- +ndr_print_policy_handle: void (struct ndr_print *, const char *, const struct policy_handle *)
- +ndr_print_printf_helper: void (struct ndr_print *, const char *, ...)
- +ndr_print_ptr: void (struct ndr_print *, const char *, const void *)
- +ndr_print_set_switch_value: enum ndr_err_code (struct ndr_print *, const void *, uint32_t)
- +ndr_print_sockaddr_storage: void (struct ndr_print *, const char *, const struct sockaddr_storage *)
- +ndr_print_string: void (struct ndr_print *, const char *, const char *)
- +ndr_print_string_array: void (struct ndr_print *, const char *, const char **)
- +ndr_print_string_helper: void (struct ndr_print *, const char *, ...)
- +ndr_print_struct: void (struct ndr_print *, const char *, const char *)
- +ndr_print_struct_string: char *(TALLOC_CTX *, ndr_print_fn_t, const char *, void *)
- +ndr_print_svcctl_ServerType: void (struct ndr_print *, const char *, uint32_t)
- +ndr_print_time_t: void (struct ndr_print *, const char *, time_t)
- +ndr_print_timespec: void (struct ndr_print *, const char *, const struct timespec *)
- +ndr_print_timeval: void (struct ndr_print *, const char *, const struct timeval *)
- +ndr_print_udlong: void (struct ndr_print *, const char *, uint64_t)
- +ndr_print_udlongr: void (struct ndr_print *, const char *, uint64_t)
- +ndr_print_uid_t: void (struct ndr_print *, const char *, uid_t)
- +ndr_print_uint16: void (struct ndr_print *, const char *, uint16_t)
- +ndr_print_uint32: void (struct ndr_print *, const char *, uint32_t)
- +ndr_print_uint3264: void (struct ndr_print *, const char *, uint32_t)
- +ndr_print_uint8: void (struct ndr_print *, const char *, uint8_t)
- +ndr_print_union: void (struct ndr_print *, const char *, int, const char *)
- +ndr_print_union_debug: void (ndr_print_fn_t, const char *, uint32_t, void *)
- +ndr_print_union_string: char *(TALLOC_CTX *, ndr_print_fn_t, const char *, uint32_t, void *)
- +ndr_print_winreg_Data: void (struct ndr_print *, const char *, const union winreg_Data *)
- +ndr_print_winreg_Type: void (struct ndr_print *, const char *, enum winreg_Type)
- +ndr_pull_DATA_BLOB: enum ndr_err_code (struct ndr_pull *, int, DATA_BLOB *)
- +ndr_pull_GUID: enum ndr_err_code (struct ndr_pull *, int, struct GUID *)
- +ndr_pull_KRB5_EDATA_NTSTATUS: enum ndr_err_code (struct ndr_pull *, int, struct KRB5_EDATA_NTSTATUS *)
- +ndr_pull_NTSTATUS: enum ndr_err_code (struct ndr_pull *, int, NTSTATUS *)
- +ndr_pull_NTTIME: enum ndr_err_code (struct ndr_pull *, int, NTTIME *)
- +ndr_pull_NTTIME_1sec: enum ndr_err_code (struct ndr_pull *, int, NTTIME *)
- +ndr_pull_NTTIME_hyper: enum ndr_err_code (struct ndr_pull *, int, NTTIME *)
- +ndr_pull_WERROR: enum ndr_err_code (struct ndr_pull *, int, WERROR *)
- +ndr_pull_advance: enum ndr_err_code (struct ndr_pull *, uint32_t)
- +ndr_pull_align: enum ndr_err_code (struct ndr_pull *, size_t)
- +ndr_pull_array_length: enum ndr_err_code (struct ndr_pull *, const void *)
- +ndr_pull_array_size: enum ndr_err_code (struct ndr_pull *, const void *)
- +ndr_pull_array_uint8: enum ndr_err_code (struct ndr_pull *, int, uint8_t *, uint32_t)
- +ndr_pull_bytes: enum ndr_err_code (struct ndr_pull *, uint8_t *, uint32_t)
- +ndr_pull_charset: enum ndr_err_code (struct ndr_pull *, int, const char **, uint32_t, uint8_t, charset_t)
- +ndr_pull_charset_to_null: enum ndr_err_code (struct ndr_pull *, int, const char **, uint32_t, uint8_t, charset_t)
- +ndr_pull_dlong: enum ndr_err_code (struct ndr_pull *, int, int64_t *)
- +ndr_pull_double: enum ndr_err_code (struct ndr_pull *, int, double *)
- +ndr_pull_enum_uint16: enum ndr_err_code (struct ndr_pull *, int, uint16_t *)
- +ndr_pull_enum_uint1632: enum ndr_err_code (struct ndr_pull *, int, uint16_t *)
- +ndr_pull_enum_uint32: enum ndr_err_code (struct ndr_pull *, int, uint32_t *)
- +ndr_pull_enum_uint8: enum ndr_err_code (struct ndr_pull *, int, uint8_t *)
- +ndr_pull_error: enum ndr_err_code (struct ndr_pull *, enum ndr_err_code, const char *, ...)
- +ndr_pull_generic_ptr: enum ndr_err_code (struct ndr_pull *, uint32_t *)
- +ndr_pull_get_relative_base_offset: uint32_t (struct ndr_pull *)
- +ndr_pull_get_switch_value: uint32_t (struct ndr_pull *, const void *)
- +ndr_pull_gid_t: enum ndr_err_code (struct ndr_pull *, int, gid_t *)
- +ndr_pull_hyper: enum ndr_err_code (struct ndr_pull *, int, uint64_t *)
- +ndr_pull_init_blob: struct ndr_pull *(const DATA_BLOB *, TALLOC_CTX *)
- +ndr_pull_int16: enum ndr_err_code (struct ndr_pull *, int, int16_t *)
- +ndr_pull_int32: enum ndr_err_code (struct ndr_pull *, int, int32_t *)
- +ndr_pull_int8: enum ndr_err_code (struct ndr_pull *, int, int8_t *)
- +ndr_pull_ipv4address: enum ndr_err_code (struct ndr_pull *, int, const char **)
- +ndr_pull_ipv6address: enum ndr_err_code (struct ndr_pull *, int, const char **)
- +ndr_pull_ndr_syntax_id: enum ndr_err_code (struct ndr_pull *, int, struct ndr_syntax_id *)
- +ndr_pull_netr_SamDatabaseID: enum ndr_err_code (struct ndr_pull *, int, enum netr_SamDatabaseID *)
- +ndr_pull_netr_SchannelType: enum ndr_err_code (struct ndr_pull *, int, enum netr_SchannelType *)
- +ndr_pull_pointer: enum ndr_err_code (struct ndr_pull *, int, void **)
- +ndr_pull_policy_handle: enum ndr_err_code (struct ndr_pull *, int, struct policy_handle *)
- +ndr_pull_ref_ptr: enum ndr_err_code (struct ndr_pull *, uint32_t *)
- +ndr_pull_relative_ptr1: enum ndr_err_code (struct ndr_pull *, const void *, uint32_t)
- +ndr_pull_relative_ptr2: enum ndr_err_code (struct ndr_pull *, const void *)
- +ndr_pull_relative_ptr_short: enum ndr_err_code (struct ndr_pull *, uint16_t *)
- +ndr_pull_restore_relative_base_offset: void (struct ndr_pull *, uint32_t)
- +ndr_pull_set_switch_value: enum ndr_err_code (struct ndr_pull *, const void *, uint32_t)
- +ndr_pull_setup_relative_base_offset1: enum ndr_err_code (struct ndr_pull *, const void *, uint32_t)
- +ndr_pull_setup_relative_base_offset2: enum ndr_err_code (struct ndr_pull *, const void *)
- +ndr_pull_string: enum ndr_err_code (struct ndr_pull *, int, const char **)
- +ndr_pull_string_array: enum ndr_err_code (struct ndr_pull *, int, const char ***)
- +ndr_pull_struct_blob: enum ndr_err_code (const DATA_BLOB *, TALLOC_CTX *, void *, ndr_pull_flags_fn_t)
- +ndr_pull_struct_blob_all: enum ndr_err_code (const DATA_BLOB *, TALLOC_CTX *, void *, ndr_pull_flags_fn_t)
- +ndr_pull_subcontext_end: enum ndr_err_code (struct ndr_pull *, struct ndr_pull *, size_t, ssize_t)
- +ndr_pull_subcontext_start: enum ndr_err_code (struct ndr_pull *, struct ndr_pull **, size_t, ssize_t)
- +ndr_pull_svcctl_ServerType: enum ndr_err_code (struct ndr_pull *, int, uint32_t *)
- +ndr_pull_time_t: enum ndr_err_code (struct ndr_pull *, int, time_t *)
- +ndr_pull_timespec: enum ndr_err_code (struct ndr_pull *, int, struct timespec *)
- +ndr_pull_timeval: enum ndr_err_code (struct ndr_pull *, int, struct timeval *)
- +ndr_pull_trailer_align: enum ndr_err_code (struct ndr_pull *, size_t)
- +ndr_pull_udlong: enum ndr_err_code (struct ndr_pull *, int, uint64_t *)
- +ndr_pull_udlongr: enum ndr_err_code (struct ndr_pull *, int, uint64_t *)
- +ndr_pull_uid_t: enum ndr_err_code (struct ndr_pull *, int, uid_t *)
- +ndr_pull_uint16: enum ndr_err_code (struct ndr_pull *, int, uint16_t *)
- +ndr_pull_uint1632: enum ndr_err_code (struct ndr_pull *, int, uint16_t *)
- +ndr_pull_uint32: enum ndr_err_code (struct ndr_pull *, int, uint32_t *)
- +ndr_pull_uint3264: enum ndr_err_code (struct ndr_pull *, int, uint32_t *)
- +ndr_pull_uint8: enum ndr_err_code (struct ndr_pull *, int, uint8_t *)
- +ndr_pull_union_align: enum ndr_err_code (struct ndr_pull *, size_t)
- +ndr_pull_union_blob: enum ndr_err_code (const DATA_BLOB *, TALLOC_CTX *, void *, uint32_t, ndr_pull_flags_fn_t)
- +ndr_pull_union_blob_all: enum ndr_err_code (const DATA_BLOB *, TALLOC_CTX *, void *, uint32_t, ndr_pull_flags_fn_t)
- +ndr_pull_winreg_Data: enum ndr_err_code (struct ndr_pull *, int, union winreg_Data *)
- +ndr_pull_winreg_Type: enum ndr_err_code (struct ndr_pull *, int, enum winreg_Type *)
- +ndr_push_DATA_BLOB: enum ndr_err_code (struct ndr_push *, int, DATA_BLOB)
- +ndr_push_GUID: enum ndr_err_code (struct ndr_push *, int, const struct GUID *)
- +ndr_push_KRB5_EDATA_NTSTATUS: enum ndr_err_code (struct ndr_push *, int, const struct KRB5_EDATA_NTSTATUS *)
- +ndr_push_NTSTATUS: enum ndr_err_code (struct ndr_push *, int, NTSTATUS)
- +ndr_push_NTTIME: enum ndr_err_code (struct ndr_push *, int, NTTIME)
- +ndr_push_NTTIME_1sec: enum ndr_err_code (struct ndr_push *, int, NTTIME)
- +ndr_push_NTTIME_hyper: enum ndr_err_code (struct ndr_push *, int, NTTIME)
- +ndr_push_WERROR: enum ndr_err_code (struct ndr_push *, int, WERROR)
- +ndr_push_align: enum ndr_err_code (struct ndr_push *, size_t)
- +ndr_push_array_uint8: enum ndr_err_code (struct ndr_push *, int, const uint8_t *, uint32_t)
- +ndr_push_blob: DATA_BLOB (struct ndr_push *)
- +ndr_push_bytes: enum ndr_err_code (struct ndr_push *, const uint8_t *, uint32_t)
- +ndr_push_charset: enum ndr_err_code (struct ndr_push *, int, const char *, uint32_t, uint8_t, charset_t)
- +ndr_push_dlong: enum ndr_err_code (struct ndr_push *, int, int64_t)
- +ndr_push_double: enum ndr_err_code (struct ndr_push *, int, double)
- +ndr_push_enum_uint16: enum ndr_err_code (struct ndr_push *, int, uint16_t)
- +ndr_push_enum_uint1632: enum ndr_err_code (struct ndr_push *, int, uint16_t)
- +ndr_push_enum_uint32: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_enum_uint8: enum ndr_err_code (struct ndr_push *, int, uint8_t)
- +ndr_push_error: enum ndr_err_code (struct ndr_push *, enum ndr_err_code, const char *, ...)
- +ndr_push_expand: enum ndr_err_code (struct ndr_push *, uint32_t)
- +ndr_push_full_ptr: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_get_relative_base_offset: uint32_t (struct ndr_push *)
- +ndr_push_get_switch_value: uint32_t (struct ndr_push *, const void *)
- +ndr_push_gid_t: enum ndr_err_code (struct ndr_push *, int, gid_t)
- +ndr_push_hyper: enum ndr_err_code (struct ndr_push *, int, uint64_t)
- +ndr_push_init_ctx: struct ndr_push *(TALLOC_CTX *)
- +ndr_push_int16: enum ndr_err_code (struct ndr_push *, int, int16_t)
- +ndr_push_int32: enum ndr_err_code (struct ndr_push *, int, int32_t)
- +ndr_push_int8: enum ndr_err_code (struct ndr_push *, int, int8_t)
- +ndr_push_ipv4address: enum ndr_err_code (struct ndr_push *, int, const char *)
- +ndr_push_ipv6address: enum ndr_err_code (struct ndr_push *, int, const char *)
- +ndr_push_ndr_syntax_id: enum ndr_err_code (struct ndr_push *, int, const struct ndr_syntax_id *)
- +ndr_push_netr_SamDatabaseID: enum ndr_err_code (struct ndr_push *, int, enum netr_SamDatabaseID)
- +ndr_push_netr_SchannelType: enum ndr_err_code (struct ndr_push *, int, enum netr_SchannelType)
- +ndr_push_pipe_chunk_trailer: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_pointer: enum ndr_err_code (struct ndr_push *, int, void *)
- +ndr_push_policy_handle: enum ndr_err_code (struct ndr_push *, int, const struct policy_handle *)
- +ndr_push_ref_ptr: enum ndr_err_code (struct ndr_push *)
- +ndr_push_relative_ptr1: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_relative_ptr2_end: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_relative_ptr2_start: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_restore_relative_base_offset: void (struct ndr_push *, uint32_t)
- +ndr_push_set_switch_value: enum ndr_err_code (struct ndr_push *, const void *, uint32_t)
- +ndr_push_setup_relative_base_offset1: enum ndr_err_code (struct ndr_push *, const void *, uint32_t)
- +ndr_push_setup_relative_base_offset2: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_short_relative_ptr1: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_short_relative_ptr2: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_string: enum ndr_err_code (struct ndr_push *, int, const char *)
- +ndr_push_string_array: enum ndr_err_code (struct ndr_push *, int, const char **)
- +ndr_push_struct_blob: enum ndr_err_code (DATA_BLOB *, TALLOC_CTX *, const void *, ndr_push_flags_fn_t)
- +ndr_push_subcontext_end: enum ndr_err_code (struct ndr_push *, struct ndr_push *, size_t, ssize_t)
- +ndr_push_subcontext_start: enum ndr_err_code (struct ndr_push *, struct ndr_push **, size_t, ssize_t)
- +ndr_push_svcctl_ServerType: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_time_t: enum ndr_err_code (struct ndr_push *, int, time_t)
- +ndr_push_timespec: enum ndr_err_code (struct ndr_push *, int, const struct timespec *)
- +ndr_push_timeval: enum ndr_err_code (struct ndr_push *, int, const struct timeval *)
- +ndr_push_trailer_align: enum ndr_err_code (struct ndr_push *, size_t)
- +ndr_push_udlong: enum ndr_err_code (struct ndr_push *, int, uint64_t)
- +ndr_push_udlongr: enum ndr_err_code (struct ndr_push *, int, uint64_t)
- +ndr_push_uid_t: enum ndr_err_code (struct ndr_push *, int, uid_t)
- +ndr_push_uint16: enum ndr_err_code (struct ndr_push *, int, uint16_t)
- +ndr_push_uint1632: enum ndr_err_code (struct ndr_push *, int, uint16_t)
- +ndr_push_uint32: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_uint3264: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_uint8: enum ndr_err_code (struct ndr_push *, int, uint8_t)
- +ndr_push_union_align: enum ndr_err_code (struct ndr_push *, size_t)
- +ndr_push_union_blob: enum ndr_err_code (DATA_BLOB *, TALLOC_CTX *, void *, uint32_t, ndr_push_flags_fn_t)
- +ndr_push_unique_ptr: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_winreg_Data: enum ndr_err_code (struct ndr_push *, int, const union winreg_Data *)
- +ndr_push_winreg_Type: enum ndr_err_code (struct ndr_push *, int, enum winreg_Type)
- +ndr_push_zero: enum ndr_err_code (struct ndr_push *, uint32_t)
- +ndr_set_flags: void (uint32_t *, uint32_t)
- +ndr_size_DATA_BLOB: uint32_t (int, const DATA_BLOB *, int)
- +ndr_size_GUID: size_t (const struct GUID *, int)
- +ndr_size_string: uint32_t (int, const char * const *, int)
- +ndr_size_string_array: size_t (const char **, uint32_t, int)
- +ndr_size_struct: size_t (const void *, int, ndr_push_flags_fn_t)
- +ndr_size_union: size_t (const void *, int, uint32_t, ndr_push_flags_fn_t)
- +ndr_string_array_size: size_t (struct ndr_push *, const char *)
- +ndr_string_length: uint32_t (const void *, uint32_t)
- +ndr_syntax_id_equal: bool (const struct ndr_syntax_id *, const struct ndr_syntax_id *)
- +ndr_syntax_id_null: uuid = {time_low = 0, time_mid = 0, time_hi_and_version = 0, clock_seq = "\000", node = "\000\000\000\000\000"}, if_version = 0
- +ndr_token_peek: uint32_t (struct ndr_token_list **, const void *)
- +ndr_token_retrieve: enum ndr_err_code (struct ndr_token_list **, const void *, uint32_t *)
- +ndr_token_retrieve_cmp_fn: enum ndr_err_code (struct ndr_token_list **, const void *, uint32_t *, comparison_fn_t, bool)
- +ndr_token_store: enum ndr_err_code (TALLOC_CTX *, struct ndr_token_list **, const void *, uint32_t)
- +ndr_transfer_syntax_ndr: uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\237\350", node = "\b\000+\020H`"}, if_version = 2
- +ndr_transfer_syntax_ndr64: uuid = {time_low = 1903232307, time_mid = 48826, time_hi_and_version = 18743, clock_seq = "\203\031", node = "\265\333\357\234\314\066"}, if_version = 1
- --- a/librpc/ndr/libndr.h
- +++ b/librpc/ndr/libndr.h
- @@ -124,6 +124,20 @@ struct ndr_print {
- #define LIBNDR_FLAG_STR_UTF8 (1<<12)
- #define LIBNDR_STRING_FLAGS (0x7FFC)
-
- +/*
- + * don't debug NDR_ERR_BUFSIZE failures,
- + * as the available buffer might be incomplete.
- + *
- + * return NDR_ERR_INCOMPLETE_BUFFER instead.
- + */
- +#define LIBNDR_FLAG_INCOMPLETE_BUFFER (1<<16)
- +
- +/*
- + * This lets ndr_pull_subcontext_end() return
- + * NDR_ERR_UNREAD_BYTES.
- + */
- +#define LIBNDR_FLAG_SUBCONTEXT_NO_UNREAD_BYTES (1<<17)
- +
- /* set if relative pointers should *not* be marshalled in reverse order */
- #define LIBNDR_FLAG_NO_RELATIVE_REVERSE (1<<18)
-
- @@ -163,6 +177,7 @@ struct ndr_print {
-
- /* useful macro for debugging */
- #define NDR_PRINT_DEBUG(type, p) ndr_print_debug((ndr_print_fn_t)ndr_print_ ##type, #p, p)
- +#define NDR_PRINT_DEBUGC(dbgc_class, type, p) ndr_print_debugc(dbgc_class, (ndr_print_fn_t)ndr_print_ ##type, #p, p)
- #define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
- #define NDR_PRINT_FUNCTION_DEBUG(type, flags, p) ndr_print_function_debug((ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
- #define NDR_PRINT_BOTH_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_BOTH, p)
- @@ -199,7 +214,9 @@ enum ndr_err_code {
- NDR_ERR_IPV6ADDRESS,
- NDR_ERR_INVALID_POINTER,
- NDR_ERR_UNREAD_BYTES,
- - NDR_ERR_NDR64
- + NDR_ERR_NDR64,
- + NDR_ERR_FLAGS,
- + NDR_ERR_INCOMPLETE_BUFFER
- };
-
- #define NDR_ERR_CODE_IS_SUCCESS(x) (x == NDR_ERR_SUCCESS)
- @@ -217,20 +234,52 @@ enum ndr_compression_alg {
-
- /*
- flags passed to control parse flow
- + These are deliberately in a different range to the NDR_IN/NDR_OUT
- + flags to catch mixups
- */
- -#define NDR_SCALARS 1
- -#define NDR_BUFFERS 2
- +#define NDR_SCALARS 0x100
- +#define NDR_BUFFERS 0x200
-
- /*
- - flags passed to ndr_print_*()
- + flags passed to ndr_print_*() and ndr pull/push for functions
- + These are deliberately in a different range to the NDR_SCALARS/NDR_BUFFERS
- + flags to catch mixups
- */
- -#define NDR_IN 1
- -#define NDR_OUT 2
- -#define NDR_BOTH 3
- -#define NDR_SET_VALUES 4
- +#define NDR_IN 0x10
- +#define NDR_OUT 0x20
- +#define NDR_BOTH 0x30
- +#define NDR_SET_VALUES 0x40
- +
- +
- +#define NDR_PULL_CHECK_FLAGS(ndr, ndr_flags) do { \
- + if ((ndr_flags) & ~(NDR_SCALARS|NDR_BUFFERS)) { \
- + return ndr_pull_error(ndr, NDR_ERR_FLAGS, "Invalid pull struct ndr_flags 0x%x", ndr_flags); \
- + } \
- +} while (0)
- +
- +#define NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags) do { \
- + if ((ndr_flags) & ~(NDR_SCALARS|NDR_BUFFERS)) \
- + return ndr_push_error(ndr, NDR_ERR_FLAGS, "Invalid push struct ndr_flags 0x%x", ndr_flags); \
- +} while (0)
- +
- +#define NDR_PULL_CHECK_FN_FLAGS(ndr, flags) do { \
- + if ((flags) & ~(NDR_BOTH|NDR_SET_VALUES)) { \
- + return ndr_pull_error(ndr, NDR_ERR_FLAGS, "Invalid fn pull flags 0x%x", flags); \
- + } \
- +} while (0)
- +
- +#define NDR_PUSH_CHECK_FN_FLAGS(ndr, flags) do { \
- + if ((flags) & ~(NDR_BOTH|NDR_SET_VALUES)) \
- + return ndr_push_error(ndr, NDR_ERR_FLAGS, "Invalid fn push flags 0x%x", flags); \
- +} while (0)
-
- #define NDR_PULL_NEED_BYTES(ndr, n) do { \
- if (unlikely((n) > ndr->data_size || ndr->offset + (n) > ndr->data_size)) { \
- + if (ndr->flags & LIBNDR_FLAG_INCOMPLETE_BUFFER) { \
- + uint32_t _available = ndr->data_size - ndr->offset; \
- + uint32_t _missing = n - _available; \
- + ndr->relative_highest_offset = _missing; \
- + } \
- return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull bytes %u (%s)", (unsigned)n, __location__); \
- } \
- } while(0)
- @@ -247,6 +296,10 @@ enum ndr_compression_alg {
- ndr->offset = (ndr->offset + (n-1)) & ~(n-1); \
- } \
- if (unlikely(ndr->offset > ndr->data_size)) { \
- + if (ndr->flags & LIBNDR_FLAG_INCOMPLETE_BUFFER) { \
- + uint32_t _missing = ndr->offset - ndr->data_size; \
- + ndr->relative_highest_offset = _missing; \
- + } \
- return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull align %u", (unsigned)n); \
- } \
- } while(0)
- @@ -402,6 +455,8 @@ void ndr_print_dom_sid0(struct ndr_print
- size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags);
- void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid);
- bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1, const struct ndr_syntax_id *i2);
- +char *ndr_syntax_id_to_string(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *id);
- +bool ndr_syntax_id_from_string(const char *s, struct ndr_syntax_id *id);
- enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p, ndr_push_flags_fn_t fn);
- enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, uint32_t level, ndr_push_flags_fn_t fn);
- size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push);
- @@ -424,14 +479,18 @@ enum ndr_err_code ndr_pull_relative_ptr2
- enum ndr_err_code ndr_pull_relative_ptr_short(struct ndr_pull *ndr, uint16_t *v);
- size_t ndr_align_size(uint32_t offset, size_t n);
- struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
- +enum ndr_err_code ndr_pull_append(struct ndr_pull *ndr, DATA_BLOB *blob);
- +enum ndr_err_code ndr_pull_pop(struct ndr_pull *ndr);
- enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size);
- struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx);
- DATA_BLOB ndr_push_blob(struct ndr_push *ndr);
- enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size);
- void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
- +void ndr_print_debugc_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
- void ndr_print_printf_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
- void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
- void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr);
- +void ndr_print_debugc(int dbgc_class, ndr_print_fn_t fn, const char *name, void *ptr);
- void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
- void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr);
- char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, void *ptr);
- --- a/librpc/ndr/ndr.c
- +++ b/librpc/ndr/ndr.c
- @@ -77,6 +77,111 @@ _PUBLIC_ struct ndr_pull *ndr_pull_init_
- return ndr;
- }
-
- +_PUBLIC_ enum ndr_err_code ndr_pull_append(struct ndr_pull *ndr, DATA_BLOB *blob)
- +{
- + enum ndr_err_code ndr_err;
- + DATA_BLOB b;
- + uint32_t append = 0;
- + bool ok;
- +
- + if (blob->length == 0) {
- + return NDR_ERR_SUCCESS;
- + }
- +
- + ndr_err = ndr_token_retrieve(&ndr->array_size_list, ndr, &append);
- + if (ndr_err == NDR_ERR_TOKEN) {
- + append = 0;
- + ndr_err = NDR_ERR_SUCCESS;
- + }
- + NDR_CHECK(ndr_err);
- +
- + if (ndr->data_size == 0) {
- + ndr->data = NULL;
- + append = UINT32_MAX;
- + }
- +
- + if (append == UINT32_MAX) {
- + /*
- + * append == UINT32_MAX means that
- + * ndr->data is either NULL or a valid
- + * talloc child of ndr, which means
- + * we can use data_blob_append() without
- + * data_blob_talloc() of the existing callers data
- + */
- + b = data_blob_const(ndr->data, ndr->data_size);
- + } else {
- + b = data_blob_talloc(ndr, ndr->data, ndr->data_size);
- + if (b.data == NULL) {
- + return ndr_pull_error(ndr, NDR_ERR_ALLOC, "%s", __location__);
- + }
- + }
- +
- + ok = data_blob_append(ndr, &b, blob->data, blob->length);
- + if (!ok) {
- + return ndr_pull_error(ndr, NDR_ERR_ALLOC, "%s", __location__);
- + }
- +
- + ndr->data = b.data;
- + ndr->data_size = b.length;
- +
- + return ndr_token_store(ndr, &ndr->array_size_list, ndr, UINT32_MAX);
- +}
- +
- +_PUBLIC_ enum ndr_err_code ndr_pull_pop(struct ndr_pull *ndr)
- +{
- + uint32_t skip = 0;
- + uint32_t append = 0;
- +
- + if (ndr->relative_base_offset != 0) {
- + return ndr_pull_error(ndr, NDR_ERR_RELATIVE,
- + "%s", __location__);
- + }
- + if (ndr->relative_highest_offset != 0) {
- + return ndr_pull_error(ndr, NDR_ERR_RELATIVE,
- + "%s", __location__);
- + }
- + if (ndr->relative_list != NULL) {
- + return ndr_pull_error(ndr, NDR_ERR_RELATIVE,
- + "%s", __location__);
- + }
- + if (ndr->relative_base_list != NULL) {
- + return ndr_pull_error(ndr, NDR_ERR_RELATIVE,
- + "%s", __location__);
- + }
- +
- + /*
- + * we need to keep up to 7 bytes
- + * in order to get the aligment right.
- + */
- + skip = ndr->offset & 0xFFFFFFF8;
- +
- + if (skip == 0) {
- + return NDR_ERR_SUCCESS;
- + }
- +
- + ndr->offset -= skip;
- + ndr->data_size -= skip;
- +
- + append = ndr_token_peek(&ndr->array_size_list, ndr);
- + if (append != UINT32_MAX) {
- + /*
- + * here we assume, that ndr->data is not a
- + * talloc child of ndr.
- + */
- + ndr->data += skip;
- + return NDR_ERR_SUCCESS;
- + }
- +
- + memmove(ndr->data, ndr->data + skip, ndr->data_size);
- +
- + ndr->data = talloc_realloc(ndr, ndr->data, uint8_t, ndr->data_size);
- + if (ndr->data_size != 0 && ndr->data == NULL) {
- + return ndr_pull_error(ndr, NDR_ERR_ALLOC, "%s", __location__);
- + }
- +
- + return NDR_ERR_SUCCESS;
- +}
- +
- /*
- advance by 'size' bytes
- */
- @@ -167,6 +272,38 @@ _PUBLIC_ enum ndr_err_code ndr_push_expa
- return NDR_ERR_SUCCESS;
- }
-
- +_PUBLIC_ void ndr_print_debugc_helper(struct ndr_print *ndr, const char *format, ...)
- +{
- + va_list ap;
- + char *s = NULL;
- + uint32_t i;
- + int ret;
- + int dbgc_class;
- +
- + va_start(ap, format);
- + ret = vasprintf(&s, format, ap);
- + va_end(ap);
- +
- + if (ret == -1) {
- + return;
- + }
- +
- + dbgc_class = *(int *)ndr->private_data;
- +
- + if (ndr->no_newline) {
- + DEBUGADDC(dbgc_class, 1,("%s", s));
- + free(s);
- + return;
- + }
- +
- + for (i=0;i<ndr->depth;i++) {
- + DEBUGADDC(dbgc_class, 1,(" "));
- + }
- +
- + DEBUGADDC(dbgc_class, 1,("%s\n", s));
- + free(s);
- +}
- +
- _PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...)
- {
- va_list ap;
- @@ -238,6 +375,25 @@ _PUBLIC_ void ndr_print_string_helper(st
- }
-
- /*
- + a useful helper function for printing idl structures via DEBUGC()
- +*/
- +_PUBLIC_ void ndr_print_debugc(int dbgc_class, ndr_print_fn_t fn, const char *name, void *ptr)
- +{
- + struct ndr_print *ndr;
- +
- + DEBUGC(dbgc_class, 1,(" "));
- +
- + ndr = talloc_zero(NULL, struct ndr_print);
- + if (!ndr) return;
- + ndr->private_data = &dbgc_class;
- + ndr->print = ndr_print_debugc_helper;
- + ndr->depth = 1;
- + ndr->flags = 0;
- + fn(ndr, name, ptr);
- + talloc_free(ndr);
- +}
- +
- +/*
- a useful helper function for printing idl structures via DEBUG()
- */
- _PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr)
- @@ -403,6 +559,15 @@ _PUBLIC_ enum ndr_err_code ndr_pull_erro
- va_list ap;
- int ret;
-
- + if (ndr->flags & LIBNDR_FLAG_INCOMPLETE_BUFFER) {
- + switch (ndr_err) {
- + case NDR_ERR_BUFSIZE:
- + return NDR_ERR_INCOMPLETE_BUFFER;
- + default:
- + break;
- + }
- + }
- +
- va_start(ap, format);
- ret = vasprintf(&s, format, ap);
- va_end(ap);
- @@ -557,6 +722,23 @@ _PUBLIC_ enum ndr_err_code ndr_pull_subc
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &reserved));
- break;
- }
- + case 0xFFFFFFFF:
- + /*
- + * a shallow copy like subcontext
- + * useful for DCERPC pipe chunks.
- + */
- + subndr = talloc_zero(ndr, struct ndr_pull);
- + NDR_ERR_HAVE_NO_MEMORY(subndr);
- +
- + subndr->flags = ndr->flags;
- + subndr->current_mem_ctx = ndr->current_mem_ctx;
- + subndr->data = ndr->data;
- + subndr->offset = ndr->offset;
- + subndr->data_size = ndr->data_size;
- +
- + *_subndr = subndr;
- + return NDR_ERR_SUCCESS;
- +
- default:
- return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) header_size %d",
- (int)header_size);
- @@ -589,13 +771,35 @@ _PUBLIC_ enum ndr_err_code ndr_pull_subc
- ssize_t size_is)
- {
- uint32_t advance;
- - if (size_is >= 0) {
- + uint32_t highest_ofs;
- +
- + if (header_size == 0xFFFFFFFF) {
- + advance = subndr->offset - ndr->offset;
- + } else if (size_is >= 0) {
- advance = size_is;
- } else if (header_size > 0) {
- advance = subndr->data_size;
- } else {
- advance = subndr->offset;
- }
- +
- + if (subndr->offset > ndr->relative_highest_offset) {
- + highest_ofs = subndr->offset;
- + } else {
- + highest_ofs = subndr->relative_highest_offset;
- + }
- + if (!(subndr->flags & LIBNDR_FLAG_SUBCONTEXT_NO_UNREAD_BYTES)) {
- + /*
- + * avoid an error unless SUBCONTEXT_NO_UNREAD_BYTES is specified
- + */
- + highest_ofs = advance;
- + }
- + if (highest_ofs < advance) {
- + return ndr_pull_error(subndr, NDR_ERR_UNREAD_BYTES,
- + "not all bytes consumed ofs[%u] advance[%u]",
- + highest_ofs, advance);
- + }
- +
- NDR_CHECK(ndr_pull_advance(ndr, advance));
- return NDR_ERR_SUCCESS;
- }
- @@ -1440,6 +1644,7 @@ const static struct {
- { NDR_ERR_INVALID_POINTER, "Invalid Pointer" },
- { NDR_ERR_UNREAD_BYTES, "Unread Bytes" },
- { NDR_ERR_NDR64, "NDR64 assertion error" },
- + { NDR_ERR_INCOMPLETE_BUFFER, "Incomplete Buffer" },
- { 0, NULL }
- };
-
- --- a/librpc/idl/idl_types.h
- +++ b/librpc/idl/idl_types.h
- @@ -47,3 +47,5 @@
-
- #define NDR_RELATIVE_REVERSE LIBNDR_FLAG_RELATIVE_REVERSE
- #define NDR_NO_RELATIVE_REVERSE LIBNDR_FLAG_NO_RELATIVE_REVERSE
- +
- +#define NDR_SUBCONTEXT_NO_UNREAD_BYTES LIBNDR_FLAG_SUBCONTEXT_NO_UNREAD_BYTES
- --- a/librpc/idl/dcerpc.idl
- +++ b/librpc/idl/dcerpc.idl
- @@ -10,6 +10,8 @@
- */
- import "misc.idl";
-
- +cpp_quote("extern const uint8_t DCERPC_SEC_VT_MAGIC[8];")
- +
- interface dcerpc
- {
- typedef struct {
- @@ -453,14 +455,21 @@ interface dcerpc
- } dcerpc_payload;
-
- /* pfc_flags values */
- - const uint8 DCERPC_PFC_FLAG_FIRST = 0x01; /* First fragment */
- - const uint8 DCERPC_PFC_FLAG_LAST = 0x02; /* Last fragment */
- - const uint8 DCERPC_PFC_FLAG_PENDING_CANCEL = 0x04; /* Cancel was pending at sender */
- - const uint8 DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN = DCERPC_PFC_FLAG_PENDING_CANCEL; /* depends on the pdu type */
- - const uint8 DCERPC_PFC_FLAG_CONC_MPX = 0x10; /* supports concurrent multiplexing of a single connection. */
- - const uint8 DCERPC_PFC_FLAG_DID_NOT_EXECUTE = 0x20; /* on a fault it means the server hasn't done anything */
- - const uint8 DCERPC_PFC_FLAG_MAYBE = 0x40; /* `maybe' call semantics requested */
- - const uint8 DCERPC_PFC_FLAG_OBJECT_UUID = 0x80; /* on valid guid is in the optional object field */
- + typedef [bitmap8bit] bitmap {
- + DCERPC_PFC_FLAG_FIRST = 0x01, /* First fragment */
- + DCERPC_PFC_FLAG_LAST = 0x02, /* Last fragment */
- + DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING = 0x04, /* depends on the pdu type */
- + DCERPC_PFC_FLAG_CONC_MPX = 0x10, /* supports concurrent multiplexing of a single connection. */
- + DCERPC_PFC_FLAG_DID_NOT_EXECUTE = 0x20, /* on a fault it means the server hasn't done anything */
- + DCERPC_PFC_FLAG_MAYBE = 0x40, /* `maybe' call semantics requested */
- + DCERPC_PFC_FLAG_OBJECT_UUID = 0x80 /* on valid guid is in the optional object field */
- + } dcerpc_pfc_flags;
- +
- + /* Cancel was pending at sender */
- + const int DCERPC_PFC_FLAG_PENDING_CANCEL =
- + DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING;
- + const ist DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN =
- + DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING;
-
- /* these offsets are needed by the signing code */
- const uint8 DCERPC_PFC_OFFSET = 3;
- @@ -468,6 +477,7 @@ interface dcerpc
- const uint8 DCERPC_FRAG_LEN_OFFSET = 8;
- const uint8 DCERPC_AUTH_LEN_OFFSET = 10;
- const uint8 DCERPC_CALL_ID_OFFSET = 12;
- + const uint8 DCERPC_NCACN_PAYLOAD_OFFSET = 16;
-
- /* little-endian flag */
- const uint8 DCERPC_DREP_LE = 0x10;
- @@ -476,7 +486,7 @@ interface dcerpc
- uint8 rpc_vers; /* RPC version */
- uint8 rpc_vers_minor; /* Minor version */
- dcerpc_pkt_type ptype; /* Packet type */
- - uint8 pfc_flags; /* Fragmentation flags */
- + dcerpc_pfc_flags pfc_flags; /* Fragmentation flags */
- uint8 drep[4]; /* NDR data representation */
- uint16 frag_length; /* Total length of fragment */
- uint16 auth_length; /* authenticator length */
- @@ -506,4 +516,69 @@ interface dcerpc
- uint8 serial_low;
- [switch_is(ptype)] dcerpc_payload u;
- } ncadg_packet;
- +
- + typedef [bitmap16bit] bitmap {
- + DCERPC_SEC_VT_COMMAND_ENUM = 0x3FFF,
- + DCERPC_SEC_VT_COMMAND_END = 0x4000,
- + DCERPC_SEC_VT_MUST_PROCESS = 0x8000
- + } dcerpc_sec_vt_command;
- +
- + typedef [enum16bit] enum {
- + DCERPC_SEC_VT_COMMAND_BITMASK1 = 0x0001,
- + DCERPC_SEC_VT_COMMAND_PCONTEXT = 0x0002,
- + DCERPC_SEC_VT_COMMAND_HEADER2 = 0x0003
- + } dcerpc_sec_vt_command_enum;
- +
- + typedef [bitmap32bit] bitmap {
- + DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING = 0x00000001
- + } dcerpc_sec_vt_bitmask1;
- +
- + typedef struct {
- + ndr_syntax_id abstract_syntax;
- + ndr_syntax_id transfer_syntax;
- + } dcerpc_sec_vt_pcontext;
- +
- + typedef struct {
- + dcerpc_pkt_type ptype; /* Packet type */
- + [value(0)] uint8 reserved1;
- + [value(0)] uint16 reserved2;
- + uint8 drep[4]; /* NDR data representation */
- + uint32 call_id; /* Call identifier */
- + uint16 context_id;
- + uint16 opnum;
- + } dcerpc_sec_vt_header2;
- +
- + typedef [switch_type(dcerpc_sec_vt_command_enum),nodiscriminant] union {
- + [case(DCERPC_SEC_VT_COMMAND_BITMASK1)] dcerpc_sec_vt_bitmask1 bitmask1;
- + [case(DCERPC_SEC_VT_COMMAND_PCONTEXT)] dcerpc_sec_vt_pcontext pcontext;
- + [case(DCERPC_SEC_VT_COMMAND_HEADER2)] dcerpc_sec_vt_header2 header2;
- + [default,flag(NDR_REMAINING)] DATA_BLOB _unknown;
- + } dcerpc_sec_vt_union;
- +
- + typedef struct {
- + dcerpc_sec_vt_command command;
- + [switch_is(command & DCERPC_SEC_VT_COMMAND_ENUM)]
- + [subcontext(2),flag(NDR_SUBCONTEXT_NO_UNREAD_BYTES)]
- + dcerpc_sec_vt_union u;
- + } dcerpc_sec_vt;
- +
- + typedef [public,nopush,nopull] struct {
- + uint16 count;
- + } dcerpc_sec_vt_count;
- +
- + /*
- + * We assume that the whole verification trailer fits into
- + * the last 1024 bytes after the stub data.
- + *
- + * There're currently only 3 commands defined and each should
- + * only be used once.
- + */
- + const uint16 DCERPC_SEC_VT_MAX_SIZE = 1024;
- +
- + typedef [public,flag(NDR_PAHEX)] struct {
- + [flag(NDR_ALIGN4)] DATA_BLOB _pad;
- + [value(DCERPC_SEC_VT_MAGIC)] uint8 magic[8];
- + dcerpc_sec_vt_count count;
- + dcerpc_sec_vt commands[count.count];
- + } dcerpc_sec_verification_trailer;
- }
- --- /dev/null
- +++ b/librpc/ndr/ndr_dcerpc.c
- @@ -0,0 +1,187 @@
- +/*
- + Unix SMB/CIFS implementation.
- +
- + Manually parsed structures found in the DCERPC protocol
- +
- + Copyright (C) Stefan Metzmacher 2014
- + Copyright (C) Gregor Beck 2014
- +
- + 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/>.
- +*/
- +
- +#include "includes.h"
- +#include "librpc/gen_ndr/ndr_dcerpc.h"
- +
- +#include "librpc/gen_ndr/ndr_misc.h"
- +#include "lib/util/bitmap.h"
- +
- +const uint8_t DCERPC_SEC_VT_MAGIC[] = {0x8a,0xe3,0x13,0x71,0x02,0xf4,0x36,0x71};
- +
- +_PUBLIC_ enum ndr_err_code ndr_push_dcerpc_sec_vt_count(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_sec_vt_count *r)
- +{
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- + /* nothing */
- + return NDR_ERR_SUCCESS;
- +}
- +
- +_PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_sec_vt_count(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_sec_vt_count *r)
- +{
- + uint32_t _saved_ofs = ndr->offset;
- +
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- +
- + if (!(ndr_flags & NDR_SCALARS)) {
- + return NDR_ERR_SUCCESS;
- + }
- +
- + r->count = 0;
- +
- + while (true) {
- + uint16_t command;
- + uint16_t length;
- +
- + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &command));
- + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &length));
- + NDR_CHECK(ndr_pull_advance(ndr, length));
- +
- + r->count += 1;
- +
- + if (command & DCERPC_SEC_VT_COMMAND_END) {
- + break;
- + }
- + }
- +
- + ndr->offset = _saved_ofs;
- + return NDR_ERR_SUCCESS;
- +}
- +
- +_PUBLIC_ enum ndr_err_code ndr_pop_dcerpc_sec_verification_trailer(
- + struct ndr_pull *ndr, TALLOC_CTX *mem_ctx,
- + struct dcerpc_sec_verification_trailer **_r)
- +{
- + enum ndr_err_code ndr_err;
- + uint32_t ofs;
- + uint32_t min_ofs = 0;
- + struct dcerpc_sec_verification_trailer *r;
- + DATA_BLOB sub_blob = data_blob_null;
- + struct ndr_pull *sub_ndr = NULL;
- + uint32_t remaining;
- +
- + *_r = NULL;
- +
- + r = talloc_zero(mem_ctx, struct dcerpc_sec_verification_trailer);
- + if (r == NULL) {
- + return NDR_ERR_ALLOC;
- + }
- +
- + if (ndr->data_size < sizeof(DCERPC_SEC_VT_MAGIC)) {
- + /*
- + * we return with r->count = 0
- + */
- + *_r = r;
- + return NDR_ERR_SUCCESS;
- + }
- +
- + ofs = ndr->data_size - sizeof(DCERPC_SEC_VT_MAGIC);
- + /* the magic is 4 byte aligned */
- + ofs &= ~3;
- +
- + if (ofs > DCERPC_SEC_VT_MAX_SIZE) {
- + /*
- + * We just scan the last 1024 bytes.
- + */
- + min_ofs = ofs - DCERPC_SEC_VT_MAX_SIZE;
- + } else {
- + min_ofs = 0;
- + }
- +
- + while (true) {
- + int ret;
- +
- + ret = memcmp(&ndr->data[ofs],
- + DCERPC_SEC_VT_MAGIC,
- + sizeof(DCERPC_SEC_VT_MAGIC));
- + if (ret == 0) {
- + sub_blob = data_blob_const(&ndr->data[ofs],
- + ndr->data_size - ofs);
- + break;
- + }
- +
- + if (ofs <= min_ofs) {
- + break;
- + }
- +
- + ofs -= 4;
- + }
- +
- + if (sub_blob.length == 0) {
- + /*
- + * we return with r->count = 0
- + */
- + *_r = r;
- + return NDR_ERR_SUCCESS;
- + }
- +
- + sub_ndr = ndr_pull_init_blob(&sub_blob, r);
- + if (sub_ndr == NULL) {
- + TALLOC_FREE(r);
- + return NDR_ERR_ALLOC;
- + }
- +
- + ndr_err = ndr_pull_dcerpc_sec_verification_trailer(sub_ndr,
- + NDR_SCALARS | NDR_BUFFERS,
- + r);
- + if (ndr_err == NDR_ERR_ALLOC) {
- + TALLOC_FREE(r);
- + return NDR_ERR_ALLOC;
- + }
- +
- + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- + goto ignore_error;
- + }
- +
- + remaining = sub_ndr->data_size - sub_ndr->offset;
- + if (remaining > 16) {
- + /*
- + * we expect not more than 16 byte of additional
- + * padding after the verification trailer.
- + */
- + goto ignore_error;
- + }
- +
- + /*
- + * We assume that we got a real verification trailer.
- + *
- + * We remove it from the available stub data.
- + */
- + ndr->data_size = ofs;
- +
- + TALLOC_FREE(sub_ndr);
- +
- + *_r = r;
- + return NDR_ERR_SUCCESS;
- +
- +ignore_error:
- + TALLOC_FREE(sub_ndr);
- + /*
- + * just ignore the error, it's likely
- + * that the magic we found belongs to
- + * the stub data.
- + *
- + * we return with r->count = 0
- + */
- + ZERO_STRUCTP(r);
- + *_r = r;
- + return NDR_ERR_SUCCESS;
- +}
- --- a/librpc/wscript_build
- +++ b/librpc/wscript_build
- @@ -274,8 +274,9 @@ bld.SAMBA_SUBSYSTEM('NDR_COMPRESSION',
- )
-
- bld.SAMBA_SUBSYSTEM('NDR_DCERPC',
- - source='gen_ndr/ndr_dcerpc.c',
- + source='gen_ndr/ndr_dcerpc.c ndr/ndr_dcerpc.c',
- public_deps='ndr',
- + deps='bitmap',
- public_headers='gen_ndr/ndr_dcerpc.h gen_ndr/dcerpc.h',
- header_path= [ ('*gen_ndr*', 'gen_ndr') ],
- )
- --- a/source3/Makefile.in
- +++ b/source3/Makefile.in
- @@ -323,7 +323,8 @@ LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \
- ../librpc/ndr/uuid.o \
- librpc/ndr/util.o \
- librpc/gen_ndr/ndr_server_id.o \
- - librpc/gen_ndr/ndr_dcerpc.o
- + librpc/gen_ndr/ndr_dcerpc.o \
- + ../librpc/ndr/ndr_dcerpc.o
-
- LIBNDR_GEN_OBJ0 = librpc/gen_ndr/ndr_samr.o \
- librpc/gen_ndr/ndr_lsa.o
- @@ -454,7 +455,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ
- lib/username.o \
- ../libds/common/flag_mapping.o \
- lib/access.o lib/smbrun.o \
- - lib/bitmap.o lib/dprintf.o $(UTIL_REG_OBJ) \
- + ../lib/util/bitmap.o lib/dprintf.o $(UTIL_REG_OBJ) \
- lib/wins_srv.o \
- lib/util_str.o lib/clobber.o lib/util_sid.o \
- lib/util_unistr.o ../lib/util/charset/codepoints.o lib/util_file.o \
- @@ -987,7 +988,9 @@ SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(P
- $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
- $(PASSCHANGE_OBJ) $(FNAME_UTIL_OBJ) \
- $(LIBCLI_SAMR_OBJ) \
- - rpc_client/init_lsa.o
- + $(LIBCLI_NETLOGON_OBJ) \
- + rpc_client/init_lsa.o \
- + rpc_client/init_netlogon.o
-
- STATUS_OBJ = utils/status.o utils/status_profile.o \
- $(LOCKING_OBJ) $(PARAM_OBJ) \
- @@ -1003,7 +1006,9 @@ SMBTREE_OBJ = utils/smbtree.o $(PARAM_OB
- $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
- $(LIBMSRPC_GEN_OBJ) \
- $(LIBMSRPC_OBJ) \
- - $(LIBCLI_SRVSVC_OBJ)
- + $(LIBCLI_SRVSVC_OBJ) \
- + $(LIBCLI_NETLOGON_OBJ) \
- + rpc_client/init_netlogon.o
-
- TESTPARM_OBJ = utils/testparm.o \
- $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
- @@ -1025,7 +1030,9 @@ SMBPASSWD_OBJ = utils/smbpasswd.o $(PASS
- $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \
- $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
- $(LIBCLI_SAMR_OBJ) \
- - rpc_client/init_lsa.o
- + $(LIBCLI_NETLOGON_OBJ) \
- + rpc_client/init_lsa.o \
- + rpc_client/init_netlogon.o
-
- PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) \
- $(LIBSAMBA_OBJ) $(LIBTSOCKET_OBJ) \
- @@ -1098,7 +1105,9 @@ LIBSMBCLIENT_OBJ1 = $(LIBSMBCLIENT_OBJ0)
- $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
- $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
- $(LIBCLI_SRVSVC_OBJ) \
- - $(LIBCLI_LSA_OBJ)
- + $(LIBCLI_LSA_OBJ) \
- + $(LIBCLI_NETLOGON_OBJ) \
- + rpc_client/init_netlogon.o
-
- LIBSMBCLIENT_OBJ = $(LIBSMBCLIENT_OBJ1)
-
- @@ -1121,7 +1130,9 @@ CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ)
- $(READLINE_OBJ) $(POPT_LIB_OBJ) \
- $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
- $(DISPLAY_SEC_OBJ) \
- - $(LIBCLI_SRVSVC_OBJ)
- + $(LIBCLI_SRVSVC_OBJ) \
- + $(LIBCLI_NETLOGON_OBJ) \
- + rpc_client/init_netlogon.o
-
- LIBSMBCONF_OBJ = ../lib/smbconf/smbconf.o \
- ../lib/smbconf/smbconf_util.o \
- @@ -1233,7 +1244,9 @@ SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PA
- @LIBWBCLIENT_STATIC@ \
- torture/wbc_async.o \
- ../nsswitch/wb_reqtrans.o \
- - $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBCLI_ECHO_OBJ)
- + $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBCLI_ECHO_OBJ) \
- + $(LIBCLI_NETLOGON_OBJ) rpc_client/init_netlogon.o
- +
-
- MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
- $(LIB_NONSMBD_OBJ) \
- @@ -1268,14 +1281,18 @@ SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_
- $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
- $(PASSDB_OBJ) $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
- $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \
- - $(LIBCLI_LSA_OBJ)
- + $(LIBCLI_LSA_OBJ) \
- + $(LIBCLI_NETLOGON_OBJ) \
- + rpc_client/init_netlogon.o
-
- SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
- $(PARAM_OBJ) \
- $(LIB_NONSMBD_OBJ) \
- $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(POPT_LIB_OBJ) \
- $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
- - $(LIBCLI_LSA_OBJ)
- + $(LIBCLI_LSA_OBJ) \
- + $(LIBCLI_NETLOGON_OBJ) \
- + rpc_client/init_netlogon.o
-
- EVTLOGADM_OBJ0 = utils/eventlogadm.o
-
- --- a/librpc/ndr/ndr_basic.c
- +++ b/librpc/ndr/ndr_basic.c
- @@ -61,6 +61,7 @@ _PUBLIC_ void ndr_check_padding(struct n
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_NEED_BYTES(ndr, 1);
- *v = (int8_t)CVAL(ndr->data, ndr->offset);
- ndr->offset += 1;
- @@ -72,6 +73,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_int8
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_NEED_BYTES(ndr, 1);
- *v = CVAL(ndr->data, ndr->offset);
- ndr->offset += 1;
- @@ -83,6 +85,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_uint
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_ALIGN(ndr, 2);
- NDR_PULL_NEED_BYTES(ndr, 2);
- *v = (uint16_t)NDR_SVAL(ndr, ndr->offset);
- @@ -95,6 +98,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_int1
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_ALIGN(ndr, 2);
- NDR_PULL_NEED_BYTES(ndr, 2);
- *v = NDR_SVAL(ndr, ndr->offset);
- @@ -107,6 +111,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_uint
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_uint1632(struct ndr_pull *ndr, int ndr_flags, uint16_t *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- if (unlikely(ndr->flags & LIBNDR_FLAG_NDR64)) {
- uint32_t v32 = 0;
- enum ndr_err_code err = ndr_pull_uint32(ndr, ndr_flags, &v32);
- @@ -125,6 +130,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_uint
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_ALIGN(ndr, 4);
- NDR_PULL_NEED_BYTES(ndr, 4);
- *v = NDR_IVALS(ndr, ndr->offset);
- @@ -137,6 +143,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_int3
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_ALIGN(ndr, 4);
- NDR_PULL_NEED_BYTES(ndr, 4);
- *v = NDR_IVAL(ndr, ndr->offset);
- @@ -151,6 +158,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_uint
- {
- uint64_t v64;
- enum ndr_err_code err;
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- if (likely(!(ndr->flags & LIBNDR_FLAG_NDR64))) {
- return ndr_pull_uint32(ndr, ndr_flags, v);
- }
- @@ -169,6 +177,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_uint
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_double(struct ndr_pull *ndr, int ndr_flags, double *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_ALIGN(ndr, 8);
- NDR_PULL_NEED_BYTES(ndr, 8);
- memcpy(v, ndr->data+ndr->offset, 8);
- @@ -217,6 +226,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ref_
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_ALIGN(ndr, 4);
- NDR_PULL_NEED_BYTES(ndr, 8);
- *v = NDR_IVAL(ndr, ndr->offset);
- @@ -230,6 +240,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_udlo
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_ALIGN(ndr, 4);
- NDR_PULL_NEED_BYTES(ndr, 8);
- *v = ((uint64_t)NDR_IVAL(ndr, ndr->offset)) << 32;
- @@ -264,6 +275,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_hype
- _PUBLIC_ enum ndr_err_code ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v)
- {
- uintptr_t h;
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PULL_ALIGN(ndr, sizeof(h));
- NDR_PULL_NEED_BYTES(ndr, sizeof(h));
- memcpy(&h, ndr->data+ndr->offset, sizeof(h));
- @@ -278,6 +290,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_poin
- _PUBLIC_ enum ndr_err_code ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status)
- {
- uint32_t v;
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
- *status = NT_STATUS(v);
- return NDR_ERR_SUCCESS;
- @@ -302,6 +315,7 @@ _PUBLIC_ void ndr_print_NTSTATUS(struct
- _PUBLIC_ enum ndr_err_code ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status)
- {
- uint32_t v;
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
- *status = W_ERROR(v);
- return NDR_ERR_SUCCESS;
- @@ -414,6 +428,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_byte
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- if (!(ndr_flags & NDR_SCALARS)) {
- return NDR_ERR_SUCCESS;
- }
- @@ -425,6 +440,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_arra
- */
- _PUBLIC_ enum ndr_err_code ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_NEED_BYTES(ndr, 1);
- SCVAL(ndr->data, ndr->offset, (uint8_t)v);
- ndr->offset += 1;
- @@ -436,6 +452,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_int8
- */
- _PUBLIC_ enum ndr_err_code ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_NEED_BYTES(ndr, 1);
- SCVAL(ndr->data, ndr->offset, v);
- ndr->offset += 1;
- @@ -447,6 +464,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_uint
- */
- _PUBLIC_ enum ndr_err_code ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_ALIGN(ndr, 2);
- NDR_PUSH_NEED_BYTES(ndr, 2);
- NDR_SSVAL(ndr, ndr->offset, (uint16_t)v);
- @@ -459,6 +477,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_int1
- */
- _PUBLIC_ enum ndr_err_code ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_ALIGN(ndr, 2);
- NDR_PUSH_NEED_BYTES(ndr, 2);
- NDR_SSVAL(ndr, ndr->offset, v);
- @@ -482,6 +501,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_uint
- */
- _PUBLIC_ enum ndr_err_code ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_ALIGN(ndr, 4);
- NDR_PUSH_NEED_BYTES(ndr, 4);
- NDR_SIVALS(ndr, ndr->offset, v);
- @@ -494,6 +514,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_int3
- */
- _PUBLIC_ enum ndr_err_code ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_ALIGN(ndr, 4);
- NDR_PUSH_NEED_BYTES(ndr, 4);
- NDR_SIVAL(ndr, ndr->offset, v);
- @@ -517,6 +538,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_uint
- */
- _PUBLIC_ enum ndr_err_code ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_ALIGN(ndr, 4);
- NDR_PUSH_NEED_BYTES(ndr, 8);
- NDR_SIVAL(ndr, ndr->offset, (v & 0xFFFFFFFF));
- @@ -530,6 +552,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_udlo
- */
- _PUBLIC_ enum ndr_err_code ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_ALIGN(ndr, 4);
- NDR_PUSH_NEED_BYTES(ndr, 8);
- NDR_SIVAL(ndr, ndr->offset, (v>>32));
- @@ -563,6 +586,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_hype
- */
- _PUBLIC_ enum ndr_err_code ndr_push_double(struct ndr_push *ndr, int ndr_flags, double v)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_ALIGN(ndr, 8);
- NDR_PUSH_NEED_BYTES(ndr, 8);
- memcpy(ndr->data+ndr->offset, &v, 8);
- @@ -576,6 +600,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_doub
- _PUBLIC_ enum ndr_err_code ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v)
- {
- uintptr_t h = (intptr_t)v;
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_PUSH_ALIGN(ndr, sizeof(h));
- NDR_PUSH_NEED_BYTES(ndr, sizeof(h));
- memcpy(ndr->data+ndr->offset, &h, sizeof(h));
- @@ -686,6 +711,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_zero
- */
- _PUBLIC_ enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- if (!(ndr_flags & NDR_SCALARS)) {
- return NDR_ERR_SUCCESS;
- }
- @@ -738,6 +764,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_ref_
- */
- _PUBLIC_ enum ndr_err_code ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_CHECK(ndr_push_udlong(ndr, ndr_flags, t));
- return NDR_ERR_SUCCESS;
- }
- @@ -747,6 +774,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NTTI
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_CHECK(ndr_pull_udlong(ndr, ndr_flags, t));
- return NDR_ERR_SUCCESS;
- }
- @@ -756,6 +784,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NTTI
- */
- _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- t /= 10000000;
- NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t));
- return NDR_ERR_SUCCESS;
- @@ -766,6 +795,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NTTI
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, t));
- (*t) *= 10000000;
- return NDR_ERR_SUCCESS;
- @@ -776,6 +806,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NTTI
- */
- _PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t)
- {
- + NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
- NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, t));
- return NDR_ERR_SUCCESS;
- }
- @@ -785,6 +816,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NTTI
- */
- _PUBLIC_ enum ndr_err_code ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t));
- return NDR_ERR_SUCCESS;
- }
- @@ -814,6 +846,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_time
- */
- _PUBLIC_ enum ndr_err_code ndr_push_uid_t(struct ndr_push *ndr, int ndr_flags, uid_t u)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- return ndr_push_hyper(ndr, NDR_SCALARS, (uint64_t)u);
- }
-
- @@ -839,6 +872,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_uid_
- */
- _PUBLIC_ enum ndr_err_code ndr_push_gid_t(struct ndr_push *ndr, int ndr_flags, gid_t g)
- {
- + NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
- return ndr_push_hyper(ndr, NDR_SCALARS, (uint64_t)g);
- }
-
- --- a/source3/lib/bitmap.c
- +++ /dev/null
- @@ -1,136 +0,0 @@
- -/*
- - Unix SMB/CIFS implementation.
- - simple bitmap functions
- - Copyright (C) Andrew Tridgell 1992-1998
- -
- - 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/>.
- -*/
- -
- -#include "includes.h"
- -
- -/* these functions provide a simple way to allocate integers from a
- - pool without repetition */
- -
- -/****************************************************************************
- -talloc a bitmap
- -****************************************************************************/
- -struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n)
- -{
- - struct bitmap *bm;
- -
- - bm = TALLOC_P(mem_ctx, struct bitmap);
- -
- - if (!bm) return NULL;
- -
- - bm->n = n;
- - bm->b = TALLOC_ZERO_ARRAY(bm, uint32, (n+31)/32);
- - if (!bm->b) {
- - TALLOC_FREE(bm);
- - return NULL;
- - }
- - return bm;
- -}
- -
- -/****************************************************************************
- -copy as much of the source bitmap as will fit in the destination bitmap.
- -****************************************************************************/
- -
- -int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src)
- -{
- - int count = MIN(dst->n, src->n);
- -
- - SMB_ASSERT(dst->b != src->b);
- - memcpy(dst->b, src->b, sizeof(uint32)*((count+31)/32));
- -
- - return count;
- -}
- -
- -/****************************************************************************
- -set a bit in a bitmap
- -****************************************************************************/
- -bool bitmap_set(struct bitmap *bm, unsigned i)
- -{
- - if (i >= bm->n) {
- - DEBUG(0,("Setting invalid bitmap entry %d (of %d)\n",
- - i, bm->n));
- - return False;
- - }
- - bm->b[i/32] |= (1<<(i%32));
- - return True;
- -}
- -
- -/****************************************************************************
- -clear a bit in a bitmap
- -****************************************************************************/
- -bool bitmap_clear(struct bitmap *bm, unsigned i)
- -{
- - if (i >= bm->n) {
- - DEBUG(0,("clearing invalid bitmap entry %d (of %d)\n",
- - i, bm->n));
- - return False;
- - }
- - bm->b[i/32] &= ~(1<<(i%32));
- - return True;
- -}
- -
- -/****************************************************************************
- -query a bit in a bitmap
- -****************************************************************************/
- -bool bitmap_query(struct bitmap *bm, unsigned i)
- -{
- - if (i >= bm->n) return False;
- - if (bm->b[i/32] & (1<<(i%32))) {
- - return True;
- - }
- - return False;
- -}
- -
- -/****************************************************************************
- -find a zero bit in a bitmap starting at the specified offset, with
- -wraparound
- -****************************************************************************/
- -int bitmap_find(struct bitmap *bm, unsigned ofs)
- -{
- - unsigned int i, j;
- -
- - if (ofs > bm->n) ofs = 0;
- -
- - i = ofs;
- - while (i < bm->n) {
- - if (~(bm->b[i/32])) {
- - j = i;
- - do {
- - if (!bitmap_query(bm, j)) return j;
- - j++;
- - } while (j & 31 && j < bm->n);
- - }
- - i += 32;
- - i &= ~31;
- - }
- -
- - i = 0;
- - while (i < ofs) {
- - if (~(bm->b[i/32])) {
- - j = i;
- - do {
- - if (!bitmap_query(bm, j)) return j;
- - j++;
- - } while (j & 31 && j < bm->n);
- - }
- - i += 32;
- - i &= ~31;
- - }
- -
- - return -1;
- -}
- --- /dev/null
- +++ b/lib/util/bitmap.c
- @@ -0,0 +1,137 @@
- +/*
- + Unix SMB/CIFS implementation.
- + simple bitmap functions
- + Copyright (C) Andrew Tridgell 1992-1998
- +
- + 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/>.
- +*/
- +
- +#include "includes.h"
- +#include "lib/util/bitmap.h"
- +
- +/* these functions provide a simple way to allocate integers from a
- + pool without repetition */
- +
- +/****************************************************************************
- +talloc a bitmap
- +****************************************************************************/
- +struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n)
- +{
- + struct bitmap *bm;
- +
- + bm = talloc_zero(mem_ctx, struct bitmap);
- +
- + if (!bm) return NULL;
- +
- + bm->n = n;
- + bm->b = talloc_zero_array(bm, uint32_t, (n+31)/32);
- + if (!bm->b) {
- + TALLOC_FREE(bm);
- + return NULL;
- + }
- + return bm;
- +}
- +
- +/****************************************************************************
- +copy as much of the source bitmap as will fit in the destination bitmap.
- +****************************************************************************/
- +
- +int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src)
- +{
- + int count = MIN(dst->n, src->n);
- +
- + SMB_ASSERT(dst->b != src->b);
- + memcpy(dst->b, src->b, sizeof(uint32_t)*((count+31)/32));
- +
- + return count;
- +}
- +
- +/****************************************************************************
- +set a bit in a bitmap
- +****************************************************************************/
- +bool bitmap_set(struct bitmap *bm, unsigned i)
- +{
- + if (i >= bm->n) {
- + DEBUG(0,("Setting invalid bitmap entry %d (of %d)\n",
- + i, bm->n));
- + return false;
- + }
- + bm->b[i/32] |= (1<<(i%32));
- + return true;
- +}
- +
- +/****************************************************************************
- +clear a bit in a bitmap
- +****************************************************************************/
- +bool bitmap_clear(struct bitmap *bm, unsigned i)
- +{
- + if (i >= bm->n) {
- + DEBUG(0,("clearing invalid bitmap entry %d (of %d)\n",
- + i, bm->n));
- + return false;
- + }
- + bm->b[i/32] &= ~(1<<(i%32));
- + return true;
- +}
- +
- +/****************************************************************************
- +query a bit in a bitmap
- +****************************************************************************/
- +bool bitmap_query(struct bitmap *bm, unsigned i)
- +{
- + if (i >= bm->n) return false;
- + if (bm->b[i/32] & (1<<(i%32))) {
- + return true;
- + }
- + return false;
- +}
- +
- +/****************************************************************************
- +find a zero bit in a bitmap starting at the specified offset, with
- +wraparound
- +****************************************************************************/
- +int bitmap_find(struct bitmap *bm, unsigned ofs)
- +{
- + unsigned int i, j;
- +
- + if (ofs > bm->n) ofs = 0;
- +
- + i = ofs;
- + while (i < bm->n) {
- + if (~(bm->b[i/32])) {
- + j = i;
- + do {
- + if (!bitmap_query(bm, j)) return j;
- + j++;
- + } while (j & 31 && j < bm->n);
- + }
- + i += 32;
- + i &= ~31;
- + }
- +
- + i = 0;
- + while (i < ofs) {
- + if (~(bm->b[i/32])) {
- + j = i;
- + do {
- + if (!bitmap_query(bm, j)) return j;
- + j++;
- + } while (j & 31 && j < bm->n);
- + }
- + i += 32;
- + i &= ~31;
- + }
- +
- + return -1;
- +}
- --- /dev/null
- +++ b/lib/util/bitmap.h
- @@ -0,0 +1,32 @@
- +/*
- + Unix SMB/CIFS implementation.
- + simple bitmap functions
- + Copyright (C) Andrew Tridgell 1992-1998
- +
- + 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/>.
- +*/
- +
- +/* The following definitions come from lib/bitmap.c */
- +
- +struct bitmap {
- + uint32_t *b;
- + unsigned int n;
- +};
- +
- +struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n);
- +int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src);
- +bool bitmap_set(struct bitmap *bm, unsigned i);
- +bool bitmap_clear(struct bitmap *bm, unsigned i);
- +bool bitmap_query(struct bitmap *bm, unsigned i);
- +int bitmap_find(struct bitmap *bm, unsigned ofs);
- --- a/lib/util/wscript_build
- +++ b/lib/util/wscript_build
- @@ -99,5 +99,11 @@ bld.SAMBA_LIBRARY('tdb-wrap',
- public_headers='tdb_wrap.h',
- private_library=True,
- local_include=False
- - )
- + )
- +
- +bld.SAMBA_LIBRARY('bitmap',
- + source='bitmap.c',
- + deps='talloc samba-util',
- + local_include=False,
- + private_library=True)
-
- --- a/source3/include/proto.h
- +++ b/source3/include/proto.h
- @@ -61,15 +61,6 @@ const char *audit_description_str(uint32
- bool get_audit_category_from_param(const char *param, uint32 *audit_category);
- const char *audit_policy_str(TALLOC_CTX *mem_ctx, uint32 policy);
-
- -/* The following definitions come from lib/bitmap.c */
- -
- -struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n);
- -int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src);
- -bool bitmap_set(struct bitmap *bm, unsigned i);
- -bool bitmap_clear(struct bitmap *bm, unsigned i);
- -bool bitmap_query(struct bitmap *bm, unsigned i);
- -int bitmap_find(struct bitmap *bm, unsigned ofs);
- -
- /* The following definitions come from lib/charcnv.c */
-
- char lp_failed_convert_char(void);
- --- a/source3/include/smb.h
- +++ b/source3/include/smb.h
- @@ -712,7 +712,6 @@ struct connections_data {
- uint32 unused_compatitibility_field;
- };
-
- -
- /* the following are used by loadparm for option lists */
- typedef enum {
- P_BOOL,P_BOOLREV,P_CHAR,P_INTEGER,P_OCTAL,P_LIST,
- @@ -759,11 +758,6 @@ struct parm_struct {
- #define FLAG_META 0x8000 /* A meta directive - not a real parameter */
- #define FLAG_CMDLINE 0x10000 /* option has been overridden */
-
- -struct bitmap {
- - uint32 *b;
- - unsigned int n;
- -};
- -
- /* offsets into message for common items */
- #define smb_com 8
- #define smb_rcls 9
- --- a/source3/modules/vfs_acl_common.c
- +++ b/source3/modules/vfs_acl_common.c
- @@ -23,6 +23,7 @@
- #include "system/filesys.h"
- #include "../libcli/security/security.h"
- #include "../librpc/gen_ndr/ndr_security.h"
- +#include "../lib/util/bitmap.h"
-
- static NTSTATUS create_acl_blob(const struct security_descriptor *psd,
- DATA_BLOB *pblob,
- --- a/source3/modules/vfs_full_audit.c
- +++ b/source3/modules/vfs_full_audit.c
- @@ -64,6 +64,7 @@
- #include "../librpc/gen_ndr/ndr_netlogon.h"
- #include "auth.h"
- #include "ntioctl.h"
- +#include "lib/util/bitmap.h"
-
- static int vfs_full_audit_debug_level = DBGC_VFS;
-
- --- a/source3/param/loadparm.c
- +++ b/source3/param/loadparm.c
- @@ -64,6 +64,7 @@
- #include "smb_signing.h"
- #include "dbwrap.h"
- #include "smbldap.h"
- +#include "../lib/util/bitmap.h"
-
- #ifdef HAVE_SYS_SYSCTL_H
- #include <sys/sysctl.h>
- --- a/source3/passdb/pdb_get_set.c
- +++ b/source3/passdb/pdb_get_set.c
- @@ -25,6 +25,7 @@
- #include "passdb.h"
- #include "../libcli/auth/libcli_auth.h"
- #include "../libcli/security/security.h"
- +#include "../lib/util/bitmap.h"
-
- #undef DBGC_CLASS
- #define DBGC_CLASS DBGC_PASSDB
- --- a/source3/smbd/conn.c
- +++ b/source3/smbd/conn.c
- @@ -23,6 +23,7 @@
- #include "smbd/smbd.h"
- #include "smbd/globals.h"
- #include "rpc_server/rpc_ncacn_np.h"
- +#include "lib/util/bitmap.h"
-
- /* The connections bitmap is expanded in increments of BITMAP_BLOCK_SZ. The
- * maximum size of the bitmap is the largest positive integer, but you will hit
- --- a/source3/smbd/dir.c
- +++ b/source3/smbd/dir.c
- @@ -23,6 +23,7 @@
- #include "smbd/smbd.h"
- #include "smbd/globals.h"
- #include "libcli/security/security.h"
- +#include "lib/util/bitmap.h"
-
- /*
- This module implements directory related functions for Samba.
- --- a/source3/smbd/files.c
- +++ b/source3/smbd/files.c
- @@ -22,6 +22,7 @@
- #include "smbd/globals.h"
- #include "libcli/security/security.h"
- #include "util_tdb.h"
- +#include "lib/util/bitmap.h"
-
- #define VALID_FNUM(fnum) (((fnum) >= 0) && ((fnum) < real_max_open_files))
-
- --- a/source3/smbd/smb2_server.c
- +++ b/source3/smbd/smb2_server.c
- @@ -26,6 +26,7 @@
- #include "../lib/tsocket/tsocket.h"
- #include "../lib/util/tevent_ntstatus.h"
- #include "smbprofile.h"
- +#include "../lib/util/bitmap.h"
-
- #define OUTVEC_ALLOC_SIZE (SMB2_HDR_BODY + 9)
-
- --- a/source3/rpc_client/cli_pipe.c
- +++ b/source3/rpc_client/cli_pipe.c
- @@ -28,6 +28,7 @@
- #include "../libcli/auth/ntlmssp.h"
- #include "ntlmssp_wrap.h"
- #include "librpc/gen_ndr/ndr_dcerpc.h"
- +#include "librpc/gen_ndr/ndr_netlogon_c.h"
- #include "librpc/rpc/dcerpc.h"
- #include "librpc/crypto/gse.h"
- #include "librpc/crypto/spnego.h"
- @@ -399,6 +400,7 @@ static NTSTATUS cli_pipe_validate_curren
- struct ncacn_packet *pkt,
- DATA_BLOB *pdu,
- uint8_t expected_pkt_type,
- + uint32_t call_id,
- DATA_BLOB *rdata,
- DATA_BLOB *reply_pdu)
- {
- @@ -497,7 +499,7 @@ static NTSTATUS cli_pipe_validate_curren
- "from %s!\n",
- (unsigned int)pkt->ptype,
- rpccli_pipe_txt(talloc_tos(), cli)));
- - return NT_STATUS_INVALID_INFO_CLASS;
- + return NT_STATUS_RPC_PROTOCOL_ERROR;
- }
-
- if (pkt->ptype != expected_pkt_type) {
- @@ -505,7 +507,15 @@ static NTSTATUS cli_pipe_validate_curren
- "RPC packet type - %u, not %u\n",
- rpccli_pipe_txt(talloc_tos(), cli),
- pkt->ptype, expected_pkt_type));
- - return NT_STATUS_INVALID_INFO_CLASS;
- + return NT_STATUS_RPC_PROTOCOL_ERROR;
- + }
- +
- + if (pkt->call_id != call_id) {
- + DEBUG(3, (__location__ ": Connection to %s got an unexpected "
- + "RPC call_id - %u, not %u\n",
- + rpccli_pipe_txt(talloc_tos(), cli),
- + pkt->call_id, call_id));
- + return NT_STATUS_RPC_PROTOCOL_ERROR;
- }
-
- /* Do this just before return - we don't want to modify any rpc header
- @@ -898,6 +908,7 @@ static void rpc_api_pipe_got_pdu(struct
- state->cli, state->pkt,
- &state->incoming_frag,
- state->expected_pkt_type,
- + state->call_id,
- &rdata,
- &state->reply_pdu);
-
- @@ -1269,12 +1280,17 @@ struct rpc_api_pipe_req_state {
- uint32_t call_id;
- DATA_BLOB *req_data;
- uint32_t req_data_sent;
- + DATA_BLOB req_trailer;
- + uint32_t req_trailer_sent;
- + bool verify_bitmask1;
- + bool verify_pcontext;
- DATA_BLOB rpc_out;
- DATA_BLOB reply_pdu;
- };
-
- static void rpc_api_pipe_req_write_done(struct tevent_req *subreq);
- static void rpc_api_pipe_req_done(struct tevent_req *subreq);
- +static NTSTATUS prepare_verification_trailer(struct rpc_api_pipe_req_state *state);
- static NTSTATUS prepare_next_frag(struct rpc_api_pipe_req_state *state,
- bool *is_last_frag);
-
- @@ -1310,6 +1326,11 @@ struct tevent_req *rpc_api_pipe_req_send
- goto post_status;
- }
-
- + status = prepare_verification_trailer(state);
- + if (!NT_STATUS_IS_OK(status)) {
- + goto post_status;
- + }
- +
- status = prepare_next_frag(state, &is_last_frag);
- if (!NT_STATUS_IS_OK(status)) {
- goto post_status;
- @@ -1344,25 +1365,161 @@ struct tevent_req *rpc_api_pipe_req_send
- return NULL;
- }
-
- +static NTSTATUS prepare_verification_trailer(struct rpc_api_pipe_req_state *state)
- +{
- + struct pipe_auth_data *a = state->cli->auth;
- + struct dcerpc_sec_verification_trailer *t;
- + struct dcerpc_sec_vt *c = NULL;
- + struct ndr_push *ndr = NULL;
- + enum ndr_err_code ndr_err;
- + size_t align = 0;
- + size_t pad = 0;
- +
- + if (a == NULL) {
- + return NT_STATUS_OK;
- + }
- +
- + if (a->auth_level < DCERPC_AUTH_LEVEL_INTEGRITY) {
- + return NT_STATUS_OK;
- + }
- +
- + t = talloc_zero(state, struct dcerpc_sec_verification_trailer);
- + if (t == NULL) {
- + return NT_STATUS_NO_MEMORY;
- + }
- +
- + if (!a->verified_bitmask1) {
- + t->commands = talloc_realloc(t, t->commands,
- + struct dcerpc_sec_vt,
- + t->count.count + 1);
- + if (t->commands == NULL) {
- + return NT_STATUS_NO_MEMORY;
- + }
- + c = &t->commands[t->count.count++];
- + ZERO_STRUCTP(c);
- +
- + c->command = DCERPC_SEC_VT_COMMAND_BITMASK1;
- + state->verify_bitmask1 = true;
- + }
- +
- + if (!state->cli->verified_pcontext) {
- + t->commands = talloc_realloc(t, t->commands,
- + struct dcerpc_sec_vt,
- + t->count.count + 1);
- + if (t->commands == NULL) {
- + return NT_STATUS_NO_MEMORY;
- + }
- + c = &t->commands[t->count.count++];
- + ZERO_STRUCTP(c);
- +
- + c->command = DCERPC_SEC_VT_COMMAND_PCONTEXT;
- + c->u.pcontext.abstract_syntax = state->cli->abstract_syntax;
- + c->u.pcontext.transfer_syntax = state->cli->transfer_syntax;
- +
- + state->verify_pcontext = true;
- + }
- +
- + if (true) { /* We do not support header signing */
- + t->commands = talloc_realloc(t, t->commands,
- + struct dcerpc_sec_vt,
- + t->count.count + 1);
- + if (t->commands == NULL) {
- + return NT_STATUS_NO_MEMORY;
- + }
- + c = &t->commands[t->count.count++];
- + ZERO_STRUCTP(c);
- +
- + c->command = DCERPC_SEC_VT_COMMAND_HEADER2;
- + c->u.header2.ptype = DCERPC_PKT_REQUEST;
- + c->u.header2.drep[0] = DCERPC_DREP_LE;
- + c->u.header2.drep[1] = 0;
- + c->u.header2.drep[2] = 0;
- + c->u.header2.drep[3] = 0;
- + c->u.header2.call_id = state->call_id;
- + c->u.header2.context_id = 0;
- + c->u.header2.opnum = state->op_num;
- + }
- +
- + if (t->count.count == 0) {
- + TALLOC_FREE(t);
- + return NT_STATUS_OK;
- + }
- +
- + c = &t->commands[t->count.count - 1];
- + c->command |= DCERPC_SEC_VT_COMMAND_END;
- +
- + if (DEBUGLEVEL >= 10) {
- + NDR_PRINT_DEBUG(dcerpc_sec_verification_trailer, t);
- + }
- +
- + ndr = ndr_push_init_ctx(state);
- + if (ndr == NULL) {
- + return NT_STATUS_NO_MEMORY;
- + }
- +
- + ndr_err = ndr_push_dcerpc_sec_verification_trailer(ndr,
- + NDR_SCALARS | NDR_BUFFERS,
- + t);
- + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- + return ndr_map_error2ntstatus(ndr_err);
- + }
- + state->req_trailer = ndr_push_blob(ndr);
- +
- + align = state->req_data->length & 0x3;
- + if (align > 0) {
- + pad = 4 - align;
- + }
- + if (pad > 0) {
- + bool ok;
- + uint8_t *p;
- + const uint8_t zeros[4] = { 0, };
- +
- + ok = data_blob_append(ndr, &state->req_trailer, zeros, pad);
- + if (!ok) {
- + return NT_STATUS_NO_MEMORY;
- + }
- +
- + /* move the padding to the start */
- + p = state->req_trailer.data;
- + memmove(p + pad, p, state->req_trailer.length - pad);
- + memset(p, 0, pad);
- + }
- +
- + return NT_STATUS_OK;
- +}
- +
- static NTSTATUS prepare_next_frag(struct rpc_api_pipe_req_state *state,
- bool *is_last_frag)
- {
- - size_t data_sent_thistime;
- size_t auth_len;
- size_t frag_len;
- uint8_t flags = 0;
- size_t pad_len;
- size_t data_left;
- + size_t data_thistime;
- + size_t trailer_left;
- + size_t trailer_thistime = 0;
- + size_t total_left;
- + size_t total_thistime;
- NTSTATUS status;
- + bool ok;
- union dcerpc_payload u;
-
- data_left = state->req_data->length - state->req_data_sent;
- + trailer_left = state->req_trailer.length - state->req_trailer_sent;
- + total_left = data_left + trailer_left;
- + if ((total_left < data_left) || (total_left < trailer_left)) {
- + /*
- + * overflow
- + */
- + return NT_STATUS_INVALID_PARAMETER_MIX;
- + }
-
- status = dcerpc_guess_sizes(state->cli->auth,
- - DCERPC_REQUEST_LENGTH, data_left,
- + DCERPC_REQUEST_LENGTH, total_left,
- state->cli->max_xmit_frag,
- CLIENT_NDR_PADDING_SIZE,
- - &data_sent_thistime,
- + &total_thistime,
- &frag_len, &auth_len, &pad_len);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- @@ -1372,15 +1529,20 @@ static NTSTATUS prepare_next_frag(struct
- flags = DCERPC_PFC_FLAG_FIRST;
- }
-
- - if (data_sent_thistime == data_left) {
- + if (total_thistime == total_left) {
- flags |= DCERPC_PFC_FLAG_LAST;
- }
-
- + data_thistime = MIN(total_thistime, data_left);
- + if (data_thistime < total_thistime) {
- + trailer_thistime = total_thistime - data_thistime;
- + }
- +
- data_blob_free(&state->rpc_out);
-
- ZERO_STRUCT(u.request);
-
- - u.request.alloc_hint = state->req_data->length;
- + u.request.alloc_hint = total_left;
- u.request.context_id = 0;
- u.request.opnum = state->op_num;
-
- @@ -1400,11 +1562,26 @@ static NTSTATUS prepare_next_frag(struct
- * at this stage */
- dcerpc_set_frag_length(&state->rpc_out, frag_len);
-
- - /* Copy in the data. */
- - if (!data_blob_append(NULL, &state->rpc_out,
- + if (data_thistime > 0) {
- + /* Copy in the data. */
- + ok = data_blob_append(NULL, &state->rpc_out,
- state->req_data->data + state->req_data_sent,
- - data_sent_thistime)) {
- - return NT_STATUS_NO_MEMORY;
- + data_thistime);
- + if (!ok) {
- + return NT_STATUS_NO_MEMORY;
- + }
- + state->req_data_sent += data_thistime;
- + }
- +
- + if (trailer_thistime > 0) {
- + /* Copy in the verification trailer. */
- + ok = data_blob_append(NULL, &state->rpc_out,
- + state->req_trailer.data + state->req_trailer_sent,
- + trailer_thistime);
- + if (!ok) {
- + return NT_STATUS_NO_MEMORY;
- + }
- + state->req_trailer_sent += trailer_thistime;
- }
-
- switch (state->cli->auth->auth_level) {
- @@ -1424,7 +1601,6 @@ static NTSTATUS prepare_next_frag(struct
- return NT_STATUS_INVALID_PARAMETER;
- }
-
- - state->req_data_sent += data_sent_thistime;
- *is_last_frag = ((flags & DCERPC_PFC_FLAG_LAST) != 0);
-
- return status;
- @@ -1488,6 +1664,20 @@ static void rpc_api_pipe_req_done(struct
- tevent_req_nterror(req, status);
- return;
- }
- +
- + if (state->cli->auth == NULL) {
- + tevent_req_done(req);
- + return;
- + }
- +
- + if (state->verify_bitmask1) {
- + state->cli->auth->verified_bitmask1 = true;
- + }
- +
- + if (state->verify_pcontext) {
- + state->cli->verified_pcontext = true;
- + }
- +
- tevent_req_done(req);
- }
-
- @@ -1647,9 +1837,15 @@ struct rpc_pipe_bind_state {
- DATA_BLOB rpc_out;
- bool auth3;
- uint32_t rpc_call_id;
- + struct netr_Authenticator auth;
- + struct netr_Authenticator return_auth;
- + struct netlogon_creds_CredentialState *creds;
- + union netr_Capabilities capabilities;
- + struct netr_LogonGetCapabilities r;
- };
-
- static void rpc_pipe_bind_step_one_done(struct tevent_req *subreq);
- +static void rpc_pipe_bind_step_two_trigger(struct tevent_req *req);
- static NTSTATUS rpc_bind_next_send(struct tevent_req *req,
- struct rpc_pipe_bind_state *state,
- DATA_BLOB *credentials);
- @@ -1753,11 +1949,14 @@ static void rpc_pipe_bind_step_one_done(
-
- case DCERPC_AUTH_TYPE_NONE:
- case DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM:
- - case DCERPC_AUTH_TYPE_SCHANNEL:
- /* Bind complete. */
- tevent_req_done(req);
- return;
-
- + case DCERPC_AUTH_TYPE_SCHANNEL:
- + rpc_pipe_bind_step_two_trigger(req);
- + return;
- +
- case DCERPC_AUTH_TYPE_NTLMSSP:
- case DCERPC_AUTH_TYPE_SPNEGO:
- case DCERPC_AUTH_TYPE_KRB5:
- @@ -1869,6 +2068,153 @@ err_out:
- tevent_req_nterror(req, NT_STATUS_INTERNAL_ERROR);
- }
-
- +static void rpc_pipe_bind_step_two_done(struct tevent_req *subreq);
- +
- +static void rpc_pipe_bind_step_two_trigger(struct tevent_req *req)
- +{
- + struct rpc_pipe_bind_state *state =
- + tevent_req_data(req,
- + struct rpc_pipe_bind_state);
- + struct dcerpc_binding_handle *b = state->cli->binding_handle;
- + struct schannel_state *schannel_auth =
- + talloc_get_type_abort(state->cli->auth->auth_ctx,
- + struct schannel_state);
- + struct tevent_req *subreq;
- +
- + if (schannel_auth == NULL ||
- + !ndr_syntax_id_equal(&state->cli->abstract_syntax,
- + &ndr_table_netlogon.syntax_id)) {
- + tevent_req_done(req);
- + return;
- + }
- +
- + ZERO_STRUCT(state->return_auth);
- +
- + state->creds = netlogon_creds_copy(state, schannel_auth->creds);
- + if (state->creds == NULL) {
- + tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
- + return;
- + }
- +
- + netlogon_creds_client_authenticator(state->creds, &state->auth);
- +
- + state->r.in.server_name = state->cli->srv_name_slash;
- + state->r.in.computer_name = state->creds->computer_name;
- + state->r.in.credential = &state->auth;
- + state->r.in.query_level = 1;
- + state->r.in.return_authenticator = &state->return_auth;
- +
- + state->r.out.capabilities = &state->capabilities;
- + state->r.out.return_authenticator = &state->return_auth;
- +
- + subreq = dcerpc_netr_LogonGetCapabilities_r_send(talloc_tos(),
- + state->ev,
- + b,
- + &state->r);
- + if (subreq == NULL) {
- + tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
- + return;
- + }
- +
- + tevent_req_set_callback(subreq, rpc_pipe_bind_step_two_done, req);
- + return;
- +}
- +
- +static void rpc_pipe_bind_step_two_done(struct tevent_req *subreq)
- +{
- + struct tevent_req *req =
- + tevent_req_callback_data(subreq,
- + struct tevent_req);
- + struct rpc_pipe_bind_state *state =
- + tevent_req_data(req,
- + struct rpc_pipe_bind_state);
- + struct schannel_state *schannel_auth =
- + talloc_get_type_abort(state->cli->auth->auth_ctx,
- + struct schannel_state);
- + NTSTATUS status;
- +
- + status = dcerpc_netr_LogonGetCapabilities_r_recv(subreq, talloc_tos());
- + TALLOC_FREE(subreq);
- + if (NT_STATUS_EQUAL(status, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE)) {
- + if (state->cli->dc->negotiate_flags &
- + NETLOGON_NEG_SUPPORTS_AES) {
- + DEBUG(5, ("AES is not supported and the error was %s\n",
- + nt_errstr(status)));
- + tevent_req_nterror(req,
- + NT_STATUS_INVALID_NETWORK_RESPONSE);
- + return;
- + }
- +
- + /* This is probably NT */
- + DEBUG(5, ("We are checking against an NT - %s\n",
- + nt_errstr(status)));
- + tevent_req_done(req);
- + return;
- + } else if (!NT_STATUS_IS_OK(status)) {
- + DEBUG(0, ("dcerpc_netr_LogonGetCapabilities_r_recv failed with %s\n",
- + nt_errstr(status)));
- + tevent_req_nterror(req, status);
- + return;
- + }
- +
- + if (NT_STATUS_EQUAL(state->r.out.result, NT_STATUS_NOT_IMPLEMENTED)) {
- + if (state->creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
- + /* This means AES isn't supported. */
- + DEBUG(5, ("AES is not supported and the error was %s\n",
- + nt_errstr(state->r.out.result)));
- + tevent_req_nterror(req,
- + NT_STATUS_INVALID_NETWORK_RESPONSE);
- + return;
- + }
- +
- + /* This is probably an old Samba version */
- + DEBUG(5, ("We are checking against an old Samba version - %s\n",
- + nt_errstr(state->r.out.result)));
- + tevent_req_done(req);
- + return;
- + }
- +
- + /* We need to check the credential state here, cause win2k3 and earlier
- + * returns NT_STATUS_NOT_IMPLEMENTED */
- + if (!netlogon_creds_client_check(state->creds,
- + &state->r.out.return_authenticator->cred)) {
- + /*
- + * Server replied with bad credential. Fail.
- + */
- + DEBUG(0,("rpc_pipe_bind_step_two_done: server %s "
- + "replied with bad credential\n",
- + state->cli->desthost));
- + tevent_req_nterror(req, NT_STATUS_UNSUCCESSFUL);
- + return;
- + }
- +
- + TALLOC_FREE(schannel_auth->creds);
- + schannel_auth->creds = talloc_steal(state->cli, state->creds);
- +
- + if (!NT_STATUS_IS_OK(state->r.out.result)) {
- + DEBUG(0, ("dcerpc_netr_LogonGetCapabilities_r_recv failed with %s\n",
- + nt_errstr(state->r.out.result)));
- + tevent_req_nterror(req, state->r.out.result);
- + return;
- + }
- +
- + if (state->creds->negotiate_flags !=
- + state->r.out.capabilities->server_capabilities) {
- + DEBUG(0, ("The client capabilities don't match the server "
- + "capabilities: local[0x%08X] remote[0x%08X]\n",
- + state->creds->negotiate_flags,
- + state->capabilities.server_capabilities));
- + tevent_req_nterror(req,
- + NT_STATUS_INVALID_NETWORK_RESPONSE);
- + return;
- + }
- +
- + /* TODO: Add downgrade dectection. */
- +
- + tevent_req_done(req);
- + return;
- +}
- +
- static NTSTATUS rpc_bind_next_send(struct tevent_req *req,
- struct rpc_pipe_bind_state *state,
- DATA_BLOB *auth_token)
- --- a/source3/librpc/rpc/dcerpc.h
- +++ b/source3/librpc/rpc/dcerpc.h
- @@ -39,6 +39,7 @@ struct NL_AUTH_MESSAGE;
- struct pipe_auth_data {
- enum dcerpc_AuthType auth_type;
- enum dcerpc_AuthLevel auth_level;
- + bool verified_bitmask1;
-
- void *auth_ctx;
-
- --- a/source3/rpc_client/rpc_client.h
- +++ b/source3/rpc_client/rpc_client.h
- @@ -39,6 +39,7 @@ struct rpc_pipe_client {
-
- struct ndr_syntax_id abstract_syntax;
- struct ndr_syntax_id transfer_syntax;
- + bool verified_pcontext;
-
- char *desthost;
- char *srv_name_slash;
- --- /dev/null
- +++ b/librpc/ndr/ndr_dcerpc.h
- @@ -0,0 +1,25 @@
- +/*
- + Unix SMB/CIFS implementation.
- +
- + Manually parsed structures found in the DCERPC protocol
- +
- + Copyright (C) Stefan Metzmacher 2014
- + Copyright (C) Gregor Beck 2014
- +
- + 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/>.
- +*/
- +
- +enum ndr_err_code ndr_pop_dcerpc_sec_verification_trailer(
- + struct ndr_pull *ndr, TALLOC_CTX *mem_ctx,
- + struct dcerpc_sec_verification_trailer **_r);
- --- /dev/null
- +++ b/librpc/ABI/ndr-0.0.3.sigs
- @@ -0,0 +1,251 @@
- +GUID_all_zero: bool (const struct GUID *)
- +GUID_compare: int (const struct GUID *, const struct GUID *)
- +GUID_equal: bool (const struct GUID *, const struct GUID *)
- +GUID_from_data_blob: NTSTATUS (const DATA_BLOB *, struct GUID *)
- +GUID_from_ndr_blob: NTSTATUS (const DATA_BLOB *, struct GUID *)
- +GUID_from_string: NTSTATUS (const char *, struct GUID *)
- +GUID_hexstring: char *(TALLOC_CTX *, const struct GUID *)
- +GUID_random: struct GUID (void)
- +GUID_string: char *(TALLOC_CTX *, const struct GUID *)
- +GUID_string2: char *(TALLOC_CTX *, const struct GUID *)
- +GUID_to_ndr_blob: NTSTATUS (const struct GUID *, TALLOC_CTX *, DATA_BLOB *)
- +GUID_zero: struct GUID (void)
- +ndr_align_size: size_t (uint32_t, size_t)
- +ndr_charset_length: uint32_t (const void *, charset_t)
- +ndr_check_array_length: enum ndr_err_code (struct ndr_pull *, void *, uint32_t)
- +ndr_check_array_size: enum ndr_err_code (struct ndr_pull *, void *, uint32_t)
- +ndr_check_padding: void (struct ndr_pull *, size_t)
- +ndr_check_pipe_chunk_trailer: enum ndr_err_code (struct ndr_pull *, int, uint32_t)
- +ndr_check_string_terminator: enum ndr_err_code (struct ndr_pull *, uint32_t, uint32_t)
- +ndr_get_array_length: uint32_t (struct ndr_pull *, const void *)
- +ndr_get_array_size: uint32_t (struct ndr_pull *, const void *)
- +ndr_map_error2errno: int (enum ndr_err_code)
- +ndr_map_error2ntstatus: NTSTATUS (enum ndr_err_code)
- +ndr_map_error2string: const char *(enum ndr_err_code)
- +ndr_policy_handle_empty: bool (const struct policy_handle *)
- +ndr_policy_handle_equal: bool (const struct policy_handle *, const struct policy_handle *)
- +ndr_print_DATA_BLOB: void (struct ndr_print *, const char *, DATA_BLOB)
- +ndr_print_GUID: void (struct ndr_print *, const char *, const struct GUID *)
- +ndr_print_KRB5_EDATA_NTSTATUS: void (struct ndr_print *, const char *, const struct KRB5_EDATA_NTSTATUS *)
- +ndr_print_NTSTATUS: void (struct ndr_print *, const char *, NTSTATUS)
- +ndr_print_NTTIME: void (struct ndr_print *, const char *, NTTIME)
- +ndr_print_NTTIME_1sec: void (struct ndr_print *, const char *, NTTIME)
- +ndr_print_NTTIME_hyper: void (struct ndr_print *, const char *, NTTIME)
- +ndr_print_WERROR: void (struct ndr_print *, const char *, WERROR)
- +ndr_print_array_uint8: void (struct ndr_print *, const char *, const uint8_t *, uint32_t)
- +ndr_print_bad_level: void (struct ndr_print *, const char *, uint16_t)
- +ndr_print_bitmap_flag: void (struct ndr_print *, size_t, const char *, uint32_t, uint32_t)
- +ndr_print_bool: void (struct ndr_print *, const char *, const bool)
- +ndr_print_debug: void (ndr_print_fn_t, const char *, void *)
- +ndr_print_debug_helper: void (struct ndr_print *, const char *, ...)
- +ndr_print_debugc: void (int, ndr_print_fn_t, const char *, void *)
- +ndr_print_debugc_helper: void (struct ndr_print *, const char *, ...)
- +ndr_print_dlong: void (struct ndr_print *, const char *, int64_t)
- +ndr_print_double: void (struct ndr_print *, const char *, double)
- +ndr_print_enum: void (struct ndr_print *, const char *, const char *, const char *, uint32_t)
- +ndr_print_function_debug: void (ndr_print_function_t, const char *, int, void *)
- +ndr_print_function_string: char *(TALLOC_CTX *, ndr_print_function_t, const char *, int, void *)
- +ndr_print_get_switch_value: uint32_t (struct ndr_print *, const void *)
- +ndr_print_gid_t: void (struct ndr_print *, const char *, gid_t)
- +ndr_print_hyper: void (struct ndr_print *, const char *, uint64_t)
- +ndr_print_int16: void (struct ndr_print *, const char *, int16_t)
- +ndr_print_int32: void (struct ndr_print *, const char *, int32_t)
- +ndr_print_int3264: void (struct ndr_print *, const char *, int32_t)
- +ndr_print_int8: void (struct ndr_print *, const char *, int8_t)
- +ndr_print_ipv4address: void (struct ndr_print *, const char *, const char *)
- +ndr_print_ipv6address: void (struct ndr_print *, const char *, const char *)
- +ndr_print_ndr_syntax_id: void (struct ndr_print *, const char *, const struct ndr_syntax_id *)
- +ndr_print_netr_SamDatabaseID: void (struct ndr_print *, const char *, enum netr_SamDatabaseID)
- +ndr_print_netr_SchannelType: void (struct ndr_print *, const char *, enum netr_SchannelType)
- +ndr_print_null: void (struct ndr_print *)
- +ndr_print_pointer: void (struct ndr_print *, const char *, void *)
- +ndr_print_policy_handle: void (struct ndr_print *, const char *, const struct policy_handle *)
- +ndr_print_printf_helper: void (struct ndr_print *, const char *, ...)
- +ndr_print_ptr: void (struct ndr_print *, const char *, const void *)
- +ndr_print_set_switch_value: enum ndr_err_code (struct ndr_print *, const void *, uint32_t)
- +ndr_print_sockaddr_storage: void (struct ndr_print *, const char *, const struct sockaddr_storage *)
- +ndr_print_string: void (struct ndr_print *, const char *, const char *)
- +ndr_print_string_array: void (struct ndr_print *, const char *, const char **)
- +ndr_print_string_helper: void (struct ndr_print *, const char *, ...)
- +ndr_print_struct: void (struct ndr_print *, const char *, const char *)
- +ndr_print_struct_string: char *(TALLOC_CTX *, ndr_print_fn_t, const char *, void *)
- +ndr_print_svcctl_ServerType: void (struct ndr_print *, const char *, uint32_t)
- +ndr_print_time_t: void (struct ndr_print *, const char *, time_t)
- +ndr_print_timespec: void (struct ndr_print *, const char *, const struct timespec *)
- +ndr_print_timeval: void (struct ndr_print *, const char *, const struct timeval *)
- +ndr_print_udlong: void (struct ndr_print *, const char *, uint64_t)
- +ndr_print_udlongr: void (struct ndr_print *, const char *, uint64_t)
- +ndr_print_uid_t: void (struct ndr_print *, const char *, uid_t)
- +ndr_print_uint16: void (struct ndr_print *, const char *, uint16_t)
- +ndr_print_uint32: void (struct ndr_print *, const char *, uint32_t)
- +ndr_print_uint3264: void (struct ndr_print *, const char *, uint32_t)
- +ndr_print_uint8: void (struct ndr_print *, const char *, uint8_t)
- +ndr_print_union: void (struct ndr_print *, const char *, int, const char *)
- +ndr_print_union_debug: void (ndr_print_fn_t, const char *, uint32_t, void *)
- +ndr_print_union_string: char *(TALLOC_CTX *, ndr_print_fn_t, const char *, uint32_t, void *)
- +ndr_print_winreg_Data: void (struct ndr_print *, const char *, const union winreg_Data *)
- +ndr_print_winreg_Type: void (struct ndr_print *, const char *, enum winreg_Type)
- +ndr_pull_DATA_BLOB: enum ndr_err_code (struct ndr_pull *, int, DATA_BLOB *)
- +ndr_pull_GUID: enum ndr_err_code (struct ndr_pull *, int, struct GUID *)
- +ndr_pull_KRB5_EDATA_NTSTATUS: enum ndr_err_code (struct ndr_pull *, int, struct KRB5_EDATA_NTSTATUS *)
- +ndr_pull_NTSTATUS: enum ndr_err_code (struct ndr_pull *, int, NTSTATUS *)
- +ndr_pull_NTTIME: enum ndr_err_code (struct ndr_pull *, int, NTTIME *)
- +ndr_pull_NTTIME_1sec: enum ndr_err_code (struct ndr_pull *, int, NTTIME *)
- +ndr_pull_NTTIME_hyper: enum ndr_err_code (struct ndr_pull *, int, NTTIME *)
- +ndr_pull_WERROR: enum ndr_err_code (struct ndr_pull *, int, WERROR *)
- +ndr_pull_advance: enum ndr_err_code (struct ndr_pull *, uint32_t)
- +ndr_pull_align: enum ndr_err_code (struct ndr_pull *, size_t)
- +ndr_pull_append: enum ndr_err_code (struct ndr_pull *, DATA_BLOB *)
- +ndr_pull_array_length: enum ndr_err_code (struct ndr_pull *, const void *)
- +ndr_pull_array_size: enum ndr_err_code (struct ndr_pull *, const void *)
- +ndr_pull_array_uint8: enum ndr_err_code (struct ndr_pull *, int, uint8_t *, uint32_t)
- +ndr_pull_bytes: enum ndr_err_code (struct ndr_pull *, uint8_t *, uint32_t)
- +ndr_pull_charset: enum ndr_err_code (struct ndr_pull *, int, const char **, uint32_t, uint8_t, charset_t)
- +ndr_pull_charset_to_null: enum ndr_err_code (struct ndr_pull *, int, const char **, uint32_t, uint8_t, charset_t)
- +ndr_pull_dlong: enum ndr_err_code (struct ndr_pull *, int, int64_t *)
- +ndr_pull_double: enum ndr_err_code (struct ndr_pull *, int, double *)
- +ndr_pull_enum_uint16: enum ndr_err_code (struct ndr_pull *, int, uint16_t *)
- +ndr_pull_enum_uint1632: enum ndr_err_code (struct ndr_pull *, int, uint16_t *)
- +ndr_pull_enum_uint32: enum ndr_err_code (struct ndr_pull *, int, uint32_t *)
- +ndr_pull_enum_uint8: enum ndr_err_code (struct ndr_pull *, int, uint8_t *)
- +ndr_pull_error: enum ndr_err_code (struct ndr_pull *, enum ndr_err_code, const char *, ...)
- +ndr_pull_generic_ptr: enum ndr_err_code (struct ndr_pull *, uint32_t *)
- +ndr_pull_get_relative_base_offset: uint32_t (struct ndr_pull *)
- +ndr_pull_get_switch_value: uint32_t (struct ndr_pull *, const void *)
- +ndr_pull_gid_t: enum ndr_err_code (struct ndr_pull *, int, gid_t *)
- +ndr_pull_hyper: enum ndr_err_code (struct ndr_pull *, int, uint64_t *)
- +ndr_pull_init_blob: struct ndr_pull *(const DATA_BLOB *, TALLOC_CTX *)
- +ndr_pull_int16: enum ndr_err_code (struct ndr_pull *, int, int16_t *)
- +ndr_pull_int32: enum ndr_err_code (struct ndr_pull *, int, int32_t *)
- +ndr_pull_int8: enum ndr_err_code (struct ndr_pull *, int, int8_t *)
- +ndr_pull_ipv4address: enum ndr_err_code (struct ndr_pull *, int, const char **)
- +ndr_pull_ipv6address: enum ndr_err_code (struct ndr_pull *, int, const char **)
- +ndr_pull_ndr_syntax_id: enum ndr_err_code (struct ndr_pull *, int, struct ndr_syntax_id *)
- +ndr_pull_netr_SamDatabaseID: enum ndr_err_code (struct ndr_pull *, int, enum netr_SamDatabaseID *)
- +ndr_pull_netr_SchannelType: enum ndr_err_code (struct ndr_pull *, int, enum netr_SchannelType *)
- +ndr_pull_pointer: enum ndr_err_code (struct ndr_pull *, int, void **)
- +ndr_pull_policy_handle: enum ndr_err_code (struct ndr_pull *, int, struct policy_handle *)
- +ndr_pull_pop: enum ndr_err_code (struct ndr_pull *)
- +ndr_pull_ref_ptr: enum ndr_err_code (struct ndr_pull *, uint32_t *)
- +ndr_pull_relative_ptr1: enum ndr_err_code (struct ndr_pull *, const void *, uint32_t)
- +ndr_pull_relative_ptr2: enum ndr_err_code (struct ndr_pull *, const void *)
- +ndr_pull_relative_ptr_short: enum ndr_err_code (struct ndr_pull *, uint16_t *)
- +ndr_pull_restore_relative_base_offset: void (struct ndr_pull *, uint32_t)
- +ndr_pull_set_switch_value: enum ndr_err_code (struct ndr_pull *, const void *, uint32_t)
- +ndr_pull_setup_relative_base_offset1: enum ndr_err_code (struct ndr_pull *, const void *, uint32_t)
- +ndr_pull_setup_relative_base_offset2: enum ndr_err_code (struct ndr_pull *, const void *)
- +ndr_pull_string: enum ndr_err_code (struct ndr_pull *, int, const char **)
- +ndr_pull_string_array: enum ndr_err_code (struct ndr_pull *, int, const char ***)
- +ndr_pull_struct_blob: enum ndr_err_code (const DATA_BLOB *, TALLOC_CTX *, void *, ndr_pull_flags_fn_t)
- +ndr_pull_struct_blob_all: enum ndr_err_code (const DATA_BLOB *, TALLOC_CTX *, void *, ndr_pull_flags_fn_t)
- +ndr_pull_subcontext_end: enum ndr_err_code (struct ndr_pull *, struct ndr_pull *, size_t, ssize_t)
- +ndr_pull_subcontext_start: enum ndr_err_code (struct ndr_pull *, struct ndr_pull **, size_t, ssize_t)
- +ndr_pull_svcctl_ServerType: enum ndr_err_code (struct ndr_pull *, int, uint32_t *)
- +ndr_pull_time_t: enum ndr_err_code (struct ndr_pull *, int, time_t *)
- +ndr_pull_timespec: enum ndr_err_code (struct ndr_pull *, int, struct timespec *)
- +ndr_pull_timeval: enum ndr_err_code (struct ndr_pull *, int, struct timeval *)
- +ndr_pull_trailer_align: enum ndr_err_code (struct ndr_pull *, size_t)
- +ndr_pull_udlong: enum ndr_err_code (struct ndr_pull *, int, uint64_t *)
- +ndr_pull_udlongr: enum ndr_err_code (struct ndr_pull *, int, uint64_t *)
- +ndr_pull_uid_t: enum ndr_err_code (struct ndr_pull *, int, uid_t *)
- +ndr_pull_uint16: enum ndr_err_code (struct ndr_pull *, int, uint16_t *)
- +ndr_pull_uint1632: enum ndr_err_code (struct ndr_pull *, int, uint16_t *)
- +ndr_pull_uint32: enum ndr_err_code (struct ndr_pull *, int, uint32_t *)
- +ndr_pull_uint3264: enum ndr_err_code (struct ndr_pull *, int, uint32_t *)
- +ndr_pull_uint8: enum ndr_err_code (struct ndr_pull *, int, uint8_t *)
- +ndr_pull_union_align: enum ndr_err_code (struct ndr_pull *, size_t)
- +ndr_pull_union_blob: enum ndr_err_code (const DATA_BLOB *, TALLOC_CTX *, void *, uint32_t, ndr_pull_flags_fn_t)
- +ndr_pull_union_blob_all: enum ndr_err_code (const DATA_BLOB *, TALLOC_CTX *, void *, uint32_t, ndr_pull_flags_fn_t)
- +ndr_pull_winreg_Data: enum ndr_err_code (struct ndr_pull *, int, union winreg_Data *)
- +ndr_pull_winreg_Type: enum ndr_err_code (struct ndr_pull *, int, enum winreg_Type *)
- +ndr_push_DATA_BLOB: enum ndr_err_code (struct ndr_push *, int, DATA_BLOB)
- +ndr_push_GUID: enum ndr_err_code (struct ndr_push *, int, const struct GUID *)
- +ndr_push_KRB5_EDATA_NTSTATUS: enum ndr_err_code (struct ndr_push *, int, const struct KRB5_EDATA_NTSTATUS *)
- +ndr_push_NTSTATUS: enum ndr_err_code (struct ndr_push *, int, NTSTATUS)
- +ndr_push_NTTIME: enum ndr_err_code (struct ndr_push *, int, NTTIME)
- +ndr_push_NTTIME_1sec: enum ndr_err_code (struct ndr_push *, int, NTTIME)
- +ndr_push_NTTIME_hyper: enum ndr_err_code (struct ndr_push *, int, NTTIME)
- +ndr_push_WERROR: enum ndr_err_code (struct ndr_push *, int, WERROR)
- +ndr_push_align: enum ndr_err_code (struct ndr_push *, size_t)
- +ndr_push_array_uint8: enum ndr_err_code (struct ndr_push *, int, const uint8_t *, uint32_t)
- +ndr_push_blob: DATA_BLOB (struct ndr_push *)
- +ndr_push_bytes: enum ndr_err_code (struct ndr_push *, const uint8_t *, uint32_t)
- +ndr_push_charset: enum ndr_err_code (struct ndr_push *, int, const char *, uint32_t, uint8_t, charset_t)
- +ndr_push_dlong: enum ndr_err_code (struct ndr_push *, int, int64_t)
- +ndr_push_double: enum ndr_err_code (struct ndr_push *, int, double)
- +ndr_push_enum_uint16: enum ndr_err_code (struct ndr_push *, int, uint16_t)
- +ndr_push_enum_uint1632: enum ndr_err_code (struct ndr_push *, int, uint16_t)
- +ndr_push_enum_uint32: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_enum_uint8: enum ndr_err_code (struct ndr_push *, int, uint8_t)
- +ndr_push_error: enum ndr_err_code (struct ndr_push *, enum ndr_err_code, const char *, ...)
- +ndr_push_expand: enum ndr_err_code (struct ndr_push *, uint32_t)
- +ndr_push_full_ptr: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_get_relative_base_offset: uint32_t (struct ndr_push *)
- +ndr_push_get_switch_value: uint32_t (struct ndr_push *, const void *)
- +ndr_push_gid_t: enum ndr_err_code (struct ndr_push *, int, gid_t)
- +ndr_push_hyper: enum ndr_err_code (struct ndr_push *, int, uint64_t)
- +ndr_push_init_ctx: struct ndr_push *(TALLOC_CTX *)
- +ndr_push_int16: enum ndr_err_code (struct ndr_push *, int, int16_t)
- +ndr_push_int32: enum ndr_err_code (struct ndr_push *, int, int32_t)
- +ndr_push_int8: enum ndr_err_code (struct ndr_push *, int, int8_t)
- +ndr_push_ipv4address: enum ndr_err_code (struct ndr_push *, int, const char *)
- +ndr_push_ipv6address: enum ndr_err_code (struct ndr_push *, int, const char *)
- +ndr_push_ndr_syntax_id: enum ndr_err_code (struct ndr_push *, int, const struct ndr_syntax_id *)
- +ndr_push_netr_SamDatabaseID: enum ndr_err_code (struct ndr_push *, int, enum netr_SamDatabaseID)
- +ndr_push_netr_SchannelType: enum ndr_err_code (struct ndr_push *, int, enum netr_SchannelType)
- +ndr_push_pipe_chunk_trailer: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_pointer: enum ndr_err_code (struct ndr_push *, int, void *)
- +ndr_push_policy_handle: enum ndr_err_code (struct ndr_push *, int, const struct policy_handle *)
- +ndr_push_ref_ptr: enum ndr_err_code (struct ndr_push *)
- +ndr_push_relative_ptr1: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_relative_ptr2_end: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_relative_ptr2_start: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_restore_relative_base_offset: void (struct ndr_push *, uint32_t)
- +ndr_push_set_switch_value: enum ndr_err_code (struct ndr_push *, const void *, uint32_t)
- +ndr_push_setup_relative_base_offset1: enum ndr_err_code (struct ndr_push *, const void *, uint32_t)
- +ndr_push_setup_relative_base_offset2: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_short_relative_ptr1: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_short_relative_ptr2: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_string: enum ndr_err_code (struct ndr_push *, int, const char *)
- +ndr_push_string_array: enum ndr_err_code (struct ndr_push *, int, const char **)
- +ndr_push_struct_blob: enum ndr_err_code (DATA_BLOB *, TALLOC_CTX *, const void *, ndr_push_flags_fn_t)
- +ndr_push_subcontext_end: enum ndr_err_code (struct ndr_push *, struct ndr_push *, size_t, ssize_t)
- +ndr_push_subcontext_start: enum ndr_err_code (struct ndr_push *, struct ndr_push **, size_t, ssize_t)
- +ndr_push_svcctl_ServerType: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_time_t: enum ndr_err_code (struct ndr_push *, int, time_t)
- +ndr_push_timespec: enum ndr_err_code (struct ndr_push *, int, const struct timespec *)
- +ndr_push_timeval: enum ndr_err_code (struct ndr_push *, int, const struct timeval *)
- +ndr_push_trailer_align: enum ndr_err_code (struct ndr_push *, size_t)
- +ndr_push_udlong: enum ndr_err_code (struct ndr_push *, int, uint64_t)
- +ndr_push_udlongr: enum ndr_err_code (struct ndr_push *, int, uint64_t)
- +ndr_push_uid_t: enum ndr_err_code (struct ndr_push *, int, uid_t)
- +ndr_push_uint16: enum ndr_err_code (struct ndr_push *, int, uint16_t)
- +ndr_push_uint1632: enum ndr_err_code (struct ndr_push *, int, uint16_t)
- +ndr_push_uint32: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_uint3264: enum ndr_err_code (struct ndr_push *, int, uint32_t)
- +ndr_push_uint8: enum ndr_err_code (struct ndr_push *, int, uint8_t)
- +ndr_push_union_align: enum ndr_err_code (struct ndr_push *, size_t)
- +ndr_push_union_blob: enum ndr_err_code (DATA_BLOB *, TALLOC_CTX *, void *, uint32_t, ndr_push_flags_fn_t)
- +ndr_push_unique_ptr: enum ndr_err_code (struct ndr_push *, const void *)
- +ndr_push_winreg_Data: enum ndr_err_code (struct ndr_push *, int, const union winreg_Data *)
- +ndr_push_winreg_Type: enum ndr_err_code (struct ndr_push *, int, enum winreg_Type)
- +ndr_push_zero: enum ndr_err_code (struct ndr_push *, uint32_t)
- +ndr_set_flags: void (uint32_t *, uint32_t)
- +ndr_size_DATA_BLOB: uint32_t (int, const DATA_BLOB *, int)
- +ndr_size_GUID: size_t (const struct GUID *, int)
- +ndr_size_string: uint32_t (int, const char * const *, int)
- +ndr_size_string_array: size_t (const char **, uint32_t, int)
- +ndr_size_struct: size_t (const void *, int, ndr_push_flags_fn_t)
- +ndr_size_union: size_t (const void *, int, uint32_t, ndr_push_flags_fn_t)
- +ndr_string_array_size: size_t (struct ndr_push *, const char *)
- +ndr_string_length: uint32_t (const void *, uint32_t)
- +ndr_syntax_id_equal: bool (const struct ndr_syntax_id *, const struct ndr_syntax_id *)
- +ndr_syntax_id_from_string: bool (const char *, struct ndr_syntax_id *)
- +ndr_syntax_id_null: uuid = {time_low = 0, time_mid = 0, time_hi_and_version = 0, clock_seq = "\000", node = "\000\000\000\000\000"}, if_version = 0
- +ndr_syntax_id_to_string: char *(TALLOC_CTX *, const struct ndr_syntax_id *)
- +ndr_token_peek: uint32_t (struct ndr_token_list **, const void *)
- +ndr_token_retrieve: enum ndr_err_code (struct ndr_token_list **, const void *, uint32_t *)
- +ndr_token_retrieve_cmp_fn: enum ndr_err_code (struct ndr_token_list **, const void *, uint32_t *, comparison_fn_t, bool)
- +ndr_token_store: enum ndr_err_code (TALLOC_CTX *, struct ndr_token_list **, const void *, uint32_t)
- +ndr_transfer_syntax_ndr: uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\237\350", node = "\b\000+\020H`"}, if_version = 2
- +ndr_transfer_syntax_ndr64: uuid = {time_low = 1903232307, time_mid = 48826, time_hi_and_version = 18743, clock_seq = "\203\031", node = "\265\333\357\234\314\066"}, if_version = 1
- --- a/librpc/ndr/ndr_misc.c
- +++ b/librpc/ndr/ndr_misc.c
- @@ -35,3 +35,50 @@ bool ndr_syntax_id_equal(const struct nd
- return GUID_equal(&i1->uuid, &i2->uuid)
- && (i1->if_version == i2->if_version);
- }
- +
- +_PUBLIC_ char *ndr_syntax_id_to_string(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *id)
- +{
- + return talloc_asprintf(mem_ctx,
- + "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x/0x%08x",
- + id->uuid.time_low, id->uuid.time_mid,
- + id->uuid.time_hi_and_version,
- + id->uuid.clock_seq[0],
- + id->uuid.clock_seq[1],
- + id->uuid.node[0], id->uuid.node[1],
- + id->uuid.node[2], id->uuid.node[3],
- + id->uuid.node[4], id->uuid.node[5],
- + (unsigned)id->if_version);
- +}
- +
- +_PUBLIC_ bool ndr_syntax_id_from_string(const char *s, struct ndr_syntax_id *id)
- +{
- + int ret;
- + size_t i;
- + uint32_t time_low;
- + uint32_t time_mid, time_hi_and_version;
- + uint32_t clock_seq[2];
- + uint32_t node[6];
- + uint32_t if_version;
- +
- + ret = sscanf(s,
- + "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x/0x%08x",
- + &time_low, &time_mid, &time_hi_and_version,
- + &clock_seq[0], &clock_seq[1],
- + &node[0], &node[1], &node[2], &node[3], &node[4], &node[5],
- + &if_version);
- + if (ret != 12) {
- + return false;
- + }
- +
- + id->uuid.time_low = time_low;
- + id->uuid.time_mid = time_mid;
- + id->uuid.time_hi_and_version = time_hi_and_version;
- + id->uuid.clock_seq[0] = clock_seq[0];
- + id->uuid.clock_seq[1] = clock_seq[1];
- + for (i=0; i<6; i++) {
- + id->uuid.node[i] = node[i];
- + }
- + id->if_version = if_version;
- +
- + return true;
- +}
- --- a/librpc/rpc/dcerpc_util.c
- +++ b/librpc/rpc/dcerpc_util.c
- @@ -27,6 +27,7 @@
- #include "librpc/rpc/dcerpc.h"
- #include "librpc/gen_ndr/ndr_dcerpc.h"
- #include "rpc_common.h"
- +#include "lib/util/bitmap.h"
-
- /* we need to be able to get/set the fragment length without doing a full
- decode */
- @@ -341,3 +342,194 @@ NTSTATUS dcerpc_read_ncacn_packet_recv(s
- tevent_req_received(req);
- return NT_STATUS_OK;
- }
- +
- +struct dcerpc_sec_vt_header2 dcerpc_sec_vt_header2_from_ncacn_packet(const struct ncacn_packet *pkt)
- +{
- + struct dcerpc_sec_vt_header2 ret;
- +
- + ZERO_STRUCT(ret);
- + ret.ptype = pkt->ptype;
- + memcpy(&ret.drep, pkt->drep, sizeof(ret.drep));
- + ret.call_id = pkt->call_id;
- +
- + switch (pkt->ptype) {
- + case DCERPC_PKT_REQUEST:
- + ret.context_id = pkt->u.request.context_id;
- + ret.opnum = pkt->u.request.opnum;
- + break;
- +
- + case DCERPC_PKT_RESPONSE:
- + ret.context_id = pkt->u.response.context_id;
- + break;
- +
- + case DCERPC_PKT_FAULT:
- + ret.context_id = pkt->u.fault.context_id;
- + break;
- +
- + default:
- + break;
- + }
- +
- + return ret;
- +}
- +
- +bool dcerpc_sec_vt_header2_equal(const struct dcerpc_sec_vt_header2 *v1,
- + const struct dcerpc_sec_vt_header2 *v2)
- +{
- + if (v1->ptype != v2->ptype) {
- + return false;
- + }
- +
- + if (memcmp(v1->drep, v2->drep, sizeof(v1->drep)) != 0) {
- + return false;
- + }
- +
- + if (v1->call_id != v2->call_id) {
- + return false;
- + }
- +
- + if (v1->context_id != v2->context_id) {
- + return false;
- + }
- +
- + if (v1->opnum != v2->opnum) {
- + return false;
- + }
- +
- + return true;
- +}
- +
- +static bool dcerpc_sec_vt_is_valid(const struct dcerpc_sec_verification_trailer *r)
- +{
- + bool ret = false;
- + TALLOC_CTX *frame = talloc_stackframe();
- + struct bitmap *commands_seen;
- + int i;
- +
- + if (r->count.count == 0) {
- + ret = true;
- + goto done;
- + }
- +
- + if (memcmp(r->magic, DCERPC_SEC_VT_MAGIC, sizeof(r->magic)) != 0) {
- + goto done;
- + }
- +
- + commands_seen = bitmap_talloc(frame, DCERPC_SEC_VT_COMMAND_ENUM + 1);
- + if (commands_seen == NULL) {
- + goto done;
- + }
- +
- + for (i=0; i < r->count.count; i++) {
- + enum dcerpc_sec_vt_command_enum cmd =
- + r->commands[i].command & DCERPC_SEC_VT_COMMAND_ENUM;
- +
- + if (bitmap_query(commands_seen, cmd)) {
- + /* Each command must appear at most once. */
- + goto done;
- + }
- + bitmap_set(commands_seen, cmd);
- +
- + switch (cmd) {
- + case DCERPC_SEC_VT_COMMAND_BITMASK1:
- + case DCERPC_SEC_VT_COMMAND_PCONTEXT:
- + case DCERPC_SEC_VT_COMMAND_HEADER2:
- + break;
- + default:
- + if ((r->commands[i].u._unknown.length % 4) != 0) {
- + goto done;
- + }
- + break;
- + }
- + }
- + ret = true;
- +done:
- + TALLOC_FREE(frame);
- + return ret;
- +}
- +
- +#define CHECK(msg, ok) \
- +do { \
- + if (!ok) { \
- + DEBUG(10, ("SEC_VT check %s failed\n", msg)); \
- + return false; \
- + } \
- +} while(0)
- +
- +#define CHECK_SYNTAX(msg, s1, s2) \
- +do { \
- + if (!ndr_syntax_id_equal(&s1, &s2)) { \
- + TALLOC_CTX *frame = talloc_stackframe(); \
- + DEBUG(10, ("SEC_VT check %s failed: %s vs. %s\n", msg, \
- + ndr_syntax_id_to_string(frame, &s1), \
- + ndr_syntax_id_to_string(frame, &s1))); \
- + TALLOC_FREE(frame); \
- + return false; \
- + } \
- +} while(0)
- +
- +
- +bool dcerpc_sec_verification_trailer_check(
- + const struct dcerpc_sec_verification_trailer *vt,
- + const uint32_t *bitmask1,
- + const struct dcerpc_sec_vt_pcontext *pcontext,
- + const struct dcerpc_sec_vt_header2 *header2)
- +{
- + size_t i;
- +
- + if (!dcerpc_sec_vt_is_valid(vt)) {
- + return false;
- + }
- +
- + for (i=0; i < vt->count.count; i++) {
- + struct dcerpc_sec_vt *c = &vt->commands[i];
- +
- + switch (c->command & DCERPC_SEC_VT_COMMAND_ENUM) {
- + case DCERPC_SEC_VT_COMMAND_BITMASK1:
- + if (bitmask1 == NULL) {
- + CHECK("Bitmask1 must_process_command",
- + !(c->command & DCERPC_SEC_VT_MUST_PROCESS));
- + break;
- + }
- +
- + if (c->u.bitmask1 & DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING) {
- + CHECK("Bitmask1 client_header_signing",
- + *bitmask1 & DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING);
- + }
- + break;
- +
- + case DCERPC_SEC_VT_COMMAND_PCONTEXT:
- + if (pcontext == NULL) {
- + CHECK("Pcontext must_process_command",
- + !(c->command & DCERPC_SEC_VT_MUST_PROCESS));
- + break;
- + }
- +
- + CHECK_SYNTAX("Pcontect abstract_syntax",
- + pcontext->abstract_syntax,
- + c->u.pcontext.abstract_syntax);
- + CHECK_SYNTAX("Pcontext transfer_syntax",
- + pcontext->transfer_syntax,
- + c->u.pcontext.transfer_syntax);
- + break;
- +
- + case DCERPC_SEC_VT_COMMAND_HEADER2: {
- + if (header2 == NULL) {
- + CHECK("Header2 must_process_command",
- + !(c->command & DCERPC_SEC_VT_MUST_PROCESS));
- + break;
- + }
- +
- + CHECK("Header2", dcerpc_sec_vt_header2_equal(header2, &c->u.header2));
- + break;
- + }
- +
- + default:
- + CHECK("Unknown must_process_command",
- + !(c->command & DCERPC_SEC_VT_MUST_PROCESS));
- + break;
- + }
- + }
- +
- + return true;
- +}
- --- a/librpc/rpc/rpc_common.h
- +++ b/librpc/rpc/rpc_common.h
- @@ -296,4 +296,45 @@ NTSTATUS dcerpc_binding_handle_call(stru
- TALLOC_CTX *r_mem,
- void *r_ptr);
-
- +/**
- + * Extract header information from a ncacn_packet
- + * as a dcerpc_sec_vt_header2 as used by the security verification trailer.
- + *
- + * @param[in] pkt a packet
- + *
- + * @return a dcerpc_sec_vt_header2
- + */
- +struct dcerpc_sec_vt_header2 dcerpc_sec_vt_header2_from_ncacn_packet(const struct ncacn_packet *pkt);
- +
- +
- +/**
- + * Test if two dcerpc_sec_vt_header2 structures are equal
- + * without consideration of reserved fields.
- + *
- + * @param v1 a pointer to a dcerpc_sec_vt_header2 structure
- + * @param v2 a pointer to a dcerpc_sec_vt_header2 structure
- + *
- + * @retval true if *v1 equals *v2
- + */
- +bool dcerpc_sec_vt_header2_equal(const struct dcerpc_sec_vt_header2 *v1,
- + const struct dcerpc_sec_vt_header2 *v2);
- +
- +/**
- + * Check for consistency of the security verification trailer with the PDU header.
- + * See <a href="http://msdn.microsoft.com/en-us/library/cc243559.aspx">MS-RPCE 2.2.2.13</a>.
- + * A check with an empty trailer succeeds.
- + *
- + * @param[in] vt a pointer to the security verification trailer.
- + * @param[in] bitmask1 which flags were negotiated on the connection.
- + * @param[in] pcontext the syntaxes negotiatied for the presentation context.
- + * @param[in] header2 some fields from the PDU header.
- + *
- + * @retval true on success.
- + */
- +bool dcerpc_sec_verification_trailer_check(
- + const struct dcerpc_sec_verification_trailer *vt,
- + const uint32_t *bitmask1,
- + const struct dcerpc_sec_vt_pcontext *pcontext,
- + const struct dcerpc_sec_vt_header2 *header2);
- +
- #endif /* __DEFAULT_LIBRPC_RPCCOMMON_H__ */
- --- a/source4/torture/ndr/ndr.c
- +++ b/source4/torture/ndr/ndr.c
- @@ -29,40 +29,65 @@ struct ndr_pull_test_data {
- DATA_BLOB data_context;
- size_t struct_size;
- ndr_pull_flags_fn_t pull_fn;
- + ndr_push_flags_fn_t push_fn;
- int ndr_flags;
- + int flags;
- };
-
- -static bool wrap_ndr_pull_test(struct torture_context *tctx,
- - struct torture_tcase *tcase,
- - struct torture_test *test)
- +static bool wrap_ndr_pullpush_test(struct torture_context *tctx,
- + struct torture_tcase *tcase,
- + struct torture_test *test)
- {
- bool (*check_fn) (struct torture_context *ctx, void *data) = test->fn;
- const struct ndr_pull_test_data *data = (const struct ndr_pull_test_data *)test->data;
- - void *ds = talloc_zero_size(tctx, data->struct_size);
- struct ndr_pull *ndr = ndr_pull_init_blob(&(data->data), tctx);
- + void *ds = talloc_zero_size(ndr, data->struct_size);
- + bool ret;
- + uint32_t highest_ofs;
- +
- + ndr->flags |= data->flags;
-
- ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
-
- torture_assert_ndr_success(tctx, data->pull_fn(ndr, data->ndr_flags, ds),
- "pulling");
-
- - torture_assert(tctx, ndr->offset == ndr->data_size,
- + if (ndr->offset > ndr->relative_highest_offset) {
- + highest_ofs = ndr->offset;
- + } else {
- + highest_ofs = ndr->relative_highest_offset;
- + }
- +
- + torture_assert(tctx, highest_ofs == ndr->data_size,
- talloc_asprintf(tctx,
- - "%d unread bytes", ndr->data_size - ndr->offset));
- + "%d unread bytes", ndr->data_size - highest_ofs));
-
- - if (check_fn != NULL)
- - return check_fn(tctx, ds);
- - else
- - return true;
- + if (check_fn != NULL) {
- + ret = check_fn(tctx, ds);
- + } else {
- + ret = true;
- + }
- +
- + if (data->push_fn != NULL) {
- + DATA_BLOB outblob;
- + torture_assert_ndr_success(tctx, ndr_push_struct_blob(&outblob, ndr, ds, data->push_fn), "pushing");
- + torture_assert_data_blob_equal(tctx, outblob, data->data, "ndr push compare");
- + }
- +
- + talloc_free(ndr);
- + return ret;
- }
-
- -_PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_test(
- - struct torture_suite *suite,
- - const char *name, ndr_pull_flags_fn_t pull_fn,
- - DATA_BLOB db,
- - size_t struct_size,
- - int ndr_flags,
- - bool (*check_fn) (struct torture_context *ctx, void *data))
- +_PUBLIC_ struct torture_test *_torture_suite_add_ndr_pullpush_test(
- + struct torture_suite *suite,
- + const char *name,
- + ndr_pull_flags_fn_t pull_fn,
- + ndr_push_flags_fn_t push_fn,
- + DATA_BLOB db,
- + size_t struct_size,
- + int ndr_flags,
- + int flags,
- + bool (*check_fn) (struct torture_context *ctx, void *data))
- {
- struct torture_test *test;
- struct torture_tcase *tcase;
- @@ -74,12 +99,16 @@ _PUBLIC_ struct torture_test *_torture_s
-
- test->name = talloc_strdup(test, name);
- test->description = NULL;
- - test->run = wrap_ndr_pull_test;
- + test->run = wrap_ndr_pullpush_test;
- +
- data = talloc(test, struct ndr_pull_test_data);
- data->data = db;
- data->ndr_flags = ndr_flags;
- + data->flags = flags;
- data->struct_size = struct_size;
- data->pull_fn = pull_fn;
- + data->push_fn = push_fn;
- +
- test->data = data;
- test->fn = check_fn;
- test->dangerous = false;
- @@ -89,6 +118,7 @@ _PUBLIC_ struct torture_test *_torture_s
- return test;
- }
-
- +
- static bool wrap_ndr_inout_pull_test(struct torture_context *tctx,
- struct torture_tcase *tcase,
- struct torture_test *test)
- @@ -97,6 +127,7 @@ static bool wrap_ndr_inout_pull_test(str
- const struct ndr_pull_test_data *data = (const struct ndr_pull_test_data *)test->data;
- void *ds = talloc_zero_size(tctx, data->struct_size);
- struct ndr_pull *ndr;
- + uint32_t highest_ofs;
-
- /* handle NDR_IN context */
-
- @@ -109,8 +140,14 @@ static bool wrap_ndr_inout_pull_test(str
- data->pull_fn(ndr, NDR_IN, ds),
- "ndr pull of context failed");
-
- - torture_assert(tctx, ndr->offset == ndr->data_size,
- - talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - ndr->offset));
- + if (ndr->offset > ndr->relative_highest_offset) {
- + highest_ofs = ndr->offset;
- + } else {
- + highest_ofs = ndr->relative_highest_offset;
- + }
- +
- + torture_assert(tctx, highest_ofs == ndr->data_size,
- + talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - highest_ofs));
-
- talloc_free(ndr);
-
- @@ -125,8 +162,14 @@ static bool wrap_ndr_inout_pull_test(str
- data->pull_fn(ndr, NDR_OUT, ds),
- "ndr pull failed");
-
- - torture_assert(tctx, ndr->offset == ndr->data_size,
- - talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - ndr->offset));
- + if (ndr->offset > ndr->relative_highest_offset) {
- + highest_ofs = ndr->offset;
- + } else {
- + highest_ofs = ndr->relative_highest_offset;
- + }
- +
- + torture_assert(tctx, highest_ofs == ndr->data_size,
- + talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - highest_ofs));
-
- talloc_free(ndr);
-
- --- a/source4/torture/ndr/ndr.h
- +++ b/source4/torture/ndr/ndr.h
- @@ -24,12 +24,15 @@
- #include "librpc/ndr/libndr.h"
- #include "libcli/security/security.h"
-
- -_PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_test(
- +_PUBLIC_ struct torture_test *_torture_suite_add_ndr_pullpush_test(
- struct torture_suite *suite,
- - const char *name, ndr_pull_flags_fn_t fn,
- + const char *name,
- + ndr_pull_flags_fn_t pull_fn,
- + ndr_push_flags_fn_t push_fn,
- DATA_BLOB db,
- size_t struct_size,
- int ndr_flags,
- + int flags,
- bool (*check_fn) (struct torture_context *, void *data));
-
- _PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_inout_test(
- @@ -41,20 +44,32 @@ _PUBLIC_ struct torture_test *_torture_s
- bool (*check_fn) (struct torture_context *ctx, void *data));
-
- #define torture_suite_add_ndr_pull_test(suite,name,data,check_fn) \
- - _torture_suite_add_ndr_pull_test(suite, #name, \
- - (ndr_pull_flags_fn_t)ndr_pull_ ## name, data_blob_talloc(suite, data, sizeof(data)), \
- - sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, (bool (*) (struct torture_context *, void *)) check_fn);
- + _torture_suite_add_ndr_pullpush_test(suite, #name, \
- + (ndr_pull_flags_fn_t)ndr_pull_ ## name, NULL, data_blob_const(data, sizeof(data)), \
- + sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, 0, (bool (*) (struct torture_context *, void *)) check_fn);
-
- #define torture_suite_add_ndr_pull_fn_test(suite,name,data,flags,check_fn) \
- - _torture_suite_add_ndr_pull_test(suite, #name "_" #flags, \
- - (ndr_pull_flags_fn_t)ndr_pull_ ## name, data_blob_talloc(suite, data, sizeof(data)), \
- - sizeof(struct name), flags, (bool (*) (struct torture_context *, void *)) check_fn);
- + _torture_suite_add_ndr_pullpush_test(suite, #name "_" #flags, \
- + (ndr_pull_flags_fn_t)ndr_pull_ ## name, NULL, data_blob_const(data, sizeof(data)), \
- + sizeof(struct name), flags, 0, (bool (*) (struct torture_context *, void *)) check_fn);
- +
- +#define torture_suite_add_ndr_pull_fn_test_flags(suite,name,data,flags,flags2,check_fn) \
- + _torture_suite_add_ndr_pullpush_test(suite, #name "_" #flags "_" #flags2, \
- + (ndr_pull_flags_fn_t)ndr_pull_ ## name, NULL, data_blob_const(data, sizeof(data)), \
- + sizeof(struct name), flags, flags2, (bool (*) (struct torture_context *, void *)) check_fn);
- +
- +#define torture_suite_add_ndr_pullpush_test(suite,name,data_blob,check_fn) \
- + _torture_suite_add_ndr_pullpush_test(suite, #name, \
- + (ndr_pull_flags_fn_t)ndr_pull_ ## name, \
- + (ndr_push_flags_fn_t)ndr_push_ ## name, \
- + data_blob, \
- + sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, 0, (bool (*) (struct torture_context *, void *)) check_fn);
-
- #define torture_suite_add_ndr_pull_io_test(suite,name,data_in,data_out,check_fn_out) \
- _torture_suite_add_ndr_pull_inout_test(suite, #name "_INOUT", \
- (ndr_pull_flags_fn_t)ndr_pull_ ## name, \
- - data_blob_talloc(suite, data_in, sizeof(data_in)), \
- - data_blob_talloc(suite, data_out, sizeof(data_out)), \
- + data_blob_const(data_in, sizeof(data_in)), \
- + data_blob_const(data_out, sizeof(data_out)), \
- sizeof(struct name), \
- (bool (*) (struct torture_context *, void *)) check_fn_out);
-
- --- a/source4/torture/ndr/dfsblob.c
- +++ b/source4/torture/ndr/dfsblob.c
- @@ -74,11 +74,11 @@ struct torture_suite *ndr_dfsblob_suite(
- {
- struct torture_suite *suite = torture_suite_create(ctx, "dfsblob");
-
- - torture_suite_add_ndr_pull_fn_test(suite, dfs_GetDFSReferral_in, dfs_get_ref_in, NDR_IN, NULL);
- + torture_suite_add_ndr_pull_test(suite, dfs_GetDFSReferral_in, dfs_get_ref_in, NULL);
-
- - torture_suite_add_ndr_pull_fn_test(suite, dfs_referral_resp, dfs_get_ref_out2, NDR_BUFFERS|NDR_SCALARS, NULL);
- + torture_suite_add_ndr_pull_test(suite, dfs_referral_resp, dfs_get_ref_out2, NULL);
-
- - torture_suite_add_ndr_pull_fn_test(suite, dfs_referral_resp, dfs_get_ref_out, NDR_BUFFERS|NDR_SCALARS,dfs_referral_out_check);
- + torture_suite_add_ndr_pull_test(suite, dfs_referral_resp, dfs_get_ref_out,dfs_referral_out_check);
-
- return suite;
- }
- --- a/source4/torture/ndr/nbt.c
- +++ b/source4/torture/ndr/nbt.c
- @@ -62,9 +62,9 @@ struct torture_suite *ndr_nbt_suite(TALL
- {
- struct torture_suite *suite = torture_suite_create(ctx, "nbt");
-
- - torture_suite_add_ndr_pull_fn_test(suite, nbt_netlogon_packet, netlogon_logon_request_req_data, NDR_IN, netlogon_logon_request_req_check);
- + torture_suite_add_ndr_pull_test(suite, nbt_netlogon_packet, netlogon_logon_request_req_data, netlogon_logon_request_req_check);
-
- - torture_suite_add_ndr_pull_fn_test(suite, nbt_netlogon_response2, netlogon_logon_request_resp_data, NDR_IN, netlogon_logon_request_resp_check);
- + torture_suite_add_ndr_pull_test(suite, nbt_netlogon_response2, netlogon_logon_request_resp_data, netlogon_logon_request_resp_check);
-
- return suite;
- }
- --- a/source4/torture/ndr/ntlmssp.c
- +++ b/source4/torture/ndr/ntlmssp.c
- @@ -111,9 +111,10 @@ struct torture_suite *ndr_ntlmssp_suite(
- {
- struct torture_suite *suite = torture_suite_create(ctx, "ntlmssp");
-
- - torture_suite_add_ndr_pull_fn_test(suite, NEGOTIATE_MESSAGE, ntlmssp_NEGOTIATE_MESSAGE_data, NDR_IN, ntlmssp_NEGOTIATE_MESSAGE_check);
- - /* torture_suite_add_ndr_pull_fn_test(suite, CHALLENGE_MESSAGE, ntlmssp_CHALLENGE_MESSAGE_data, NDR_IN, ntlmssp_CHALLENGE_MESSAGE_check);
- - torture_suite_add_ndr_pull_fn_test(suite, AUTHENTICATE_MESSAGE, ntlmssp_AUTHENTICATE_MESSAGE_data, NDR_IN, ntlmssp_AUTHENTICATE_MESSAGE_check); */
- -
- + torture_suite_add_ndr_pull_test(suite, NEGOTIATE_MESSAGE, ntlmssp_NEGOTIATE_MESSAGE_data, ntlmssp_NEGOTIATE_MESSAGE_check);
- +#if 0
- + torture_suite_add_ndr_pull_test(suite, CHALLENGE_MESSAGE, ntlmssp_CHALLENGE_MESSAGE_data, ntlmssp_CHALLENGE_MESSAGE_check);
- + torture_suite_add_ndr_pull_test(suite, AUTHENTICATE_MESSAGE, ntlmssp_AUTHENTICATE_MESSAGE_data, ntlmssp_AUTHENTICATE_MESSAGE_check);
- +#endif
- return suite;
- }
- --- a/source4/torture/ndr/drsblobs.c
- +++ b/source4/torture/ndr/drsblobs.c
- @@ -115,6 +115,34 @@ static const uint8_t trust_domain_passwo
- 0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00
- };
-
- +/* these are taken from the trust objects of a w2k8r2 forest, with a
- + * trust relationship between the forest parent and a child domain
- + */
- +static const char *trustAuthIncoming =
- +"AQAAAAwAAAAcAQAASuQ+RXJdzAECAAAAAAEAAMOWL6UVfVKiJOUsGcT03H"
- +"jHxr2ACsMMOV5ynM617Tp7idNC+c4egdqk4S9YEpvR2YvHmdZdymL6F7QKm8OkXazYZF2r/gZ/bI+"
- +"jkWbsn4O8qyAc3OUKQRZwBbf+lxBW+vM4O3ZpUjz5BSKCcFQgM+MY91yVU8Nji3HNnvGnDquobFAZ"
- +"hxjL+S1l5+QZgkfyfv5mQScGRbU1Lar1xg9G3JznUb7S6pvrBO2nwK8g+KZBfJy5UeULigDH4IWo/"
- +"JmtaEGkKE2uiKIjdsEQd/uwnkouW26XzRc0ulfJnPFftGnT9KIcShPf7DLj/tstmQAAceRMFHJTY3"
- +"PmxoowoK8HUyBK5D5Fcl3MAQIAAAAAAQAAw5YvpRV9UqIk5SwZxPTceMfGvYAKwww5XnKczrXtOnu"
- +"J00L5zh6B2qThL1gSm9HZi8eZ1l3KYvoXtAqbw6RdrNhkXav+Bn9sj6ORZuyfg7yrIBzc5QpBFnAF"
- +"t/6XEFb68zg7dmlSPPkFIoJwVCAz4xj3XJVTw2OLcc2e8acOq6hsUBmHGMv5LWXn5BmCR/J+/mZBJ"
- +"wZFtTUtqvXGD0bcnOdRvtLqm+sE7afAryD4pkF8nLlR5QuKAMfghaj8ma1oQaQoTa6IoiN2wRB3+7"
- +"CeSi5bbpfNFzS6V8mc8V+0adP0ohxKE9/sMuP+2y2ZAABx5EwUclNjc+bGijCgrwdTIA==";
- +
- +static const char *trustAuthOutgoing =
- +"AQAAAAwAAAAcAQAASuQ+RXJdzAECAAAAAAEAAMOWL6UVfVKiJOUsGcT03H"
- +"jHxr2ACsMMOV5ynM617Tp7idNC+c4egdqk4S9YEpvR2YvHmdZdymL6F7QKm8OkXazYZF2r/gZ/bI+"
- +"jkWbsn4O8qyAc3OUKQRZwBbf+lxBW+vM4O3ZpUjz5BSKCcFQgM+MY91yVU8Nji3HNnvGnDquobFAZ"
- +"hxjL+S1l5+QZgkfyfv5mQScGRbU1Lar1xg9G3JznUb7S6pvrBO2nwK8g+KZBfJy5UeULigDH4IWo/"
- +"JmtaEGkKE2uiKIjdsEQd/uwnkouW26XzRc0ulfJnPFftGnT9KIcShPf7DLj/tstmQAAceRMFHJTY3"
- +"PmxoowoK8HUyBK5D5Fcl3MAQIAAAAAAQAAw5YvpRV9UqIk5SwZxPTceMfGvYAKwww5XnKczrXtOnu"
- +"J00L5zh6B2qThL1gSm9HZi8eZ1l3KYvoXtAqbw6RdrNhkXav+Bn9sj6ORZuyfg7yrIBzc5QpBFnAF"
- +"t/6XEFb68zg7dmlSPPkFIoJwVCAz4xj3XJVTw2OLcc2e8acOq6hsUBmHGMv5LWXn5BmCR/J+/mZBJ"
- +"wZFtTUtqvXGD0bcnOdRvtLqm+sE7afAryD4pkF8nLlR5QuKAMfghaj8ma1oQaQoTa6IoiN2wRB3+7"
- +"CeSi5bbpfNFzS6V8mc8V+0adP0ohxKE9/sMuP+2y2ZAABx5EwUclNjc+bGijCgrwdTIA==";
- +
- +
- static bool trust_domain_passwords_check_in(struct torture_context *tctx,
- struct trustDomainPasswords *r)
- {
- @@ -154,8 +182,20 @@ struct torture_suite *ndr_drsblobs_suite
- {
- struct torture_suite *suite = torture_suite_create(ctx, "drsblobs");
-
- - torture_suite_add_ndr_pull_fn_test(suite, ForestTrustInfo, forest_trust_info_data_out, NDR_IN, forest_trust_info_check_out);
- - torture_suite_add_ndr_pull_fn_test(suite, trustDomainPasswords, trust_domain_passwords_in, NDR_IN, trust_domain_passwords_check_in);
- + torture_suite_add_ndr_pull_test(suite, ForestTrustInfo, forest_trust_info_data_out, forest_trust_info_check_out);
- + torture_suite_add_ndr_pull_test(suite, trustDomainPasswords, trust_domain_passwords_in, trust_domain_passwords_check_in);
- +
- +#if 0
- + torture_suite_add_ndr_pullpush_test(suite,
- + trustAuthInOutBlob,
- + base64_decode_data_blob_talloc(suite, trustAuthIncoming),
- + NULL);
- +
- + torture_suite_add_ndr_pullpush_test(suite,
- + trustAuthInOutBlob,
- + base64_decode_data_blob_talloc(suite, trustAuthOutgoing),
- + NULL);
- +#endif
-
- return suite;
- }
- --- a/source3/rpcclient/rpcclient.c
- +++ b/source3/rpcclient/rpcclient.c
- @@ -1031,6 +1031,10 @@ out_free:
- binding->transport = NCACN_NP;
- }
-
- + if (binding->flags & DCERPC_CONNECT) {
- + pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
- + pipe_default_auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
- + }
- if (binding->flags & DCERPC_SIGN) {
- pipe_default_auth_level = DCERPC_AUTH_LEVEL_INTEGRITY;
- pipe_default_auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
- @@ -1044,12 +1048,6 @@ out_free:
- pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
- }
- if (binding->flags & DCERPC_AUTH_NTLM) {
- - /* If neither Integrity or Privacy are requested then
- - * Use just Connect level */
- - if (pipe_default_auth_level == DCERPC_AUTH_LEVEL_NONE) {
- - pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
- - }
- -
- if (pipe_default_auth_type == DCERPC_AUTH_TYPE_SPNEGO) {
- pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
- } else {
- @@ -1057,18 +1055,19 @@ out_free:
- }
- }
- if (binding->flags & DCERPC_AUTH_KRB5) {
- - /* If neither Integrity or Privacy are requested then
- - * Use just Connect level */
- - if (pipe_default_auth_level == DCERPC_AUTH_LEVEL_NONE) {
- - pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
- - }
- -
- if (pipe_default_auth_type == DCERPC_AUTH_TYPE_SPNEGO) {
- pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_KRB5;
- } else {
- pipe_default_auth_type = DCERPC_AUTH_TYPE_KRB5;
- }
- }
- + if (pipe_default_auth_type != DCERPC_AUTH_TYPE_NONE) {
- + /* If neither Integrity or Privacy are requested then
- + * Use just Connect level */
- + if (pipe_default_auth_level == DCERPC_AUTH_LEVEL_NONE) {
- + pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
- + }
- + }
-
- if (get_cmdline_auth_info_use_kerberos(rpcclient_auth_info)) {
- flags |= CLI_FULL_CONNECTION_USE_KERBEROS |
- --- /dev/null
- +++ b/source3/script/tests/test_rpcclient.sh
- @@ -0,0 +1,19 @@
- +#!/bin/sh
- +
- +if [ $# -lt 1 ]; then
- +cat <<EOF
- +Usage: test_rpcclient.sh ccache binding <rpcclient commands>
- +EOF
- +exit 1;
- +fi
- +
- +KRB5CCNAME=$1
- +shift 1
- +export KRB5CCNAME
- +ADDARGS="$*"
- +
- +incdir=`dirname $0`/../../../testprogs/blackbox
- +. $incdir/subunit.sh
- +testit "rpcclient" $VALGRIND $BINDIR/rpcclient -c 'getusername' $ADDARGS || failed=`expr $failed + 1`
- +
- +testok $0 $failed
- --- a/source3/selftest/tests.py
- +++ b/source3/selftest/tests.py
- @@ -208,7 +208,7 @@ if sub.returncode == 0:
- plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
-
- test = 'rpc.lsa.lookupsids'
- - auth_options = ["", "ntlm", "spnego" ]
- + auth_options = ["", "ntlm", "spnego", "spnego,ntlm" ]
- signseal_options = ["", ",connect", ",sign", ",seal"]
- smb_options = ["", ",smb2"]
- endianness_options = ["", ",bigendian"]
- @@ -219,6 +219,9 @@ if sub.returncode == 0:
- binding_string = "ncacn_np:$SERVER_IP[%s%s%s%s]" % (a, s, z, e)
- options = binding_string + " -U$USERNAME%$PASSWORD"
- plansmbtorturetestsuite(test, "s3dc", options, 'over ncacn_np with [%s%s%s%s] ' % (a, s, z, e))
- + plantestsuite("samba3.blackbox.rpcclient over ncacn_np with [%s%s%s%s] " % (a, s, z, e), "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
- + "none", options, configuration])
- +
- for e in endianness_options:
- for a in auth_options:
- for s in signseal_options:
- --- a/source4/torture/rpc/rpc.c
- +++ b/source4/torture/rpc/rpc.c
- @@ -501,6 +501,7 @@ NTSTATUS torture_rpc_init(void)
- torture_suite_add_suite(suite, torture_rpc_samr_passwords_pwdlastset(suite));
- torture_suite_add_suite(suite, torture_rpc_samr_passwords_badpwdcount(suite));
- torture_suite_add_suite(suite, torture_rpc_samr_passwords_lockout(suite));
- + torture_suite_add_suite(suite, torture_rpc_samr_passwords_validate(suite));
- torture_suite_add_suite(suite, torture_rpc_samr_user_privileges(suite));
- torture_suite_add_suite(suite, torture_rpc_samr_large_dc(suite));
- torture_suite_add_suite(suite, torture_rpc_epmapper(suite));
- --- a/source4/torture/rpc/samr.c
- +++ b/source4/torture/rpc/samr.c
- @@ -7938,8 +7938,8 @@ static bool test_Connect(struct dcerpc_b
- }
-
-
- -static bool test_samr_ValidatePassword(struct dcerpc_pipe *p,
- - struct torture_context *tctx)
- +static bool test_samr_ValidatePassword(struct torture_context *tctx,
- + struct dcerpc_pipe *p)
- {
- struct samr_ValidatePassword r;
- union samr_ValidatePasswordReq req;
- @@ -7951,6 +7951,10 @@ static bool test_samr_ValidatePassword(s
-
- torture_comment(tctx, "Testing samr_ValidatePassword\n");
-
- + if (p->conn->transport.transport != NCACN_IP_TCP) {
- + torture_comment(tctx, "samr_ValidatePassword only should succeed over NCACN_IP_TCP!\n");
- + }
- +
- ZERO_STRUCT(r);
- r.in.level = NetValidatePasswordReset;
- r.in.req = &req;
- @@ -8074,8 +8078,6 @@ bool torture_rpc_samr_passwords(struct t
-
- ret &= test_samr_handle_Close(b, torture, &ctx->handle);
-
- - ret &= test_samr_ValidatePassword(p, torture);
- -
- return ret;
- }
-
- @@ -8370,4 +8372,15 @@ struct torture_suite *torture_rpc_samr_p
- return suite;
- }
-
- +struct torture_suite *torture_rpc_samr_passwords_validate(TALLOC_CTX *mem_ctx)
- +{
- + struct torture_suite *suite = torture_suite_create(mem_ctx, "samr.passwords.validate");
- + struct torture_rpc_tcase *tcase;
- +
- + tcase = torture_suite_add_rpc_iface_tcase(suite, "samr",
- + &ndr_table_samr);
- + torture_rpc_tcase_add_test(tcase, "validate",
- + test_samr_ValidatePassword);
-
- + return suite;
- +}
- --- a/source3/rpc_server/srv_pipe.c
- +++ b/source3/rpc_server/srv_pipe.c
- @@ -42,6 +42,7 @@
- #include "auth.h"
- #include "ntdomain.h"
- #include "rpc_server/srv_pipe.h"
- +#include "../librpc/ndr/ndr_dcerpc.h"
-
- #undef DBGC_CLASS
- #define DBGC_CLASS DBGC_RPC_SRV
- @@ -202,7 +203,7 @@ bool create_next_pdu(struct pipes_struct
- * the pipe gets closed. JRA.
- */
- if (p->fault_state) {
- - setup_fault_pdu(p, NT_STATUS(DCERPC_FAULT_OP_RNG_ERROR));
- + setup_fault_pdu(p, NT_STATUS(p->fault_state));
- return true;
- }
-
- @@ -336,7 +337,7 @@ static bool check_bind_req(struct pipes_
- struct pipe_rpc_fns *context_fns;
-
- DEBUG(3,("check_bind_req for %s\n",
- - get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
- + get_pipe_name_from_syntax(talloc_tos(), abstract)));
-
- /* we have to check all now since win2k introduced a new UUID on the lsaprpc pipe */
- if (rpc_srv_pipe_exists_by_id(abstract) &&
- @@ -358,6 +359,7 @@ static bool check_bind_req(struct pipes_
- context_fns->n_cmds = rpc_srv_get_pipe_num_cmds(abstract);
- context_fns->cmds = rpc_srv_get_pipe_cmds(abstract);
- context_fns->context_id = context_id;
- + context_fns->syntax = *abstract;
-
- /* add to the list of open contexts */
-
- @@ -1541,7 +1543,42 @@ static PIPE_RPC_FNS* find_pipe_fns_by_co
- }
-
- static bool api_rpcTNP(struct pipes_struct *p, struct ncacn_packet *pkt,
- - const struct api_struct *api_rpc_cmds, int n_cmds);
- + const struct api_struct *api_rpc_cmds, int n_cmds,
- + const struct ndr_syntax_id *syntax);
- +
- +static bool srv_pipe_check_verification_trailer(struct pipes_struct *p,
- + struct ncacn_packet *pkt,
- + struct pipe_rpc_fns *pipe_fns)
- +{
- + TALLOC_CTX *frame = talloc_stackframe();
- + struct dcerpc_sec_verification_trailer *vt = NULL;
- + const uint32_t bitmask1 = 0;
- + const struct dcerpc_sec_vt_pcontext pcontext = {
- + .abstract_syntax = pipe_fns->syntax,
- + .transfer_syntax = ndr_transfer_syntax,
- + };
- + const struct dcerpc_sec_vt_header2 header2 =
- + dcerpc_sec_vt_header2_from_ncacn_packet(pkt);
- + struct ndr_pull *ndr;
- + enum ndr_err_code ndr_err;
- + bool ret = false;
- +
- + ndr = ndr_pull_init_blob(&p->in_data.data, frame);
- + if (ndr == NULL) {
- + goto done;
- + }
- +
- + ndr_err = ndr_pop_dcerpc_sec_verification_trailer(ndr, frame, &vt);
- + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- + goto done;
- + }
- +
- + ret = dcerpc_sec_verification_trailer_check(vt, &bitmask1,
- + &pcontext, &header2);
- +done:
- + TALLOC_FREE(frame);
- + return ret;
- +}
-
- /****************************************************************************
- Find the correct RPC function to call for this request.
- @@ -1552,46 +1589,53 @@ static bool api_rpcTNP(struct pipes_stru
- static bool api_pipe_request(struct pipes_struct *p,
- struct ncacn_packet *pkt)
- {
- + TALLOC_CTX *frame = talloc_stackframe();
- bool ret = False;
- - bool changed_user = False;
- PIPE_RPC_FNS *pipe_fns;
-
- - if (p->pipe_bound &&
- - ((p->auth.auth_type == DCERPC_AUTH_TYPE_NTLMSSP) ||
- - (p->auth.auth_type == DCERPC_AUTH_TYPE_KRB5) ||
- - (p->auth.auth_type == DCERPC_AUTH_TYPE_SPNEGO))) {
- - if(!become_authenticated_pipe_user(p->session_info)) {
- - data_blob_free(&p->out_data.rdata);
- - return False;
- - }
- - changed_user = True;
- + if (!p->pipe_bound) {
- + DEBUG(1, ("Pipe not bound!\n"));
- + data_blob_free(&p->out_data.rdata);
- + TALLOC_FREE(frame);
- + return false;
- }
-
- - DEBUG(5, ("Requested \\PIPE\\%s\n",
- - get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
- -
- /* get the set of RPC functions for this context */
-
- pipe_fns = find_pipe_fns_by_context(p->contexts,
- pkt->u.request.context_id);
- -
- - if ( pipe_fns ) {
- - TALLOC_CTX *frame = talloc_stackframe();
- - ret = api_rpcTNP(p, pkt, pipe_fns->cmds, pipe_fns->n_cmds);
- + if (pipe_fns == NULL) {
- + DEBUG(0, ("No rpc function table associated with context "
- + "[%d]\n",
- + pkt->u.request.context_id));
- + data_blob_free(&p->out_data.rdata);
- TALLOC_FREE(frame);
- + return false;
- }
- - else {
- - DEBUG(0, ("No rpc function table associated with context "
- - "[%d] on pipe [%s]\n",
- - pkt->u.request.context_id,
- - get_pipe_name_from_syntax(talloc_tos(),
- - &p->syntax)));
- +
- + DEBUG(5, ("Requested \\PIPE\\%s\n",
- + get_pipe_name_from_syntax(talloc_tos(), &pipe_fns->syntax)));
- +
- + if (!srv_pipe_check_verification_trailer(p, pkt, pipe_fns)) {
- + DEBUG(1, ("srv_pipe_check_verification_trailer: failed\n"));
- + setup_fault_pdu(p, NT_STATUS(DCERPC_FAULT_ACCESS_DENIED));
- + data_blob_free(&p->out_data.rdata);
- + TALLOC_FREE(frame);
- + return true;
- }
-
- - if (changed_user) {
- - unbecome_authenticated_pipe_user();
- + if (!become_authenticated_pipe_user(p->session_info)) {
- + DEBUG(1, ("Failed to become pipe user!\n"));
- + data_blob_free(&p->out_data.rdata);
- + TALLOC_FREE(frame);
- + return false;
- }
-
- + ret = api_rpcTNP(p, pkt, pipe_fns->cmds, pipe_fns->n_cmds,
- + &pipe_fns->syntax);
- + unbecome_authenticated_pipe_user();
- +
- + TALLOC_FREE(frame);
- return ret;
- }
-
- @@ -1600,20 +1644,21 @@ static bool api_pipe_request(struct pipe
- ********************************************************************/
-
- static bool api_rpcTNP(struct pipes_struct *p, struct ncacn_packet *pkt,
- - const struct api_struct *api_rpc_cmds, int n_cmds)
- + const struct api_struct *api_rpc_cmds, int n_cmds,
- + const struct ndr_syntax_id *syntax)
- {
- int fn_num;
- uint32_t offset1;
-
- /* interpret the command */
- DEBUG(4,("api_rpcTNP: %s op 0x%x - ",
- - get_pipe_name_from_syntax(talloc_tos(), &p->syntax),
- + get_pipe_name_from_syntax(talloc_tos(), syntax),
- pkt->u.request.opnum));
-
- if (DEBUGLEVEL >= 50) {
- fstring name;
- slprintf(name, sizeof(name)-1, "in_%s",
- - get_pipe_name_from_syntax(talloc_tos(), &p->syntax));
- + get_pipe_name_from_syntax(talloc_tos(), syntax));
- dump_pdu_region(name, pkt->u.request.opnum,
- &p->in_data.data, 0,
- p->in_data.data.length);
- @@ -1646,37 +1691,30 @@ static bool api_rpcTNP(struct pipes_stru
- /* do the actual command */
- if(!api_rpc_cmds[fn_num].fn(p)) {
- DEBUG(0,("api_rpcTNP: %s: %s failed.\n",
- - get_pipe_name_from_syntax(talloc_tos(), &p->syntax),
- + get_pipe_name_from_syntax(talloc_tos(), syntax),
- api_rpc_cmds[fn_num].name));
- data_blob_free(&p->out_data.rdata);
- return False;
- }
-
- - if (p->bad_handle_fault_state) {
- - DEBUG(4,("api_rpcTNP: bad handle fault return.\n"));
- - p->bad_handle_fault_state = False;
- - setup_fault_pdu(p, NT_STATUS(DCERPC_FAULT_CONTEXT_MISMATCH));
- - return True;
- - }
- -
- - if (p->rng_fault_state) {
- - DEBUG(4, ("api_rpcTNP: rng fault return\n"));
- - p->rng_fault_state = False;
- - setup_fault_pdu(p, NT_STATUS(DCERPC_FAULT_OP_RNG_ERROR));
- - return True;
- + if (p->fault_state) {
- + DEBUG(4,("api_rpcTNP: fault(%d) return.\n", p->fault_state));
- + setup_fault_pdu(p, NT_STATUS(p->fault_state));
- + p->fault_state = 0;
- + return true;
- }
-
- if (DEBUGLEVEL >= 50) {
- fstring name;
- slprintf(name, sizeof(name)-1, "out_%s",
- - get_pipe_name_from_syntax(talloc_tos(), &p->syntax));
- + get_pipe_name_from_syntax(talloc_tos(), syntax));
- dump_pdu_region(name, pkt->u.request.opnum,
- &p->out_data.rdata, offset1,
- p->out_data.rdata.length);
- }
-
- DEBUG(5,("api_rpcTNP: called %s successfully\n",
- - get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
- + get_pipe_name_from_syntax(talloc_tos(), syntax)));
-
- /* Check for buffer underflow in rpc parsing */
- if ((DEBUGLEVEL >= 10) &&
- @@ -1718,9 +1756,9 @@ void set_incoming_fault(struct pipes_str
- data_blob_free(&p->in_data.data);
- p->in_data.pdu_needed_len = 0;
- p->in_data.pdu.length = 0;
- - p->fault_state = True;
- - DEBUG(10, ("set_incoming_fault: Setting fault state on pipe %s\n",
- - get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
- + p->fault_state = DCERPC_FAULT_CANT_PERFORM;
- +
- + DEBUG(10, ("Setting fault state\n"));
- }
-
- static NTSTATUS dcesrv_auth_request(struct pipe_auth_data *auth,
- --- a/source3/include/ntdomain.h
- +++ b/source3/include/ntdomain.h
- @@ -87,6 +87,7 @@ typedef struct pipe_rpc_fns {
- const struct api_struct *cmds;
- int n_cmds;
- uint32 context_id;
- + struct ndr_syntax_id syntax;
-
- } PIPE_RPC_FNS;
-
- @@ -134,22 +135,10 @@ struct pipes_struct {
- bool pipe_bound;
-
- /*
- - * Set to true when we should return fault PDU's for everything.
- - */
- -
- - bool fault_state;
- -
- - /*
- - * Set to true when we should return fault PDU's for a bad handle.
- - */
- -
- - bool bad_handle_fault_state;
- -
- - /*
- - * Set to true when the backend does not support a call.
- + * Set the DCERPC_FAULT to return.
- */
-
- - bool rng_fault_state;
- + int fault_state;
-
- /*
- * Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's
- --- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
- +++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
- @@ -183,7 +183,7 @@ sub ParseFunction($$)
- );
-
- pidl "";
- - pidl "if (p->rng_fault_state) {";
- + pidl "if (p->fault_state) {";
- pidl "\ttalloc_free(r);";
- pidl "\t/* Return true here, srv_pipe_hnd.c will take care */";
- pidl "\treturn true;";
- --- a/source3/rpc_server/dfs/srv_dfs_nt.c
- +++ b/source3/rpc_server/dfs/srv_dfs_nt.c
- @@ -411,125 +411,125 @@ WERROR _dfs_GetInfo(struct pipes_struct
- WERROR _dfs_SetInfo(struct pipes_struct *p, struct dfs_SetInfo *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_Rename(struct pipes_struct *p, struct dfs_Rename *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_Move(struct pipes_struct *p, struct dfs_Move *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_ManagerGetConfigInfo(struct pipes_struct *p, struct dfs_ManagerGetConfigInfo *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_ManagerSendSiteInfo(struct pipes_struct *p, struct dfs_ManagerSendSiteInfo *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_AddFtRoot(struct pipes_struct *p, struct dfs_AddFtRoot *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_RemoveFtRoot(struct pipes_struct *p, struct dfs_RemoveFtRoot *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_AddStdRoot(struct pipes_struct *p, struct dfs_AddStdRoot *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_RemoveStdRoot(struct pipes_struct *p, struct dfs_RemoveStdRoot *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_ManagerInitialize(struct pipes_struct *p, struct dfs_ManagerInitialize *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_AddStdRootForced(struct pipes_struct *p, struct dfs_AddStdRootForced *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_GetDcAddress(struct pipes_struct *p, struct dfs_GetDcAddress *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_SetDcAddress(struct pipes_struct *p, struct dfs_SetDcAddress *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_FlushFtTable(struct pipes_struct *p, struct dfs_FlushFtTable *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_Add2(struct pipes_struct *p, struct dfs_Add2 *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_Remove2(struct pipes_struct *p, struct dfs_Remove2 *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_EnumEx(struct pipes_struct *p, struct dfs_EnumEx *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _dfs_SetInfo2(struct pipes_struct *p, struct dfs_SetInfo2 *r)
- {
- /* FIXME: Implement your code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
- --- a/source3/rpc_server/dssetup/srv_dssetup_nt.c
- +++ b/source3/rpc_server/dssetup/srv_dssetup_nt.c
- @@ -130,7 +130,7 @@ WERROR _dssetup_DsRoleGetPrimaryDomainIn
- WERROR _dssetup_DsRoleDnsNameToFlatName(struct pipes_struct *p,
- struct dssetup_DsRoleDnsNameToFlatName *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -140,7 +140,7 @@ WERROR _dssetup_DsRoleDnsNameToFlatName(
- WERROR _dssetup_DsRoleDcAsDc(struct pipes_struct *p,
- struct dssetup_DsRoleDcAsDc *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -150,7 +150,7 @@ WERROR _dssetup_DsRoleDcAsDc(struct pipe
- WERROR _dssetup_DsRoleDcAsReplica(struct pipes_struct *p,
- struct dssetup_DsRoleDcAsReplica *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -160,7 +160,7 @@ WERROR _dssetup_DsRoleDcAsReplica(struct
- WERROR _dssetup_DsRoleDemoteDc(struct pipes_struct *p,
- struct dssetup_DsRoleDemoteDc *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -170,7 +170,7 @@ WERROR _dssetup_DsRoleDemoteDc(struct pi
- WERROR _dssetup_DsRoleGetDcOperationProgress(struct pipes_struct *p,
- struct dssetup_DsRoleGetDcOperationProgress *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -180,7 +180,7 @@ WERROR _dssetup_DsRoleGetDcOperationProg
- WERROR _dssetup_DsRoleGetDcOperationResults(struct pipes_struct *p,
- struct dssetup_DsRoleGetDcOperationResults *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -190,7 +190,7 @@ WERROR _dssetup_DsRoleGetDcOperationResu
- WERROR _dssetup_DsRoleCancel(struct pipes_struct *p,
- struct dssetup_DsRoleCancel *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -200,7 +200,7 @@ WERROR _dssetup_DsRoleCancel(struct pipe
- WERROR _dssetup_DsRoleServerSaveStateForUpgrade(struct pipes_struct *p,
- struct dssetup_DsRoleServerSaveStateForUpgrade *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -210,7 +210,7 @@ WERROR _dssetup_DsRoleServerSaveStateFor
- WERROR _dssetup_DsRoleUpgradeDownlevelServer(struct pipes_struct *p,
- struct dssetup_DsRoleUpgradeDownlevelServer *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -220,6 +220,6 @@ WERROR _dssetup_DsRoleUpgradeDownlevelSe
- WERROR _dssetup_DsRoleAbortDownlevelServerUpgrade(struct pipes_struct *p,
- struct dssetup_DsRoleAbortDownlevelServerUpgrade *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
- --- a/source3/rpc_server/echo/srv_echo_nt.c
- +++ b/source3/rpc_server/echo/srv_echo_nt.c
- @@ -87,13 +87,13 @@ void _echo_SourceData(struct pipes_struc
-
- void _echo_TestCall(struct pipes_struct *p, struct echo_TestCall *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return;
- }
-
- NTSTATUS _echo_TestCall2(struct pipes_struct *p, struct echo_TestCall2 *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_OK;
- }
-
- @@ -105,18 +105,18 @@ uint32 _echo_TestSleep(struct pipes_stru
-
- void _echo_TestEnum(struct pipes_struct *p, struct echo_TestEnum *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return;
- }
-
- void _echo_TestSurrounding(struct pipes_struct *p, struct echo_TestSurrounding *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return;
- }
-
- uint16 _echo_TestDoublePointer(struct pipes_struct *p, struct echo_TestDoublePointer *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return 0;
- }
- --- a/source3/rpc_server/epmapper/srv_epmapper.c
- +++ b/source3/rpc_server/epmapper/srv_epmapper.c
- @@ -297,6 +297,7 @@ error_status_t _epm_Insert(struct pipes_
- /* If this is not a priviledged users, return */
- if (p->transport != NCALRPC ||
- !is_priviledged_pipe(p->session_info)) {
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return EPMAPPER_STATUS_CANT_PERFORM_OP;
- }
-
- @@ -433,6 +434,7 @@ error_status_t _epm_Delete(struct pipes_
- /* If this is not a priviledged users, return */
- if (p->transport != NCALRPC ||
- !is_priviledged_pipe(p->session_info)) {
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return EPMAPPER_STATUS_CANT_PERFORM_OP;
- }
-
- @@ -1096,7 +1098,7 @@ error_status_t _epm_LookupHandleFree(str
- error_status_t _epm_InqObject(struct pipes_struct *p,
- struct epm_InqObject *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return EPMAPPER_STATUS_CANT_PERFORM_OP;
- }
-
- @@ -1110,7 +1112,7 @@ error_status_t _epm_InqObject(struct pip
- error_status_t _epm_MgmtDelete(struct pipes_struct *p,
- struct epm_MgmtDelete *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return EPMAPPER_STATUS_CANT_PERFORM_OP;
- }
-
- @@ -1121,7 +1123,7 @@ error_status_t _epm_MgmtDelete(struct pi
- error_status_t _epm_MapAuth(struct pipes_struct *p,
- struct epm_MapAuth *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return EPMAPPER_STATUS_CANT_PERFORM_OP;
- }
-
- --- a/source3/rpc_server/eventlog/srv_eventlog_nt.c
- +++ b/source3/rpc_server/eventlog/srv_eventlog_nt.c
- @@ -695,7 +695,7 @@ NTSTATUS _eventlog_GetNumRecords(struct
-
- NTSTATUS _eventlog_BackupEventLogW(struct pipes_struct *p, struct eventlog_BackupEventLogW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -838,104 +838,104 @@ NTSTATUS _eventlog_ReportEventW(struct p
- NTSTATUS _eventlog_DeregisterEventSource(struct pipes_struct *p,
- struct eventlog_DeregisterEventSource *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_ChangeNotify(struct pipes_struct *p,
- struct eventlog_ChangeNotify *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_RegisterEventSourceW(struct pipes_struct *p,
- struct eventlog_RegisterEventSourceW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_OpenBackupEventLogW(struct pipes_struct *p,
- struct eventlog_OpenBackupEventLogW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_ClearEventLogA(struct pipes_struct *p,
- struct eventlog_ClearEventLogA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_BackupEventLogA(struct pipes_struct *p,
- struct eventlog_BackupEventLogA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_OpenEventLogA(struct pipes_struct *p,
- struct eventlog_OpenEventLogA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_RegisterEventSourceA(struct pipes_struct *p,
- struct eventlog_RegisterEventSourceA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_OpenBackupEventLogA(struct pipes_struct *p,
- struct eventlog_OpenBackupEventLogA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_ReadEventLogA(struct pipes_struct *p,
- struct eventlog_ReadEventLogA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_ReportEventA(struct pipes_struct *p,
- struct eventlog_ReportEventA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_RegisterClusterSvc(struct pipes_struct *p,
- struct eventlog_RegisterClusterSvc *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_DeregisterClusterSvc(struct pipes_struct *p,
- struct eventlog_DeregisterClusterSvc *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_WriteClusterEvents(struct pipes_struct *p,
- struct eventlog_WriteClusterEvents *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _eventlog_ReportEventAndSourceW(struct pipes_struct *p,
- struct eventlog_ReportEventAndSourceW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
- --- a/source3/rpc_server/lsa/srv_lsa_nt.c
- +++ b/source3/rpc_server/lsa/srv_lsa_nt.c
- @@ -817,7 +817,7 @@ NTSTATUS _lsa_QueryInfoPolicy2(struct pi
- struct lsa_QueryInfoPolicy r;
-
- if ((pdb_capabilities() & PDB_CAP_ADS) == 0) {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -3210,88 +3210,88 @@ NTSTATUS _lsa_Delete(struct pipes_struct
-
- NTSTATUS _lsa_SetSecObj(struct pipes_struct *p, struct lsa_SetSecObj *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_ChangePassword(struct pipes_struct *p,
- struct lsa_ChangePassword *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_SetInfoPolicy(struct pipes_struct *p, struct lsa_SetInfoPolicy *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_ClearAuditLog(struct pipes_struct *p, struct lsa_ClearAuditLog *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_GetQuotasForAccount(struct pipes_struct *p,
- struct lsa_GetQuotasForAccount *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_SetQuotasForAccount(struct pipes_struct *p,
- struct lsa_SetQuotasForAccount *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_SetInformationTrustedDomain(struct pipes_struct *p,
- struct lsa_SetInformationTrustedDomain *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_QuerySecret(struct pipes_struct *p, struct lsa_QuerySecret *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_SetTrustedDomainInfo(struct pipes_struct *p,
- struct lsa_SetTrustedDomainInfo *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_StorePrivateData(struct pipes_struct *p,
- struct lsa_StorePrivateData *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_RetrievePrivateData(struct pipes_struct *p,
- struct lsa_RetrievePrivateData *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_SetInfoPolicy2(struct pipes_struct *p,
- struct lsa_SetInfoPolicy2 *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_SetTrustedDomainInfoByName(struct pipes_struct *p,
- struct lsa_SetTrustedDomainInfoByName *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -3310,7 +3310,7 @@ NTSTATUS _lsa_EnumTrustedDomainsEx(struc
- * _lsa_EnumTrustedDomains() afterwards - gd */
-
- if (!(pdb_capabilities() & PDB_CAP_TRUSTED_DOMAINS_EX)) {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -3379,107 +3379,107 @@ NTSTATUS _lsa_EnumTrustedDomainsEx(struc
- NTSTATUS _lsa_QueryDomainInformationPolicy(struct pipes_struct *p,
- struct lsa_QueryDomainInformationPolicy *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_SetDomainInformationPolicy(struct pipes_struct *p,
- struct lsa_SetDomainInformationPolicy *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_TestCall(struct pipes_struct *p, struct lsa_TestCall *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_CREDRWRITE(struct pipes_struct *p, struct lsa_CREDRWRITE *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_CREDRREAD(struct pipes_struct *p, struct lsa_CREDRREAD *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_CREDRENUMERATE(struct pipes_struct *p, struct lsa_CREDRENUMERATE *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_CREDRWRITEDOMAINCREDENTIALS(struct pipes_struct *p,
- struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_CREDRREADDOMAINCREDENTIALS(struct pipes_struct *p,
- struct lsa_CREDRREADDOMAINCREDENTIALS *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_CREDRDELETE(struct pipes_struct *p, struct lsa_CREDRDELETE *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_CREDRGETTARGETINFO(struct pipes_struct *p,
- struct lsa_CREDRGETTARGETINFO *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_CREDRPROFILELOADED(struct pipes_struct *p,
- struct lsa_CREDRPROFILELOADED *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_CREDRGETSESSIONTYPES(struct pipes_struct *p,
- struct lsa_CREDRGETSESSIONTYPES *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_LSARREGISTERAUDITEVENT(struct pipes_struct *p,
- struct lsa_LSARREGISTERAUDITEVENT *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_LSARGENAUDITEVENT(struct pipes_struct *p,
- struct lsa_LSARGENAUDITEVENT *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_LSARUNREGISTERAUDITEVENT(struct pipes_struct *p,
- struct lsa_LSARUNREGISTERAUDITEVENT *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_lsaRQueryForestTrustInformation(struct pipes_struct *p,
- struct lsa_lsaRQueryForestTrustInformation *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -3992,34 +3992,34 @@ NTSTATUS _lsa_lsaRSetForestTrustInformat
- NTSTATUS _lsa_CREDRRENAME(struct pipes_struct *p,
- struct lsa_CREDRRENAME *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_LSAROPENPOLICYSCE(struct pipes_struct *p,
- struct lsa_LSAROPENPOLICYSCE *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct pipes_struct *p,
- struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct pipes_struct *p,
- struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- NTSTATUS _lsa_LSARADTREPORTSECURITYEVENT(struct pipes_struct *p,
- struct lsa_LSARADTREPORTSECURITYEVENT *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
- --- a/source3/rpc_server/netlogon/srv_netlog_nt.c
- +++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
- @@ -1787,7 +1787,7 @@ NTSTATUS _netr_LogonSamLogonEx(struct pi
- WERROR _netr_LogonUasLogon(struct pipes_struct *p,
- struct netr_LogonUasLogon *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -1797,7 +1797,7 @@ WERROR _netr_LogonUasLogon(struct pipes_
- WERROR _netr_LogonUasLogoff(struct pipes_struct *p,
- struct netr_LogonUasLogoff *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -1807,7 +1807,7 @@ WERROR _netr_LogonUasLogoff(struct pipes
- NTSTATUS _netr_DatabaseDeltas(struct pipes_struct *p,
- struct netr_DatabaseDeltas *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -1817,7 +1817,7 @@ NTSTATUS _netr_DatabaseDeltas(struct pip
- NTSTATUS _netr_DatabaseSync(struct pipes_struct *p,
- struct netr_DatabaseSync *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -1827,7 +1827,7 @@ NTSTATUS _netr_DatabaseSync(struct pipes
- NTSTATUS _netr_AccountDeltas(struct pipes_struct *p,
- struct netr_AccountDeltas *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -1837,7 +1837,7 @@ NTSTATUS _netr_AccountDeltas(struct pipe
- NTSTATUS _netr_AccountSync(struct pipes_struct *p,
- struct netr_AccountSync *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -1978,7 +1978,7 @@ WERROR _netr_GetAnyDCName(struct pipes_s
- NTSTATUS _netr_DatabaseSync2(struct pipes_struct *p,
- struct netr_DatabaseSync2 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -1988,7 +1988,7 @@ NTSTATUS _netr_DatabaseSync2(struct pipe
- NTSTATUS _netr_DatabaseRedo(struct pipes_struct *p,
- struct netr_DatabaseRedo *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -1998,7 +1998,7 @@ NTSTATUS _netr_DatabaseRedo(struct pipes
- WERROR _netr_DsRGetDCName(struct pipes_struct *p,
- struct netr_DsRGetDCName *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2017,7 +2017,7 @@ NTSTATUS _netr_LogonGetCapabilities(stru
- WERROR _netr_NETRLOGONSETSERVICEBITS(struct pipes_struct *p,
- struct netr_NETRLOGONSETSERVICEBITS *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2027,7 +2027,7 @@ WERROR _netr_NETRLOGONSETSERVICEBITS(str
- WERROR _netr_LogonGetTrustRid(struct pipes_struct *p,
- struct netr_LogonGetTrustRid *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2037,7 +2037,7 @@ WERROR _netr_LogonGetTrustRid(struct pip
- WERROR _netr_NETRLOGONCOMPUTESERVERDIGEST(struct pipes_struct *p,
- struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2047,7 +2047,7 @@ WERROR _netr_NETRLOGONCOMPUTESERVERDIGES
- WERROR _netr_NETRLOGONCOMPUTECLIENTDIGEST(struct pipes_struct *p,
- struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2057,7 +2057,7 @@ WERROR _netr_NETRLOGONCOMPUTECLIENTDIGES
- WERROR _netr_DsRGetDCNameEx(struct pipes_struct *p,
- struct netr_DsRGetDCNameEx *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2067,7 +2067,7 @@ WERROR _netr_DsRGetDCNameEx(struct pipes
- WERROR _netr_DsRGetSiteName(struct pipes_struct *p,
- struct netr_DsRGetSiteName *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2077,7 +2077,7 @@ WERROR _netr_DsRGetSiteName(struct pipes
- NTSTATUS _netr_LogonGetDomainInfo(struct pipes_struct *p,
- struct netr_LogonGetDomainInfo *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -2087,7 +2087,7 @@ NTSTATUS _netr_LogonGetDomainInfo(struct
- WERROR _netr_ServerPasswordGet(struct pipes_struct *p,
- struct netr_ServerPasswordGet *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2097,7 +2097,7 @@ WERROR _netr_ServerPasswordGet(struct pi
- WERROR _netr_NETRLOGONSENDTOSAM(struct pipes_struct *p,
- struct netr_NETRLOGONSENDTOSAM *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2107,7 +2107,7 @@ WERROR _netr_NETRLOGONSENDTOSAM(struct p
- WERROR _netr_DsRAddressToSitenamesW(struct pipes_struct *p,
- struct netr_DsRAddressToSitenamesW *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2117,7 +2117,7 @@ WERROR _netr_DsRAddressToSitenamesW(stru
- WERROR _netr_DsRGetDCNameEx2(struct pipes_struct *p,
- struct netr_DsRGetDCNameEx2 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2127,7 +2127,7 @@ WERROR _netr_DsRGetDCNameEx2(struct pipe
- WERROR _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct pipes_struct *p,
- struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2137,7 +2137,7 @@ WERROR _netr_NETRLOGONGETTIMESERVICEPARE
- WERROR _netr_NetrEnumerateTrustedDomainsEx(struct pipes_struct *p,
- struct netr_NetrEnumerateTrustedDomainsEx *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2147,7 +2147,7 @@ WERROR _netr_NetrEnumerateTrustedDomains
- WERROR _netr_DsRAddressToSitenamesExW(struct pipes_struct *p,
- struct netr_DsRAddressToSitenamesExW *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2157,7 +2157,7 @@ WERROR _netr_DsRAddressToSitenamesExW(st
- WERROR _netr_DsrGetDcSiteCoverageW(struct pipes_struct *p,
- struct netr_DsrGetDcSiteCoverageW *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2167,7 +2167,7 @@ WERROR _netr_DsrGetDcSiteCoverageW(struc
- WERROR _netr_DsrEnumerateDomainTrusts(struct pipes_struct *p,
- struct netr_DsrEnumerateDomainTrusts *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2177,7 +2177,7 @@ WERROR _netr_DsrEnumerateDomainTrusts(st
- WERROR _netr_DsrDeregisterDNSHostRecords(struct pipes_struct *p,
- struct netr_DsrDeregisterDNSHostRecords *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2187,7 +2187,7 @@ WERROR _netr_DsrDeregisterDNSHostRecords
- NTSTATUS _netr_ServerTrustPasswordsGet(struct pipes_struct *p,
- struct netr_ServerTrustPasswordsGet *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -2197,7 +2197,7 @@ NTSTATUS _netr_ServerTrustPasswordsGet(s
- WERROR _netr_DsRGetForestTrustInformation(struct pipes_struct *p,
- struct netr_DsRGetForestTrustInformation *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -2476,7 +2476,7 @@ NTSTATUS _netr_ServerGetTrustInfo(struct
- NTSTATUS _netr_Unused47(struct pipes_struct *p,
- struct netr_Unused47 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -2486,6 +2486,6 @@ NTSTATUS _netr_Unused47(struct pipes_str
- NTSTATUS _netr_DsrUpdateReadOnlyServerDnsRecords(struct pipes_struct *p,
- struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
- --- a/source3/rpc_server/ntsvcs/srv_ntsvcs_nt.c
- +++ b/source3/rpc_server/ntsvcs/srv_ntsvcs_nt.c
- @@ -227,7 +227,7 @@ WERROR _PNP_HwProfFlags(struct pipes_str
- WERROR _PNP_Disconnect(struct pipes_struct *p,
- struct PNP_Disconnect *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -237,7 +237,7 @@ WERROR _PNP_Disconnect(struct pipes_stru
- WERROR _PNP_Connect(struct pipes_struct *p,
- struct PNP_Connect *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -247,7 +247,7 @@ WERROR _PNP_Connect(struct pipes_struct
- WERROR _PNP_GetGlobalState(struct pipes_struct *p,
- struct PNP_GetGlobalState *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -257,7 +257,7 @@ WERROR _PNP_GetGlobalState(struct pipes_
- WERROR _PNP_InitDetection(struct pipes_struct *p,
- struct PNP_InitDetection *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -267,7 +267,7 @@ WERROR _PNP_InitDetection(struct pipes_s
- WERROR _PNP_ReportLogOn(struct pipes_struct *p,
- struct PNP_ReportLogOn *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -277,7 +277,7 @@ WERROR _PNP_ReportLogOn(struct pipes_str
- WERROR _PNP_GetRootDeviceInstance(struct pipes_struct *p,
- struct PNP_GetRootDeviceInstance *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -287,7 +287,7 @@ WERROR _PNP_GetRootDeviceInstance(struct
- WERROR _PNP_GetRelatedDeviceInstance(struct pipes_struct *p,
- struct PNP_GetRelatedDeviceInstance *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -297,7 +297,7 @@ WERROR _PNP_GetRelatedDeviceInstance(str
- WERROR _PNP_EnumerateSubKeys(struct pipes_struct *p,
- struct PNP_EnumerateSubKeys *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -307,7 +307,7 @@ WERROR _PNP_EnumerateSubKeys(struct pipe
- WERROR _PNP_GetDepth(struct pipes_struct *p,
- struct PNP_GetDepth *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -317,7 +317,7 @@ WERROR _PNP_GetDepth(struct pipes_struct
- WERROR _PNP_SetDeviceRegProp(struct pipes_struct *p,
- struct PNP_SetDeviceRegProp *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -327,7 +327,7 @@ WERROR _PNP_SetDeviceRegProp(struct pipe
- WERROR _PNP_GetClassInstance(struct pipes_struct *p,
- struct PNP_GetClassInstance *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -337,7 +337,7 @@ WERROR _PNP_GetClassInstance(struct pipe
- WERROR _PNP_CreateKey(struct pipes_struct *p,
- struct PNP_CreateKey *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -347,7 +347,7 @@ WERROR _PNP_CreateKey(struct pipes_struc
- WERROR _PNP_DeleteRegistryKey(struct pipes_struct *p,
- struct PNP_DeleteRegistryKey *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -357,7 +357,7 @@ WERROR _PNP_DeleteRegistryKey(struct pip
- WERROR _PNP_GetClassCount(struct pipes_struct *p,
- struct PNP_GetClassCount *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -367,7 +367,7 @@ WERROR _PNP_GetClassCount(struct pipes_s
- WERROR _PNP_GetClassName(struct pipes_struct *p,
- struct PNP_GetClassName *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -377,7 +377,7 @@ WERROR _PNP_GetClassName(struct pipes_st
- WERROR _PNP_DeleteClassKey(struct pipes_struct *p,
- struct PNP_DeleteClassKey *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -387,7 +387,7 @@ WERROR _PNP_DeleteClassKey(struct pipes_
- WERROR _PNP_GetInterfaceDeviceAlias(struct pipes_struct *p,
- struct PNP_GetInterfaceDeviceAlias *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -397,7 +397,7 @@ WERROR _PNP_GetInterfaceDeviceAlias(stru
- WERROR _PNP_GetInterfaceDeviceList(struct pipes_struct *p,
- struct PNP_GetInterfaceDeviceList *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -407,7 +407,7 @@ WERROR _PNP_GetInterfaceDeviceList(struc
- WERROR _PNP_GetInterfaceDeviceListSize(struct pipes_struct *p,
- struct PNP_GetInterfaceDeviceListSize *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -417,7 +417,7 @@ WERROR _PNP_GetInterfaceDeviceListSize(s
- WERROR _PNP_RegisterDeviceClassAssociation(struct pipes_struct *p,
- struct PNP_RegisterDeviceClassAssociation *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -427,7 +427,7 @@ WERROR _PNP_RegisterDeviceClassAssociati
- WERROR _PNP_UnregisterDeviceClassAssociation(struct pipes_struct *p,
- struct PNP_UnregisterDeviceClassAssociation *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -437,7 +437,7 @@ WERROR _PNP_UnregisterDeviceClassAssocia
- WERROR _PNP_GetClassRegProp(struct pipes_struct *p,
- struct PNP_GetClassRegProp *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -447,7 +447,7 @@ WERROR _PNP_GetClassRegProp(struct pipes
- WERROR _PNP_SetClassRegProp(struct pipes_struct *p,
- struct PNP_SetClassRegProp *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -457,7 +457,7 @@ WERROR _PNP_SetClassRegProp(struct pipes
- WERROR _PNP_CreateDevInst(struct pipes_struct *p,
- struct PNP_CreateDevInst *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -467,7 +467,7 @@ WERROR _PNP_CreateDevInst(struct pipes_s
- WERROR _PNP_DeviceInstanceAction(struct pipes_struct *p,
- struct PNP_DeviceInstanceAction *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -477,7 +477,7 @@ WERROR _PNP_DeviceInstanceAction(struct
- WERROR _PNP_GetDeviceStatus(struct pipes_struct *p,
- struct PNP_GetDeviceStatus *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -487,7 +487,7 @@ WERROR _PNP_GetDeviceStatus(struct pipes
- WERROR _PNP_SetDeviceProblem(struct pipes_struct *p,
- struct PNP_SetDeviceProblem *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -497,7 +497,7 @@ WERROR _PNP_SetDeviceProblem(struct pipe
- WERROR _PNP_DisableDevInst(struct pipes_struct *p,
- struct PNP_DisableDevInst *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -507,7 +507,7 @@ WERROR _PNP_DisableDevInst(struct pipes_
- WERROR _PNP_UninstallDevInst(struct pipes_struct *p,
- struct PNP_UninstallDevInst *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -517,7 +517,7 @@ WERROR _PNP_UninstallDevInst(struct pipe
- WERROR _PNP_AddID(struct pipes_struct *p,
- struct PNP_AddID *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -527,7 +527,7 @@ WERROR _PNP_AddID(struct pipes_struct *p
- WERROR _PNP_RegisterDriver(struct pipes_struct *p,
- struct PNP_RegisterDriver *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -537,7 +537,7 @@ WERROR _PNP_RegisterDriver(struct pipes_
- WERROR _PNP_QueryRemove(struct pipes_struct *p,
- struct PNP_QueryRemove *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -547,7 +547,7 @@ WERROR _PNP_QueryRemove(struct pipes_str
- WERROR _PNP_RequestDeviceEject(struct pipes_struct *p,
- struct PNP_RequestDeviceEject *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -557,7 +557,7 @@ WERROR _PNP_RequestDeviceEject(struct pi
- WERROR _PNP_IsDockStationPresent(struct pipes_struct *p,
- struct PNP_IsDockStationPresent *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -567,7 +567,7 @@ WERROR _PNP_IsDockStationPresent(struct
- WERROR _PNP_RequestEjectPC(struct pipes_struct *p,
- struct PNP_RequestEjectPC *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -577,7 +577,7 @@ WERROR _PNP_RequestEjectPC(struct pipes_
- WERROR _PNP_AddEmptyLogConf(struct pipes_struct *p,
- struct PNP_AddEmptyLogConf *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -587,7 +587,7 @@ WERROR _PNP_AddEmptyLogConf(struct pipes
- WERROR _PNP_FreeLogConf(struct pipes_struct *p,
- struct PNP_FreeLogConf *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -597,7 +597,7 @@ WERROR _PNP_FreeLogConf(struct pipes_str
- WERROR _PNP_GetFirstLogConf(struct pipes_struct *p,
- struct PNP_GetFirstLogConf *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -607,7 +607,7 @@ WERROR _PNP_GetFirstLogConf(struct pipes
- WERROR _PNP_GetNextLogConf(struct pipes_struct *p,
- struct PNP_GetNextLogConf *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -617,7 +617,7 @@ WERROR _PNP_GetNextLogConf(struct pipes_
- WERROR _PNP_GetLogConfPriority(struct pipes_struct *p,
- struct PNP_GetLogConfPriority *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -627,7 +627,7 @@ WERROR _PNP_GetLogConfPriority(struct pi
- WERROR _PNP_AddResDes(struct pipes_struct *p,
- struct PNP_AddResDes *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -637,7 +637,7 @@ WERROR _PNP_AddResDes(struct pipes_struc
- WERROR _PNP_FreeResDes(struct pipes_struct *p,
- struct PNP_FreeResDes *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -647,7 +647,7 @@ WERROR _PNP_FreeResDes(struct pipes_stru
- WERROR _PNP_GetNextResDes(struct pipes_struct *p,
- struct PNP_GetNextResDes *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -657,7 +657,7 @@ WERROR _PNP_GetNextResDes(struct pipes_s
- WERROR _PNP_GetResDesData(struct pipes_struct *p,
- struct PNP_GetResDesData *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -667,7 +667,7 @@ WERROR _PNP_GetResDesData(struct pipes_s
- WERROR _PNP_GetResDesDataSize(struct pipes_struct *p,
- struct PNP_GetResDesDataSize *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -677,7 +677,7 @@ WERROR _PNP_GetResDesDataSize(struct pip
- WERROR _PNP_ModifyResDes(struct pipes_struct *p,
- struct PNP_ModifyResDes *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -687,7 +687,7 @@ WERROR _PNP_ModifyResDes(struct pipes_st
- WERROR _PNP_DetectResourceLimit(struct pipes_struct *p,
- struct PNP_DetectResourceLimit *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -697,7 +697,7 @@ WERROR _PNP_DetectResourceLimit(struct p
- WERROR _PNP_QueryResConfList(struct pipes_struct *p,
- struct PNP_QueryResConfList *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -707,7 +707,7 @@ WERROR _PNP_QueryResConfList(struct pipe
- WERROR _PNP_SetHwProf(struct pipes_struct *p,
- struct PNP_SetHwProf *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -717,7 +717,7 @@ WERROR _PNP_SetHwProf(struct pipes_struc
- WERROR _PNP_QueryArbitratorFreeData(struct pipes_struct *p,
- struct PNP_QueryArbitratorFreeData *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -727,7 +727,7 @@ WERROR _PNP_QueryArbitratorFreeData(stru
- WERROR _PNP_QueryArbitratorFreeSize(struct pipes_struct *p,
- struct PNP_QueryArbitratorFreeSize *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -737,7 +737,7 @@ WERROR _PNP_QueryArbitratorFreeSize(stru
- WERROR _PNP_RunDetection(struct pipes_struct *p,
- struct PNP_RunDetection *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -747,7 +747,7 @@ WERROR _PNP_RunDetection(struct pipes_st
- WERROR _PNP_RegisterNotification(struct pipes_struct *p,
- struct PNP_RegisterNotification *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -757,7 +757,7 @@ WERROR _PNP_RegisterNotification(struct
- WERROR _PNP_UnregisterNotification(struct pipes_struct *p,
- struct PNP_UnregisterNotification *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -767,7 +767,7 @@ WERROR _PNP_UnregisterNotification(struc
- WERROR _PNP_GetCustomDevProp(struct pipes_struct *p,
- struct PNP_GetCustomDevProp *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -777,7 +777,7 @@ WERROR _PNP_GetCustomDevProp(struct pipe
- WERROR _PNP_GetVersionInternal(struct pipes_struct *p,
- struct PNP_GetVersionInternal *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -787,7 +787,7 @@ WERROR _PNP_GetVersionInternal(struct pi
- WERROR _PNP_GetBlockedDriverInfo(struct pipes_struct *p,
- struct PNP_GetBlockedDriverInfo *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -797,6 +797,6 @@ WERROR _PNP_GetBlockedDriverInfo(struct
- WERROR _PNP_GetServerSideDeviceInstallFlags(struct pipes_struct *p,
- struct PNP_GetServerSideDeviceInstallFlags *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
- --- a/source3/rpc_server/rpc_handles.c
- +++ b/source3/rpc_server/rpc_handles.c
- @@ -242,7 +242,7 @@ static struct dcesrv_handle *find_policy
- DEBUG(4,("Policy not found: "));
- dump_data(4, (uint8_t *)hnd, sizeof(*hnd));
-
- - p->bad_handle_fault_state = true;
- + p->fault_state = DCERPC_FAULT_CONTEXT_MISMATCH;
-
- return NULL;
- }
- --- a/source3/rpc_server/rpc_ncacn_np.c
- +++ b/source3/rpc_server/rpc_ncacn_np.c
- @@ -216,24 +216,13 @@ static NTSTATUS rpcint_dispatch(struct p
- }
-
- if (p->fault_state) {
- - p->fault_state = false;
- - data_blob_free(&p->out_data.rdata);
- - talloc_free_children(p->mem_ctx);
- - return NT_STATUS_RPC_CALL_FAILED;
- - }
- -
- - if (p->bad_handle_fault_state) {
- - p->bad_handle_fault_state = false;
- - data_blob_free(&p->out_data.rdata);
- - talloc_free_children(p->mem_ctx);
- - return NT_STATUS_RPC_SS_CONTEXT_MISMATCH;
- - }
- + NTSTATUS status;
-
- - if (p->rng_fault_state) {
- - p->rng_fault_state = false;
- + status = NT_STATUS(p->fault_state);
- + p->fault_state = 0;
- data_blob_free(&p->out_data.rdata);
- talloc_free_children(p->mem_ctx);
- - return NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE;
- + return status;
- }
-
- *out_data = p->out_data.rdata;
- --- a/source3/rpc_server/samr/srv_samr_nt.c
- +++ b/source3/rpc_server/samr/srv_samr_nt.c
- @@ -6682,7 +6682,7 @@ NTSTATUS _samr_ValidatePassword(struct p
- NTSTATUS _samr_Shutdown(struct pipes_struct *p,
- struct samr_Shutdown *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -6692,7 +6692,7 @@ NTSTATUS _samr_Shutdown(struct pipes_str
- NTSTATUS _samr_SetMemberAttributesOfGroup(struct pipes_struct *p,
- struct samr_SetMemberAttributesOfGroup *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -6702,6 +6702,7 @@ NTSTATUS _samr_SetMemberAttributesOfGrou
- NTSTATUS _samr_TestPrivateFunctionsDomain(struct pipes_struct *p,
- struct samr_TestPrivateFunctionsDomain *r)
- {
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -6711,6 +6712,7 @@ NTSTATUS _samr_TestPrivateFunctionsDomai
- NTSTATUS _samr_TestPrivateFunctionsUser(struct pipes_struct *p,
- struct samr_TestPrivateFunctionsUser *r)
- {
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -6720,7 +6722,7 @@ NTSTATUS _samr_TestPrivateFunctionsUser(
- NTSTATUS _samr_AddMultipleMembersToAlias(struct pipes_struct *p,
- struct samr_AddMultipleMembersToAlias *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -6730,7 +6732,7 @@ NTSTATUS _samr_AddMultipleMembersToAlias
- NTSTATUS _samr_RemoveMultipleMembersFromAlias(struct pipes_struct *p,
- struct samr_RemoveMultipleMembersFromAlias *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -6740,7 +6742,7 @@ NTSTATUS _samr_RemoveMultipleMembersFrom
- NTSTATUS _samr_SetBootKeyInformation(struct pipes_struct *p,
- struct samr_SetBootKeyInformation *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -6750,7 +6752,7 @@ NTSTATUS _samr_SetBootKeyInformation(str
- NTSTATUS _samr_GetBootKeyInformation(struct pipes_struct *p,
- struct samr_GetBootKeyInformation *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- @@ -6760,6 +6762,6 @@ NTSTATUS _samr_GetBootKeyInformation(str
- NTSTATUS _samr_SetDsrmPassword(struct pipes_struct *p,
- struct samr_SetDsrmPassword *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return NT_STATUS_NOT_IMPLEMENTED;
- }
- --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
- +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
- @@ -10156,7 +10156,7 @@ WERROR _spoolss_AddPort(struct pipes_str
- WERROR _spoolss_GetPrinterDriver(struct pipes_struct *p,
- struct spoolss_GetPrinterDriver *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10167,7 +10167,7 @@ WERROR _spoolss_GetPrinterDriver(struct
- WERROR _spoolss_ReadPrinter(struct pipes_struct *p,
- struct spoolss_ReadPrinter *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10178,7 +10178,7 @@ WERROR _spoolss_ReadPrinter(struct pipes
- WERROR _spoolss_WaitForPrinterChange(struct pipes_struct *p,
- struct spoolss_WaitForPrinterChange *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10189,7 +10189,7 @@ WERROR _spoolss_WaitForPrinterChange(str
- WERROR _spoolss_ConfigurePort(struct pipes_struct *p,
- struct spoolss_ConfigurePort *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10200,7 +10200,7 @@ WERROR _spoolss_ConfigurePort(struct pip
- WERROR _spoolss_DeletePort(struct pipes_struct *p,
- struct spoolss_DeletePort *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10211,7 +10211,7 @@ WERROR _spoolss_DeletePort(struct pipes_
- WERROR _spoolss_CreatePrinterIC(struct pipes_struct *p,
- struct spoolss_CreatePrinterIC *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10222,7 +10222,7 @@ WERROR _spoolss_CreatePrinterIC(struct p
- WERROR _spoolss_PlayGDIScriptOnPrinterIC(struct pipes_struct *p,
- struct spoolss_PlayGDIScriptOnPrinterIC *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10233,7 +10233,7 @@ WERROR _spoolss_PlayGDIScriptOnPrinterIC
- WERROR _spoolss_DeletePrinterIC(struct pipes_struct *p,
- struct spoolss_DeletePrinterIC *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10244,7 +10244,7 @@ WERROR _spoolss_DeletePrinterIC(struct p
- WERROR _spoolss_AddPrinterConnection(struct pipes_struct *p,
- struct spoolss_AddPrinterConnection *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10255,7 +10255,7 @@ WERROR _spoolss_AddPrinterConnection(str
- WERROR _spoolss_DeletePrinterConnection(struct pipes_struct *p,
- struct spoolss_DeletePrinterConnection *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10266,7 +10266,7 @@ WERROR _spoolss_DeletePrinterConnection(
- WERROR _spoolss_PrinterMessageBox(struct pipes_struct *p,
- struct spoolss_PrinterMessageBox *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10277,7 +10277,7 @@ WERROR _spoolss_PrinterMessageBox(struct
- WERROR _spoolss_AddMonitor(struct pipes_struct *p,
- struct spoolss_AddMonitor *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10288,7 +10288,7 @@ WERROR _spoolss_AddMonitor(struct pipes_
- WERROR _spoolss_DeleteMonitor(struct pipes_struct *p,
- struct spoolss_DeleteMonitor *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10299,7 +10299,7 @@ WERROR _spoolss_DeleteMonitor(struct pip
- WERROR _spoolss_DeletePrintProcessor(struct pipes_struct *p,
- struct spoolss_DeletePrintProcessor *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10310,7 +10310,7 @@ WERROR _spoolss_DeletePrintProcessor(str
- WERROR _spoolss_AddPrintProvidor(struct pipes_struct *p,
- struct spoolss_AddPrintProvidor *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10321,7 +10321,7 @@ WERROR _spoolss_AddPrintProvidor(struct
- WERROR _spoolss_DeletePrintProvidor(struct pipes_struct *p,
- struct spoolss_DeletePrintProvidor *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10332,7 +10332,7 @@ WERROR _spoolss_DeletePrintProvidor(stru
- WERROR _spoolss_FindFirstPrinterChangeNotification(struct pipes_struct *p,
- struct spoolss_FindFirstPrinterChangeNotification *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10343,7 +10343,7 @@ WERROR _spoolss_FindFirstPrinterChangeNo
- WERROR _spoolss_FindNextPrinterChangeNotification(struct pipes_struct *p,
- struct spoolss_FindNextPrinterChangeNotification *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10354,7 +10354,7 @@ WERROR _spoolss_FindNextPrinterChangeNot
- WERROR _spoolss_RouterFindFirstPrinterChangeNotificationOld(struct pipes_struct *p,
- struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10365,7 +10365,7 @@ WERROR _spoolss_RouterFindFirstPrinterCh
- WERROR _spoolss_ReplyOpenPrinter(struct pipes_struct *p,
- struct spoolss_ReplyOpenPrinter *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10376,7 +10376,7 @@ WERROR _spoolss_ReplyOpenPrinter(struct
- WERROR _spoolss_RouterReplyPrinter(struct pipes_struct *p,
- struct spoolss_RouterReplyPrinter *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10387,7 +10387,7 @@ WERROR _spoolss_RouterReplyPrinter(struc
- WERROR _spoolss_ReplyClosePrinter(struct pipes_struct *p,
- struct spoolss_ReplyClosePrinter *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10398,7 +10398,7 @@ WERROR _spoolss_ReplyClosePrinter(struct
- WERROR _spoolss_AddPortEx(struct pipes_struct *p,
- struct spoolss_AddPortEx *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10409,7 +10409,7 @@ WERROR _spoolss_AddPortEx(struct pipes_s
- WERROR _spoolss_RouterFindFirstPrinterChangeNotification(struct pipes_struct *p,
- struct spoolss_RouterFindFirstPrinterChangeNotification *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10420,7 +10420,7 @@ WERROR _spoolss_RouterFindFirstPrinterCh
- WERROR _spoolss_SpoolerInit(struct pipes_struct *p,
- struct spoolss_SpoolerInit *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10431,7 +10431,7 @@ WERROR _spoolss_SpoolerInit(struct pipes
- WERROR _spoolss_ResetPrinterEx(struct pipes_struct *p,
- struct spoolss_ResetPrinterEx *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10442,7 +10442,7 @@ WERROR _spoolss_ResetPrinterEx(struct pi
- WERROR _spoolss_RouterReplyPrinterEx(struct pipes_struct *p,
- struct spoolss_RouterReplyPrinterEx *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10453,7 +10453,7 @@ WERROR _spoolss_RouterReplyPrinterEx(str
- WERROR _spoolss_44(struct pipes_struct *p,
- struct spoolss_44 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10464,7 +10464,7 @@ WERROR _spoolss_44(struct pipes_struct *
- WERROR _spoolss_SetPort(struct pipes_struct *p,
- struct spoolss_SetPort *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10475,7 +10475,7 @@ WERROR _spoolss_SetPort(struct pipes_str
- WERROR _spoolss_4a(struct pipes_struct *p,
- struct spoolss_4a *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10486,7 +10486,7 @@ WERROR _spoolss_4a(struct pipes_struct *
- WERROR _spoolss_4b(struct pipes_struct *p,
- struct spoolss_4b *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10497,7 +10497,7 @@ WERROR _spoolss_4b(struct pipes_struct *
- WERROR _spoolss_4c(struct pipes_struct *p,
- struct spoolss_4c *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10508,7 +10508,7 @@ WERROR _spoolss_4c(struct pipes_struct *
- WERROR _spoolss_53(struct pipes_struct *p,
- struct spoolss_53 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10519,7 +10519,7 @@ WERROR _spoolss_53(struct pipes_struct *
- WERROR _spoolss_AddPerMachineConnection(struct pipes_struct *p,
- struct spoolss_AddPerMachineConnection *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10530,7 +10530,7 @@ WERROR _spoolss_AddPerMachineConnection(
- WERROR _spoolss_DeletePerMachineConnection(struct pipes_struct *p,
- struct spoolss_DeletePerMachineConnection *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10541,7 +10541,7 @@ WERROR _spoolss_DeletePerMachineConnecti
- WERROR _spoolss_EnumPerMachineConnections(struct pipes_struct *p,
- struct spoolss_EnumPerMachineConnections *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10552,7 +10552,7 @@ WERROR _spoolss_EnumPerMachineConnection
- WERROR _spoolss_5a(struct pipes_struct *p,
- struct spoolss_5a *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10563,7 +10563,7 @@ WERROR _spoolss_5a(struct pipes_struct *
- WERROR _spoolss_5b(struct pipes_struct *p,
- struct spoolss_5b *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10574,7 +10574,7 @@ WERROR _spoolss_5b(struct pipes_struct *
- WERROR _spoolss_5c(struct pipes_struct *p,
- struct spoolss_5c *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10585,7 +10585,7 @@ WERROR _spoolss_5c(struct pipes_struct *
- WERROR _spoolss_5d(struct pipes_struct *p,
- struct spoolss_5d *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10596,7 +10596,7 @@ WERROR _spoolss_5d(struct pipes_struct *
- WERROR _spoolss_5e(struct pipes_struct *p,
- struct spoolss_5e *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10607,7 +10607,7 @@ WERROR _spoolss_5e(struct pipes_struct *
- WERROR _spoolss_5f(struct pipes_struct *p,
- struct spoolss_5f *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10618,7 +10618,7 @@ WERROR _spoolss_5f(struct pipes_struct *
- WERROR _spoolss_60(struct pipes_struct *p,
- struct spoolss_60 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10629,7 +10629,7 @@ WERROR _spoolss_60(struct pipes_struct *
- WERROR _spoolss_61(struct pipes_struct *p,
- struct spoolss_61 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10640,7 +10640,7 @@ WERROR _spoolss_61(struct pipes_struct *
- WERROR _spoolss_62(struct pipes_struct *p,
- struct spoolss_62 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10651,7 +10651,7 @@ WERROR _spoolss_62(struct pipes_struct *
- WERROR _spoolss_63(struct pipes_struct *p,
- struct spoolss_63 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10662,7 +10662,7 @@ WERROR _spoolss_63(struct pipes_struct *
- WERROR _spoolss_64(struct pipes_struct *p,
- struct spoolss_64 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10673,7 +10673,7 @@ WERROR _spoolss_64(struct pipes_struct *
- WERROR _spoolss_65(struct pipes_struct *p,
- struct spoolss_65 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10684,7 +10684,7 @@ WERROR _spoolss_65(struct pipes_struct *
- WERROR _spoolss_GetCorePrinterDrivers(struct pipes_struct *p,
- struct spoolss_GetCorePrinterDrivers *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10695,7 +10695,7 @@ WERROR _spoolss_GetCorePrinterDrivers(st
- WERROR _spoolss_67(struct pipes_struct *p,
- struct spoolss_67 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10706,7 +10706,7 @@ WERROR _spoolss_67(struct pipes_struct *
- WERROR _spoolss_GetPrinterDriverPackagePath(struct pipes_struct *p,
- struct spoolss_GetPrinterDriverPackagePath *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10717,7 +10717,7 @@ WERROR _spoolss_GetPrinterDriverPackageP
- WERROR _spoolss_69(struct pipes_struct *p,
- struct spoolss_69 *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10728,7 +10728,7 @@ WERROR _spoolss_69(struct pipes_struct *
- WERROR _spoolss_6a(struct pipes_struct *p,
- struct spoolss_6a *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10739,7 +10739,7 @@ WERROR _spoolss_6a(struct pipes_struct *
- WERROR _spoolss_6b(struct pipes_struct *p,
- struct spoolss_6b *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10750,7 +10750,7 @@ WERROR _spoolss_6b(struct pipes_struct *
- WERROR _spoolss_6c(struct pipes_struct *p,
- struct spoolss_6c *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -10761,6 +10761,6 @@ WERROR _spoolss_6c(struct pipes_struct *
- WERROR _spoolss_6d(struct pipes_struct *p,
- struct spoolss_6d *r)
- {
- - p->rng_fault_state = true;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
- --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
- +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
- @@ -2548,244 +2548,244 @@ WERROR _srvsvc_NetFileClose(struct pipes
- WERROR _srvsvc_NetCharDevEnum(struct pipes_struct *p,
- struct srvsvc_NetCharDevEnum *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetCharDevGetInfo(struct pipes_struct *p,
- struct srvsvc_NetCharDevGetInfo *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetCharDevControl(struct pipes_struct *p,
- struct srvsvc_NetCharDevControl *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetCharDevQEnum(struct pipes_struct *p,
- struct srvsvc_NetCharDevQEnum *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetCharDevQGetInfo(struct pipes_struct *p,
- struct srvsvc_NetCharDevQGetInfo *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetCharDevQSetInfo(struct pipes_struct *p,
- struct srvsvc_NetCharDevQSetInfo *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetCharDevQPurge(struct pipes_struct *p,
- struct srvsvc_NetCharDevQPurge *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetCharDevQPurgeSelf(struct pipes_struct *p,
- struct srvsvc_NetCharDevQPurgeSelf *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetFileGetInfo(struct pipes_struct *p,
- struct srvsvc_NetFileGetInfo *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetShareCheck(struct pipes_struct *p,
- struct srvsvc_NetShareCheck *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetServerStatisticsGet(struct pipes_struct *p,
- struct srvsvc_NetServerStatisticsGet *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetTransportAdd(struct pipes_struct *p,
- struct srvsvc_NetTransportAdd *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetTransportEnum(struct pipes_struct *p,
- struct srvsvc_NetTransportEnum *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetTransportDel(struct pipes_struct *p,
- struct srvsvc_NetTransportDel *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetSetServiceBits(struct pipes_struct *p,
- struct srvsvc_NetSetServiceBits *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetPathType(struct pipes_struct *p,
- struct srvsvc_NetPathType *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetPathCanonicalize(struct pipes_struct *p,
- struct srvsvc_NetPathCanonicalize *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetPathCompare(struct pipes_struct *p,
- struct srvsvc_NetPathCompare *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRPRNAMECANONICALIZE(struct pipes_struct *p,
- struct srvsvc_NETRPRNAMECANONICALIZE *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetPRNameCompare(struct pipes_struct *p,
- struct srvsvc_NetPRNameCompare *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetShareDelStart(struct pipes_struct *p,
- struct srvsvc_NetShareDelStart *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetShareDelCommit(struct pipes_struct *p,
- struct srvsvc_NetShareDelCommit *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetServerTransportAddEx(struct pipes_struct *p,
- struct srvsvc_NetServerTransportAddEx *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NetServerSetServiceBitsEx(struct pipes_struct *p,
- struct srvsvc_NetServerSetServiceBitsEx *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSGETVERSION(struct pipes_struct *p,
- struct srvsvc_NETRDFSGETVERSION *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSCREATELOCALPARTITION(struct pipes_struct *p,
- struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSDELETELOCALPARTITION(struct pipes_struct *p,
- struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct pipes_struct *p,
- struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSSETSERVERINFO(struct pipes_struct *p,
- struct srvsvc_NETRDFSSETSERVERINFO *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSCREATEEXITPOINT(struct pipes_struct *p,
- struct srvsvc_NETRDFSCREATEEXITPOINT *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSDELETEEXITPOINT(struct pipes_struct *p,
- struct srvsvc_NETRDFSDELETEEXITPOINT *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSMODIFYPREFIX(struct pipes_struct *p,
- struct srvsvc_NETRDFSMODIFYPREFIX *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSFIXLOCALVOLUME(struct pipes_struct *p,
- struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct pipes_struct *p,
- struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _srvsvc_NETRSERVERTRANSPORTDELEX(struct pipes_struct *p,
- struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
- --- a/source3/rpc_server/svcctl/srv_svcctl_nt.c
- +++ b/source3/rpc_server/svcctl/srv_svcctl_nt.c
- @@ -1004,195 +1004,195 @@ WERROR _svcctl_SetServiceObjectSecurity(
- WERROR _svcctl_DeleteService(struct pipes_struct *p,
- struct svcctl_DeleteService *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_SetServiceStatus(struct pipes_struct *p,
- struct svcctl_SetServiceStatus *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_NotifyBootConfigStatus(struct pipes_struct *p,
- struct svcctl_NotifyBootConfigStatus *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_SCSetServiceBitsW(struct pipes_struct *p,
- struct svcctl_SCSetServiceBitsW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_ChangeServiceConfigW(struct pipes_struct *p,
- struct svcctl_ChangeServiceConfigW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_CreateServiceW(struct pipes_struct *p,
- struct svcctl_CreateServiceW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_QueryServiceLockStatusW(struct pipes_struct *p,
- struct svcctl_QueryServiceLockStatusW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_GetServiceKeyNameW(struct pipes_struct *p,
- struct svcctl_GetServiceKeyNameW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_SCSetServiceBitsA(struct pipes_struct *p,
- struct svcctl_SCSetServiceBitsA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_ChangeServiceConfigA(struct pipes_struct *p,
- struct svcctl_ChangeServiceConfigA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_CreateServiceA(struct pipes_struct *p,
- struct svcctl_CreateServiceA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_EnumDependentServicesA(struct pipes_struct *p,
- struct svcctl_EnumDependentServicesA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_EnumServicesStatusA(struct pipes_struct *p,
- struct svcctl_EnumServicesStatusA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_OpenSCManagerA(struct pipes_struct *p,
- struct svcctl_OpenSCManagerA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_OpenServiceA(struct pipes_struct *p,
- struct svcctl_OpenServiceA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_QueryServiceConfigA(struct pipes_struct *p,
- struct svcctl_QueryServiceConfigA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_QueryServiceLockStatusA(struct pipes_struct *p,
- struct svcctl_QueryServiceLockStatusA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_StartServiceA(struct pipes_struct *p,
- struct svcctl_StartServiceA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_GetServiceDisplayNameA(struct pipes_struct *p,
- struct svcctl_GetServiceDisplayNameA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_GetServiceKeyNameA(struct pipes_struct *p,
- struct svcctl_GetServiceKeyNameA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_GetCurrentGroupeStateW(struct pipes_struct *p,
- struct svcctl_GetCurrentGroupeStateW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_EnumServiceGroupW(struct pipes_struct *p,
- struct svcctl_EnumServiceGroupW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_ChangeServiceConfig2A(struct pipes_struct *p,
- struct svcctl_ChangeServiceConfig2A *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_ChangeServiceConfig2W(struct pipes_struct *p,
- struct svcctl_ChangeServiceConfig2W *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_QueryServiceConfig2A(struct pipes_struct *p,
- struct svcctl_QueryServiceConfig2A *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _EnumServicesStatusExA(struct pipes_struct *p,
- struct EnumServicesStatusExA *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _EnumServicesStatusExW(struct pipes_struct *p,
- struct EnumServicesStatusExW *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- WERROR _svcctl_SCSendTSMessage(struct pipes_struct *p,
- struct svcctl_SCSendTSMessage *r)
- {
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
- --- a/source3/rpc_server/winreg/srv_winreg_nt.c
- +++ b/source3/rpc_server/winreg/srv_winreg_nt.c
- @@ -760,7 +760,7 @@ WERROR _winreg_SaveKeyEx(struct pipes_st
- /* fill in your code here if you think this call should
- do anything */
-
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -948,7 +948,7 @@ WERROR _winreg_UnLoadKey(struct pipes_st
- /* fill in your code here if you think this call should
- do anything */
-
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -962,7 +962,7 @@ WERROR _winreg_ReplaceKey(struct pipes_s
- /* fill in your code here if you think this call should
- do anything */
-
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -976,7 +976,7 @@ WERROR _winreg_LoadKey(struct pipes_stru
- /* fill in your code here if you think this call should
- do anything */
-
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -1139,6 +1139,6 @@ WERROR _winreg_DeleteKeyEx(struct pipes_
- /* fill in your code here if you think this call should
- do anything */
-
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
- --- a/source3/rpc_server/wkssvc/srv_wkssvc_nt.c
- +++ b/source3/rpc_server/wkssvc/srv_wkssvc_nt.c
- @@ -405,7 +405,7 @@ WERROR _wkssvc_NetWkstaSetInfo(struct pi
- struct wkssvc_NetWkstaSetInfo *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -608,7 +608,7 @@ WERROR _wkssvc_NetrWkstaUserGetInfo(stru
- struct wkssvc_NetrWkstaUserGetInfo *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -619,7 +619,7 @@ WERROR _wkssvc_NetrWkstaUserSetInfo(stru
- struct wkssvc_NetrWkstaUserSetInfo *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -630,7 +630,7 @@ WERROR _wkssvc_NetWkstaTransportEnum(str
- struct wkssvc_NetWkstaTransportEnum *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -641,7 +641,7 @@ WERROR _wkssvc_NetrWkstaTransportAdd(str
- struct wkssvc_NetrWkstaTransportAdd *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -652,7 +652,7 @@ WERROR _wkssvc_NetrWkstaTransportDel(str
- struct wkssvc_NetrWkstaTransportDel *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -663,7 +663,7 @@ WERROR _wkssvc_NetrUseAdd(struct pipes_s
- struct wkssvc_NetrUseAdd *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -674,7 +674,7 @@ WERROR _wkssvc_NetrUseGetInfo(struct pip
- struct wkssvc_NetrUseGetInfo *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -685,7 +685,7 @@ WERROR _wkssvc_NetrUseDel(struct pipes_s
- struct wkssvc_NetrUseDel *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -696,7 +696,7 @@ WERROR _wkssvc_NetrUseEnum(struct pipes_
- struct wkssvc_NetrUseEnum *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -707,7 +707,7 @@ WERROR _wkssvc_NetrMessageBufferSend(str
- struct wkssvc_NetrMessageBufferSend *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -718,7 +718,7 @@ WERROR _wkssvc_NetrWorkstationStatistics
- struct wkssvc_NetrWorkstationStatisticsGet *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -729,7 +729,7 @@ WERROR _wkssvc_NetrLogonDomainNameAdd(st
- struct wkssvc_NetrLogonDomainNameAdd *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -740,7 +740,7 @@ WERROR _wkssvc_NetrLogonDomainNameDel(st
- struct wkssvc_NetrLogonDomainNameDel *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -751,7 +751,7 @@ WERROR _wkssvc_NetrJoinDomain(struct pip
- struct wkssvc_NetrJoinDomain *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -762,7 +762,7 @@ WERROR _wkssvc_NetrUnjoinDomain(struct p
- struct wkssvc_NetrUnjoinDomain *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -773,7 +773,7 @@ WERROR _wkssvc_NetrRenameMachineInDomain
- struct wkssvc_NetrRenameMachineInDomain *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -784,7 +784,7 @@ WERROR _wkssvc_NetrValidateName(struct p
- struct wkssvc_NetrValidateName *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -795,7 +795,7 @@ WERROR _wkssvc_NetrGetJoinInformation(st
- struct wkssvc_NetrGetJoinInformation *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -806,7 +806,7 @@ WERROR _wkssvc_NetrGetJoinableOus(struct
- struct wkssvc_NetrGetJoinableOus *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -962,6 +962,7 @@ WERROR _wkssvc_NetrRenameMachineInDomain
- struct wkssvc_NetrRenameMachineInDomain2 *r)
- {
- /* for now just return not supported */
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -972,7 +973,7 @@ WERROR _wkssvc_NetrValidateName2(struct
- struct wkssvc_NetrValidateName2 *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -983,7 +984,7 @@ WERROR _wkssvc_NetrGetJoinableOus2(struc
- struct wkssvc_NetrGetJoinableOus2 *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -994,7 +995,7 @@ WERROR _wkssvc_NetrAddAlternateComputerN
- struct wkssvc_NetrAddAlternateComputerName *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -1005,7 +1006,7 @@ WERROR _wkssvc_NetrRemoveAlternateComput
- struct wkssvc_NetrRemoveAlternateComputerName *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -1016,7 +1017,7 @@ WERROR _wkssvc_NetrSetPrimaryComputernam
- struct wkssvc_NetrSetPrimaryComputername *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
-
- @@ -1027,6 +1028,6 @@ WERROR _wkssvc_NetrEnumerateComputerName
- struct wkssvc_NetrEnumerateComputerNames *r)
- {
- /* FIXME: Add implementation code here */
- - p->rng_fault_state = True;
- + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
- return WERR_NOT_SUPPORTED;
- }
- --- a/libcli/auth/smbencrypt.c
- +++ b/libcli/auth/smbencrypt.c
- @@ -355,11 +355,18 @@ DATA_BLOB NTLMv2_generate_names_blob(TAL
- DATA_BLOB names_blob = data_blob_talloc(mem_ctx, NULL, 0);
-
- /* Deliberately ignore return here.. */
- - (void)msrpc_gen(mem_ctx, &names_blob,
- - "aaa",
- - MsvAvNbDomainName, domain,
- - MsvAvNbComputerName, hostname,
- - MsvAvEOL, "");
- + if (hostname != NULL) {
- + (void)msrpc_gen(mem_ctx, &names_blob,
- + "aaa",
- + MsvAvNbDomainName, domain,
- + MsvAvNbComputerName, hostname,
- + MsvAvEOL, "");
- + } else {
- + (void)msrpc_gen(mem_ctx, &names_blob,
- + "aa",
- + MsvAvNbDomainName, domain,
- + MsvAvEOL, "");
- + }
- return names_blob;
- }
-
|