The branch, v3-devel has been updated via f48e0cacdf7ed458e0e89ab151e3d233fb89240b (commit) via 84a25e69947c077623165fe4535cddd48aba0a3e (commit) via 00ecf8205c4cd4a4c150b204811d448d0ac53c0d (commit) from 079c75ef3c169c7a5d81bcaa0b70b6e0df2c464d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-devel - Log ----------------------------------------------------------------- commit f48e0cacdf7ed458e0e89ab151e3d233fb89240b Author: Günther Deschner <[EMAIL PROTECTED]> Date: Fri Sep 5 16:28:56 2008 +0200 net: use NETSETUP flags consistently. Guenther commit 84a25e69947c077623165fe4535cddd48aba0a3e Author: Günther Deschner <[EMAIL PROTECTED]> Date: Fri Sep 5 23:21:58 2008 +0200 netapi: re-arrange a little NetLocalGroupSetMembers example code. Guenther commit 00ecf8205c4cd4a4c150b204811d448d0ac53c0d Author: Günther Deschner <[EMAIL PROTECTED]> Date: Fri Sep 5 14:01:17 2008 +0200 netapi: fix NetShareGetInfo example output. Guenther ----------------------------------------------------------------------- Summary of changes: .../examples/localgroup/localgroup_setmembers.c | 13 +++++++++---- source/lib/netapi/examples/share/share_getinfo.c | 2 +- source/utils/net_dom.c | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/netapi/examples/localgroup/localgroup_setmembers.c b/source/lib/netapi/examples/localgroup/localgroup_setmembers.c index acee5cd..c35f2bb 100644 --- a/source/lib/netapi/examples/localgroup/localgroup_setmembers.c +++ b/source/lib/netapi/examples/localgroup/localgroup_setmembers.c @@ -40,6 +40,7 @@ int main(int argc, const char **argv) uint32_t level = 3; const char **names = NULL; int i = 0; + size_t buf_size = 0; poptContext pc; int opt; @@ -85,8 +86,9 @@ int main(int argc, const char **argv) switch (level) { case 0: - status = NetApiBufferAllocate(sizeof(struct LOCALGROUP_MEMBERS_INFO_0) * total_entries, - (void **)&g0); + buf_size = sizeof(struct LOCALGROUP_MEMBERS_INFO_0) * total_entries; + + status = NetApiBufferAllocate(buf_size, (void **)&g0); if (status) { printf("NetApiBufferAllocate failed with: %s\n", libnetapi_get_error_string(ctx, status)); @@ -103,8 +105,9 @@ int main(int argc, const char **argv) buffer = (uint8_t *)g0; break; case 3: - status = NetApiBufferAllocate(sizeof(struct LOCALGROUP_MEMBERS_INFO_3) * total_entries, - (void **)&g3); + buf_size = sizeof(struct LOCALGROUP_MEMBERS_INFO_3) * total_entries; + + status = NetApiBufferAllocate(buf_size, (void **)&g3); if (status) { printf("NetApiBufferAllocate failed with: %s\n", libnetapi_get_error_string(ctx, status)); @@ -133,6 +136,8 @@ int main(int argc, const char **argv) libnetapi_get_error_string(ctx, status)); } + NetApiBufferFree(buffer); + out: libnetapi_free(ctx); poptFreeContext(pc); diff --git a/source/lib/netapi/examples/share/share_getinfo.c b/source/lib/netapi/examples/share/share_getinfo.c index 5b3bbc3..479da5c 100644 --- a/source/lib/netapi/examples/share/share_getinfo.c +++ b/source/lib/netapi/examples/share/share_getinfo.c @@ -137,7 +137,7 @@ int main(int argc, const char **argv) printf("flags: %d\n", i501->shi501_flags); break; case 1005: - printf("flags: %s\n", i1005->shi1005_flags); + printf("flags: %d\n", i1005->shi1005_flags); break; default: break; diff --git a/source/utils/net_dom.c b/source/utils/net_dom.c index 5544cf8..132630d 100644 --- a/source/utils/net_dom.c +++ b/source/utils/net_dom.c @@ -143,7 +143,7 @@ static int net_dom_join(struct net_context *c, int argc, const char **argv) } if (c->opt_force) { - join_flags |= WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED; + join_flags |= NETSETUP_DOMAIN_JOIN_IF_JOINED; } for (i=0; i<argc; i++) { -- Samba Shared Repository