Changeset 745 for trunk/server/source3/lib/netapi/share.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
source3/lib/netapi/share.c (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/lib/netapi/share.c
r596 r745 24 24 #include "lib/netapi/netapi_private.h" 25 25 #include "lib/netapi/libnetapi.h" 26 #include "../librpc/gen_ndr/ cli_srvsvc.h"26 #include "../librpc/gen_ndr/c.h" 27 27 28 28 /**************************************************************** … … 183 183 WERROR werr; 184 184 NTSTATUS status; 185 struct rpc_pipe_client *pipe_cli = NULL;186 185 union srvsvc_NetShareInfo info; 186 187 187 188 188 if (!r->in.buffer) { … … 200 200 } 201 201 202 werr = libnetapi_ open_pipe(ctx, r->in.server_name,203 &ndr_table_srvsvc.syntax_id,204 &pipe_cli);202 werr = libnetapi_e(ctx, r->in.server_name, 203 &ndr_table_srvsvc.syntax_id, 204 ); 205 205 if (!W_ERROR_IS_OK(werr)) { 206 206 goto done; … … 216 216 } 217 217 218 status = rpccli_srvsvc_NetShareAdd(pipe_cli, talloc_tos(),218 status = , talloc_tos(), 219 219 r->in.server_name, 220 220 r->in.level, … … 222 222 r->out.parm_err, 223 223 &werr); 224 225 226 227 228 224 229 if (!W_ERROR_IS_OK(werr)) { 225 230 goto done; … … 247 252 WERROR werr; 248 253 NTSTATUS status; 249 struct rpc_pipe_client *pipe_cli = NULL;254 struct ; 250 255 251 256 if (!r->in.net_name) { … … 253 258 } 254 259 255 werr = libnetapi_ open_pipe(ctx, r->in.server_name,256 &ndr_table_srvsvc.syntax_id,257 &pipe_cli);258 if (!W_ERROR_IS_OK(werr)) { 259 goto done; 260 } 261 262 status = rpccli_srvsvc_NetShareDel(pipe_cli, talloc_tos(),260 werr = libnetapi_e(ctx, r->in.server_name, 261 &ndr_table_srvsvc.syntax_id, 262 ); 263 if (!W_ERROR_IS_OK(werr)) { 264 goto done; 265 } 266 267 status = , talloc_tos(), 263 268 r->in.server_name, 264 269 r->in.net_name, … … 291 296 WERROR werr; 292 297 NTSTATUS status; 293 struct rpc_pipe_client *pipe_cli = NULL;294 298 struct srvsvc_NetShareInfoCtr info_ctr; 295 299 struct srvsvc_NetShareCtr0 ctr0; … … 297 301 struct srvsvc_NetShareCtr2 ctr2; 298 302 uint32_t i; 303 299 304 300 305 if (!r->out.buffer) { … … 316 321 ZERO_STRUCT(info_ctr); 317 322 318 werr = libnetapi_ open_pipe(ctx, r->in.server_name,319 &ndr_table_srvsvc.syntax_id,320 &pipe_cli);323 werr = libnetapi_e(ctx, r->in.server_name, 324 &ndr_table_srvsvc.syntax_id, 325 ); 321 326 if (!W_ERROR_IS_OK(werr)) { 322 327 goto done; … … 339 344 } 340 345 341 status = rpccli_srvsvc_NetShareEnumAll(pipe_cli, talloc_tos(),346 status = , talloc_tos(), 342 347 r->in.server_name, 343 348 &info_ctr, … … 346 351 r->out.resume_handle, 347 352 &werr); 348 if (NT_STATUS_IS_ERR(status)) { 353 if (!NT_STATUS_IS_OK(status)) { 354 werr = ntstatus_to_werror(status); 355 goto done; 356 } 357 358 if (!W_ERROR_IS_OK(werr) && !W_ERROR_EQUAL(werr, WERR_MORE_DATA)) { 349 359 goto done; 350 360 } … … 371 381 if (!NT_STATUS_IS_OK(status)) { 372 382 werr = ntstatus_to_werror(status); 383 373 384 } 374 385 } … … 395 406 WERROR werr; 396 407 NTSTATUS status; 397 struct rpc_pipe_client *pipe_cli = NULL;398 408 union srvsvc_NetShareInfo info; 399 409 uint32_t num_entries = 0; 410 400 411 401 412 if (!r->in.net_name || !r->out.buffer) { … … 417 428 } 418 429 419 werr = libnetapi_ open_pipe(ctx, r->in.server_name,420 &ndr_table_srvsvc.syntax_id,421 &pipe_cli);422 if (!W_ERROR_IS_OK(werr)) { 423 goto done; 424 } 425 426 status = rpccli_srvsvc_NetShareGetInfo(pipe_cli, talloc_tos(),430 werr = libnetapi_e(ctx, r->in.server_name, 431 &ndr_table_srvsvc.syntax_id, 432 ); 433 if (!W_ERROR_IS_OK(werr)) { 434 goto done; 435 } 436 437 status = , talloc_tos(), 427 438 r->in.server_name, 428 439 r->in.net_name, … … 430 441 &info, 431 442 &werr); 443 444 445 446 432 447 433 448 if (!W_ERROR_IS_OK(werr)) { … … 465 480 WERROR werr; 466 481 NTSTATUS status; 467 struct rpc_pipe_client *pipe_cli = NULL;468 482 union srvsvc_NetShareInfo info; 483 469 484 470 485 if (!r->in.buffer) { … … 487 502 } 488 503 489 werr = libnetapi_ open_pipe(ctx, r->in.server_name,490 &ndr_table_srvsvc.syntax_id,491 &pipe_cli);504 werr = libnetapi_e(ctx, r->in.server_name, 505 &ndr_table_srvsvc.syntax_id, 506 ); 492 507 if (!W_ERROR_IS_OK(werr)) { 493 508 goto done; … … 503 518 } 504 519 505 status = rpccli_srvsvc_NetShareSetInfo(pipe_cli, talloc_tos(),520 status = , talloc_tos(), 506 521 r->in.server_name, 507 522 r->in.net_name, … … 510 525 r->out.parm_err, 511 526 &werr); 527 528 529 530 531 512 532 if (!W_ERROR_IS_OK(werr)) { 513 533 goto done;
Note:
See TracChangeset
for help on using the changeset viewer.
