Changeset 988 for vendor/current/source4/ntptr
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- Location:
- vendor/current/source4/ntptr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source4/ntptr/ntptr_base.c
r740 r988 26 26 #include "ntptr/ntptr.h" 27 27 #include "param/param.h" 28 #include "lib/util/samba_modules.h" 28 29 29 30 /* the list of currently registered NTPTR backends */ … … 69 70 } 70 71 71 NTSTATUS ntptr_init( struct loadparm_context *lp_ctx)72 NTSTATUS ntptr_init(void) 72 73 { 73 74 #define _MODULE_PROTO(init) extern NTSTATUS init(void); 74 75 STATIC_ntptr_MODULES_PROTO; 75 76 init_module_fn static_init[] = { STATIC_ntptr_MODULES }; 76 init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx,"ntptr");77 init_module_fn *shared_init = load_samba_modules(NULL, "ntptr"); 77 78 78 79 run_init_functions(static_init); -
vendor/current/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
r740 r988 41 41 #include "param/param.h" 42 42 43 NTSTATUS ntptr_simple_ldb_init(void); 44 43 45 /* 44 46 connect to the SPOOLSS database … … 47 49 static struct ldb_context *sptr_db_connect(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx) 48 50 { 49 return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lpcfg_spoolss_url(lp_ctx), system_session(lp_ctx),51 return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, "spoolss.ldb", system_session(lp_ctx), 50 52 NULL, 0); 51 53 } … … 318 320 */ 319 321 320 switch (r->in. level) {322 switch (r->in.info_ctr->level) { 321 323 case 1: 322 if (!r->in.info .info1) {324 if (!r->in.info_ctr->info.info1) { 323 325 return WERR_FOOBAR; 324 326 } … … 326 328 ldb_dn_new(mem_ctx, sptr_db, "CN=Forms,CN=PrintServer"), 327 329 &msgs, attrs, "(&(form-name=%s)(objectClass=form))", 328 r->in.info .info1->form_name);330 r->in.info_ctr->info.info1->form_name); 329 331 330 332 if (count == 1) return WERR_FOOBAR; … … 332 334 if (count < 0) return WERR_GENERAL_FAILURE; 333 335 334 if (r->in.info .info1->flags != SPOOLSS_FORM_USER) {336 if (r->in.info_ctr->info.info1->flags != SPOOLSS_FORM_USER) { 335 337 return WERR_FOOBAR; 336 338 } … … 340 342 341 343 /* add core elements to the ldb_message for the Form */ 342 msg->dn = ldb_dn_new_fmt(msg, sptr_db, "form-name=%s,CN=Forms,CN=PrintServer", r->in.info .info1->form_name);344 msg->dn = ldb_dn_new_fmt(msg, sptr_db, "form-name=%s,CN=Forms,CN=PrintServer", r->in.info_ctr->info.info1->form_name); 343 345 SET_STRING(sptr_db, msg, "objectClass", "form"); 344 346 345 SET_UINT(sptr_db, msg, "flags", r->in.info .info1->flags);346 347 SET_STRING(sptr_db, msg, "form-name", r->in.info .info1->form_name);348 349 SET_UINT(sptr_db, msg, "size-width", r->in.info .info1->size.width);350 SET_UINT(sptr_db, msg, "size-height", r->in.info .info1->size.height);351 352 SET_UINT(sptr_db, msg, "area-left", r->in.info .info1->area.left);353 SET_UINT(sptr_db, msg, "area-top", r->in.info .info1->area.top);354 SET_UINT(sptr_db, msg, "area-right", r->in.info .info1->area.right);355 SET_UINT(sptr_db, msg, "area-bottom", r->in.info .info1->area.bottom);347 SET_UINT(sptr_db, msg, "flags", r->in.info_ctr->info.info1->flags); 348 349 SET_STRING(sptr_db, msg, "form-name", r->in.info_ctr->info.info1->form_name); 350 351 SET_UINT(sptr_db, msg, "size-width", r->in.info_ctr->info.info1->size.width); 352 SET_UINT(sptr_db, msg, "size-height", r->in.info_ctr->info.info1->size.height); 353 354 SET_UINT(sptr_db, msg, "area-left", r->in.info_ctr->info.info1->area.left); 355 SET_UINT(sptr_db, msg, "area-top", r->in.info_ctr->info.info1->area.top); 356 SET_UINT(sptr_db, msg, "area-right", r->in.info_ctr->info.info1->area.right); 357 SET_UINT(sptr_db, msg, "area-bottom", r->in.info_ctr->info.info1->area.bottom); 356 358 break; 357 359 default: … … 382 384 */ 383 385 384 switch (r->in. level) {386 switch (r->in.info_ctr->level) { 385 387 case 1: 386 if (!r->in.info .info1) {388 if (!r->in.info_ctr->info.info1) { 387 389 return WERR_FOOBAR; 388 390 } … … 391 393 ldb_dn_new(mem_ctx, sptr_db, "CN=Forms,CN=PrintServer"), 392 394 &msgs, attrs, "(&(form-name=%s)(objectClass=form))", 393 r->in.info .info1->form_name);395 r->in.info_ctr->info.info1->form_name); 394 396 395 397 if (count == 0) return WERR_FOOBAR; … … 408 410 msg->dn = msgs[0]->dn; 409 411 410 SET_UINT(sptr_db, msg, "flags", r->in.info .info1->flags);411 412 SET_STRING(sptr_db, msg, "form-name", r->in.info .info1->form_name);413 414 SET_UINT(sptr_db, msg, "size-width", r->in.info .info1->size.width);415 SET_UINT(sptr_db, msg, "size-height", r->in.info .info1->size.height);416 417 SET_UINT(sptr_db, msg, "area-left", r->in.info .info1->area.left);418 SET_UINT(sptr_db, msg, "area-top", r->in.info .info1->area.top);419 SET_UINT(sptr_db, msg, "area-right", r->in.info .info1->area.right);420 SET_UINT(sptr_db, msg, "area-bottom", r->in.info .info1->area.bottom);412 SET_UINT(sptr_db, msg, "flags", r->in.info_ctr->info.info1->flags); 413 414 SET_STRING(sptr_db, msg, "form-name", r->in.info_ctr->info.info1->form_name); 415 416 SET_UINT(sptr_db, msg, "size-width", r->in.info_ctr->info.info1->size.width); 417 SET_UINT(sptr_db, msg, "size-height", r->in.info_ctr->info.info1->size.height); 418 419 SET_UINT(sptr_db, msg, "area-left", r->in.info_ctr->info.info1->area.left); 420 SET_UINT(sptr_db, msg, "area-top", r->in.info_ctr->info.info1->area.top); 421 SET_UINT(sptr_db, msg, "area-right", r->in.info_ctr->info.info1->area.right); 422 SET_UINT(sptr_db, msg, "area-bottom", r->in.info_ctr->info.info1->area.bottom); 421 423 break; 422 424 default: -
vendor/current/source4/ntptr/wscript_build
r740 r988 5 5 subsystem='ntptr', 6 6 init_function='ntptr_simple_ldb_init', 7 deps='ldb NDR_SPOOLSS DCERPC_COMMON ldbsamba' 7 deps='ldb NDR_SPOOLSS DCERPC_COMMON ldbsamba', 8 enabled=bld.AD_DC_BUILD_IS_ENABLED() 8 9 ) 9 10 … … 12 13 source='ntptr_base.c ntptr_interface.c', 13 14 autoproto='ntptr_proto.h', 14 public_deps='DCERPC_COMMON' 15 public_deps='DCERPC_COMMON', 16 enabled=bld.AD_DC_BUILD_IS_ENABLED() 15 17 ) 16 18
Note:
See TracChangeset
for help on using the changeset viewer.