From 749f699f871831e9ad5b2a57e498a32f959d23c6 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 12 Dec 2007 18:14:54 +0100 Subject: Build fixes for libnetapi. Guenther (This used to be commit 07d33557b95106ac57fdef8c767ab86192930a6d) --- source3/lib/netapi/netapi.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 source3/lib/netapi/netapi.h (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h new file mode 100644 index 0000000000..ad9fbe4209 --- /dev/null +++ b/source3/lib/netapi/netapi.h @@ -0,0 +1,26 @@ +/* + * Unix SMB/CIFS implementation. + * NetApi Support + * Copyright (C) Guenther Deschner 2007 + * + * 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 . + */ + +struct libnetapi_ctx { + int debuglevel; +}; + +WERROR libnetapi_init(struct libnetapi_ctx **ctx); + +#include "joindomain.h" -- cgit From 7482a18c83d25b2d00e1086aafb33d9a0ff98309 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 12 Dec 2007 19:00:41 +0100 Subject: More minor libnetapi fixes. Guenther (This used to be commit 9f129c069f9feb357cbe1185058cfe3390609c09) --- source3/lib/netapi/netapi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index ad9fbe4209..ec629d56d9 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -22,5 +22,6 @@ struct libnetapi_ctx { }; WERROR libnetapi_init(struct libnetapi_ctx **ctx); +WERROR libnetapi_free(struct libnetapi_ctx *ctx); #include "joindomain.h" -- cgit From 41410c86cc698f997dd82a143fd92277060384b0 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 14 Dec 2007 12:22:20 +0100 Subject: Some libnet and netapi build fixes. Guenther (This used to be commit 1d47247283f7bc75291007be3fde72b1d3d95b99) --- source3/lib/netapi/netapi.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index ec629d56d9..0810ecb7bc 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -17,6 +17,9 @@ * along with this program; if not, see . */ +#ifndef __LIB_NETAPI_H__ +#define __LIB_NETAPI_H__ + struct libnetapi_ctx { int debuglevel; }; @@ -25,3 +28,5 @@ WERROR libnetapi_init(struct libnetapi_ctx **ctx); WERROR libnetapi_free(struct libnetapi_ctx *ctx); #include "joindomain.h" + +#endif -- cgit From 9dc0ac4637fdd05a95099c0a6a857c51ca811453 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 18 Dec 2007 02:15:49 +0100 Subject: Getting rid of external credentials in libnetapi. Guenther (This used to be commit c10481dba01a084b0f9c4265f3408a0ec9a8b646) --- source3/lib/netapi/netapi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 0810ecb7bc..0637570c3e 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -22,6 +22,9 @@ struct libnetapi_ctx { int debuglevel; + char *username; + char *workgroup; + char *password; }; WERROR libnetapi_init(struct libnetapi_ctx **ctx); -- cgit From 4dd84b351125cdd95c945d8820ffe078f7325988 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 18 Dec 2007 02:21:38 +0100 Subject: Define NET_API_STATUS to be just a uin32_t. Guenther (This used to be commit a42850926a26a4065a6126affc3754d291a2e178) --- source3/lib/netapi/netapi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 0637570c3e..7946cfb446 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -20,6 +20,8 @@ #ifndef __LIB_NETAPI_H__ #define __LIB_NETAPI_H__ +#define NET_API_STATUS uint32_t + struct libnetapi_ctx { int debuglevel; char *username; -- cgit From 3d853b8e7e975a3e1c07a125e775e3a597112912 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 18 Dec 2007 02:29:50 +0100 Subject: Move basic libnetapi functions to NET_API_STATUS. Guenther (This used to be commit 086c55005976b3173e915e465108214876aa5bd6) --- source3/lib/netapi/netapi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 7946cfb446..3dfbc0cffb 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -29,8 +29,8 @@ struct libnetapi_ctx { char *password; }; -WERROR libnetapi_init(struct libnetapi_ctx **ctx); -WERROR libnetapi_free(struct libnetapi_ctx *ctx); +NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx); +NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx); #include "joindomain.h" -- cgit From c9b44e0fc3750afb6e001baceffad8fa2f33ac4e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 18 Dec 2007 02:34:07 +0100 Subject: Add basic credential functions for libnetapi. Guenther (This used to be commit 7c38f706b5dc17f15708ac932c84d863a0cc713e) --- source3/lib/netapi/netapi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 3dfbc0cffb..d75299601f 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -31,6 +31,9 @@ struct libnetapi_ctx { NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx); NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx); +NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx, const char *username); +NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, const char *password); +NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, const char *workgroup); #include "joindomain.h" -- cgit From d14ee1dc08c5c765b07bd472e47e34152db2f9d3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 18 Dec 2007 02:43:22 +0100 Subject: Use full string based debug_parse_levels in libnetapi. Guenther (This used to be commit 78d8f0e41aa3db0060596a7b345c2f04261986e0) --- source3/lib/netapi/netapi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index d75299601f..278922224d 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -23,7 +23,7 @@ #define NET_API_STATUS uint32_t struct libnetapi_ctx { - int debuglevel; + const char *debuglevel; char *username; char *workgroup; char *password; @@ -31,6 +31,8 @@ struct libnetapi_ctx { NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx); NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx); +NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx, const char *debuglevel); +NET_API_STATUS libnetapi_get_debuglevel(struct libnetapi_ctx *ctx, const char **debuglevel); NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx, const char *username); NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, const char *password); NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, const char *workgroup); -- cgit From fb2c13fe191212f5e782b398fa4dffa42bfba129 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 18 Dec 2007 02:47:01 +0100 Subject: Add static libnetapi_ctx. Guenther (This used to be commit 97449ea341539a709953a57869570cf13be0f44e) --- source3/lib/netapi/netapi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 278922224d..0b25c93d5b 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -30,6 +30,7 @@ struct libnetapi_ctx { }; NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx); +NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx); NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx); NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx, const char *debuglevel); NET_API_STATUS libnetapi_get_debuglevel(struct libnetapi_ctx *ctx, const char **debuglevel); -- cgit From af08d8be3063ada42637a4ae7437499b03457de2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 19 Dec 2007 12:09:08 +0100 Subject: Add libnetapi_errstr(). Guenther (This used to be commit 465e61a3599a277366ada6ecda3a1e6ddb1f2490) --- source3/lib/netapi/netapi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 0b25c93d5b..232d9c154f 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -37,6 +37,7 @@ NET_API_STATUS libnetapi_get_debuglevel(struct libnetapi_ctx *ctx, const char ** NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx, const char *username); NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, const char *password); NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, const char *workgroup); +const char *libnetapi_errstr(struct libnetapi_ctx *ctx, NET_API_STATUS status); #include "joindomain.h" -- cgit From 721d36df8372dd45430a93c99180bb94ec7d9773 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 19 Dec 2007 15:10:24 +0100 Subject: Add NetServerGetInfo and NetServerSetInfo (for level 1005). Guenther (This used to be commit 1cad549f54563c3a9787624ba7a56b54107ebd57) --- source3/lib/netapi/netapi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 232d9c154f..a1137b45ee 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -40,5 +40,6 @@ NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, const char *wo const char *libnetapi_errstr(struct libnetapi_ctx *ctx, NET_API_STATUS status); #include "joindomain.h" +#include "serverinfo.h" #endif -- cgit From 5479c50c37ee78037a96df8844fd06b1b0c9ccbb Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 20 Dec 2007 01:19:26 +0100 Subject: Merge all headers into libnetapi.h. Guenther (This used to be commit a2c5beda2ec98dea8951fb3a37774f5f325410ef) --- source3/lib/netapi/netapi.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index a1137b45ee..bbd2282a77 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -39,7 +39,27 @@ NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, const char *pas NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, const char *workgroup); const char *libnetapi_errstr(struct libnetapi_ctx *ctx, NET_API_STATUS status); -#include "joindomain.h" -#include "serverinfo.h" +/* wkssvc */ +NET_API_STATUS NetJoinDomain(const char *server, + const char *domain, + const char *account_ou, + const char *account, + const char *password, + uint32_t join_options); +NET_API_STATUS NetUnjoinDomain(const char *server_name, + const char *account, + const char *password, + uint32_t unjoin_flags); +NET_API_STATUS NetGetJoinInformation(const char *server_name, + const char **name_buffer, + uint16_t *name_type); +/* srvsvc */ +NET_API_STATUS NetServerGetInfo(const char *server_name, + uint32_t level, + uint8_t **buffer); +NET_API_STATUS NetServerSetInfo(const char *server_name, + uint32_t level, + uint8_t *buffer, + uint32_t *parm_error); #endif -- cgit From eddd190921f2b322a227044a5c8067397f80c0f5 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 21 Dec 2007 15:51:00 +0100 Subject: Add basic remote NetGetDCName and NetGetAnyDCName versions to libnetapi. Guenther (This used to be commit 5bc49546a32abb4524133b9f2916cdd51d4eb462) --- source3/lib/netapi/netapi.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index bbd2282a77..0dd6d95ceb 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -62,4 +62,13 @@ NET_API_STATUS NetServerSetInfo(const char *server_name, uint32_t level, uint8_t *buffer, uint32_t *parm_error); + +/* netlogon */ +NET_API_STATUS NetGetDCName(const char *server_name, + const char *domain_name, + uint8_t **buffer); +NET_API_STATUS NetGetAnyDCName(const char *server_name, + const char *domain_name, + uint8_t **buffer); + #endif -- cgit From fa1e5e95d505d28eb50398511f95ebf13a28b4e5 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 7 Jan 2008 18:36:06 +0100 Subject: Add NET_API_STATUS_SUCCESS define. Guenther (This used to be commit a72ad63163a8c642ea762087a739e6d63c37647a) --- source3/lib/netapi/netapi.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 0dd6d95ceb..2c6e126949 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1,7 +1,7 @@ /* * Unix SMB/CIFS implementation. * NetApi Support - * Copyright (C) Guenther Deschner 2007 + * Copyright (C) Guenther Deschner 2007-2008 * * 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 @@ -21,6 +21,10 @@ #define __LIB_NETAPI_H__ #define NET_API_STATUS uint32_t +#define NET_API_STATUS_SUCCESS 0 + +/**************************************************************** +****************************************************************/ struct libnetapi_ctx { const char *debuglevel; -- cgit From 1b3520db8836437b9d4d48fab4df69126c1d9b5d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 7 Jan 2008 20:03:32 +0100 Subject: Add krb5 cc env to libnetapi_ctx. Guenther (This used to be commit df2b078fa1658bdbff1280f7fe0b062d9eabd60c) --- source3/lib/netapi/netapi.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 2c6e126949..3c9d3b3853 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -31,8 +31,12 @@ struct libnetapi_ctx { char *username; char *workgroup; char *password; + char *krb5_cc_env; }; +/**************************************************************** +****************************************************************/ + NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx); NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx); NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx); -- cgit From 751fc874bec2cbc93b4a84067f3e7102f39bd76c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 7 Jan 2008 20:06:41 +0100 Subject: Add libnetapi_set_error_string and libnetapi_get_error_string. Guenther (This used to be commit f8806bad8134d544229c426f58bee143ba752cf8) --- source3/lib/netapi/netapi.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 3c9d3b3853..46dd8e1a24 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -27,7 +27,8 @@ ****************************************************************/ struct libnetapi_ctx { - const char *debuglevel; + char *debuglevel; + char *error_string; char *username; char *workgroup; char *password; @@ -41,11 +42,16 @@ NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx); NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx); NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx); NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx, const char *debuglevel); -NET_API_STATUS libnetapi_get_debuglevel(struct libnetapi_ctx *ctx, const char **debuglevel); +NET_API_STATUS libnetapi_get_debuglevel(struct libnetapi_ctx *ctx, char **debuglevel); NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx, const char *username); NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, const char *password); NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, const char *workgroup); const char *libnetapi_errstr(struct libnetapi_ctx *ctx, NET_API_STATUS status); +NET_API_STATUS libnetapi_set_error_string(struct libnetapi_ctx *ctx, const char *error_string); +const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx); + +/**************************************************************** +****************************************************************/ /* wkssvc */ NET_API_STATUS NetJoinDomain(const char *server, -- cgit From a01dc30db7cb16c794f5daf23ad2df607f891626 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 8 Jan 2008 11:53:38 +0100 Subject: Add NetApiBufferFree() to libnetapi. Guenther (This used to be commit c49196954d38f0c2851abbfe25086cd6fe660a2e) --- source3/lib/netapi/netapi.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 46dd8e1a24..4a40b32fc9 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -53,6 +53,11 @@ const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx); /**************************************************************** ****************************************************************/ +NET_API_STATUS NetApiBufferFree(void *buffer); + +/**************************************************************** +****************************************************************/ + /* wkssvc */ NET_API_STATUS NetJoinDomain(const char *server, const char *domain, -- cgit From 4eed7883bb0832157461cac1f0efcd6398746d7d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 11 Jan 2008 14:47:23 +0100 Subject: Refactor libnetapi error string functions a bit. Guenther (This used to be commit 3b450a8bcc97b6d03c4b7b9373a3a382c0fcea30) --- source3/lib/netapi/netapi.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 4a40b32fc9..61cece119f 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -46,9 +46,10 @@ NET_API_STATUS libnetapi_get_debuglevel(struct libnetapi_ctx *ctx, char **debugl NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx, const char *username); NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, const char *password); NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, const char *workgroup); -const char *libnetapi_errstr(struct libnetapi_ctx *ctx, NET_API_STATUS status); +const char *libnetapi_errstr(NET_API_STATUS status); NET_API_STATUS libnetapi_set_error_string(struct libnetapi_ctx *ctx, const char *error_string); -const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx); +const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx, NET_API_STATUS status); + /**************************************************************** ****************************************************************/ -- cgit From 7a87256cd1ac7962da9a5e37945ee5dd26a18c98 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 11 Jan 2008 14:47:52 +0100 Subject: Include some basic headers in netapi.h. Guenther (This used to be commit 23b92a6fa57858c8a23c737a9cd00c076ef5dadd) --- source3/lib/netapi/netapi.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 61cece119f..274a167d53 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -20,6 +20,16 @@ #ifndef __LIB_NETAPI_H__ #define __LIB_NETAPI_H__ +/**************************************************************** + include some basic headers +****************************************************************/ + +#include + +/**************************************************************** + NET_API_STATUS +****************************************************************/ + #define NET_API_STATUS uint32_t #define NET_API_STATUS_SUCCESS 0 -- cgit From c2ff6c94f2f9ddc2c4b03f7907f7d6e0de951c24 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 18 Jan 2008 01:56:01 +0100 Subject: Improve libnetapi_set_error_string(). Guenther (This used to be commit 96f645553ae5c75aabfe588e1a67f3d4bfacb5cb) --- source3/lib/netapi/netapi.h | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 274a167d53..67bb8a8fca 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -57,46 +57,73 @@ NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx, const char *use NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, const char *password); NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, const char *workgroup); const char *libnetapi_errstr(NET_API_STATUS status); -NET_API_STATUS libnetapi_set_error_string(struct libnetapi_ctx *ctx, const char *error_string); +NET_API_STATUS libnetapi_set_error_string(struct libnetapi_ctx *ctx, const char *format, ...); const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx, NET_API_STATUS status); /**************************************************************** + NetApiBufferFree ****************************************************************/ NET_API_STATUS NetApiBufferFree(void *buffer); /**************************************************************** + NetJoinDomain ****************************************************************/ -/* wkssvc */ NET_API_STATUS NetJoinDomain(const char *server, const char *domain, const char *account_ou, const char *account, const char *password, uint32_t join_options); + +/**************************************************************** + NetUnjoinDomain +****************************************************************/ + NET_API_STATUS NetUnjoinDomain(const char *server_name, const char *account, const char *password, uint32_t unjoin_flags); + +/**************************************************************** + NetGetJoinInformation +****************************************************************/ + NET_API_STATUS NetGetJoinInformation(const char *server_name, const char **name_buffer, uint16_t *name_type); -/* srvsvc */ +/**************************************************************** + NetServerGetInfo +****************************************************************/ + NET_API_STATUS NetServerGetInfo(const char *server_name, uint32_t level, uint8_t **buffer); + +/**************************************************************** + NetServerSetInfo +****************************************************************/ + NET_API_STATUS NetServerSetInfo(const char *server_name, uint32_t level, uint8_t *buffer, uint32_t *parm_error); -/* netlogon */ +/**************************************************************** + NetGetDCName +****************************************************************/ + NET_API_STATUS NetGetDCName(const char *server_name, const char *domain_name, uint8_t **buffer); + +/**************************************************************** + NetGetAnyDCName +****************************************************************/ + NET_API_STATUS NetGetAnyDCName(const char *server_name, const char *domain_name, uint8_t **buffer); -- cgit From 9dd8940e5f4d89da67b66fb1932a95cc6fda63a5 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 18 Jan 2008 03:14:08 +0100 Subject: Add header for NetGetJoinableOUs to libnetapi. Guenther (This used to be commit f297ea259d58f7a12924b7111ab79818188cff46) --- source3/lib/netapi/netapi.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 67bb8a8fca..c2f1b488db 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -95,6 +95,17 @@ NET_API_STATUS NetGetJoinInformation(const char *server_name, const char **name_buffer, uint16_t *name_type); +/**************************************************************** + NetGetJoinableOUs +****************************************************************/ + +NET_API_STATUS NetGetJoinableOUs(const char *server_name, + const char *domain, + const char *account, + const char *password, + uint32_t *ou_count, + const char ***ous); + /**************************************************************** NetServerGetInfo ****************************************************************/ -- cgit From c04b738a136485a8f1df21fbccd1c418ee6fd444 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 25 Jan 2008 15:46:11 +0100 Subject: Add LIBNETAPI_LOCAL_SERVER() macro. Guenther (This used to be commit 4bdcf07bcc3aaf7c3f7245cfdda06433bcf4ae60) --- source3/lib/netapi/netapi.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index c2f1b488db..002fc37762 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -36,6 +36,11 @@ /**************************************************************** ****************************************************************/ +#define LIBNETAPI_LOCAL_SERVER(x) (!x || is_myname_or_ipaddr(x)) + +/**************************************************************** +****************************************************************/ + struct libnetapi_ctx { char *debuglevel; char *error_string; -- cgit From ba35a8c8dd530fa8aa6a2fd17cd43dfaa434b2f3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 8 Apr 2008 02:42:50 +0200 Subject: Restructure inner workings of libnetapi a bit. Guenther (This used to be commit a4e3bc2bade8bf74696e1c6ced74da563ff2df7b) --- source3/lib/netapi/netapi.h | 80 ++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 45 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 002fc37762..87126fbacf 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -20,23 +20,13 @@ #ifndef __LIB_NETAPI_H__ #define __LIB_NETAPI_H__ -/**************************************************************** - include some basic headers -****************************************************************/ - -#include - /**************************************************************** NET_API_STATUS ****************************************************************/ -#define NET_API_STATUS uint32_t -#define NET_API_STATUS_SUCCESS 0 - -/**************************************************************** -****************************************************************/ - -#define LIBNETAPI_LOCAL_SERVER(x) (!x || is_myname_or_ipaddr(x)) +typedef enum { + NET_API_STATUS_SUCCESS = 0 +} NET_API_STATUS; /**************************************************************** ****************************************************************/ @@ -76,72 +66,72 @@ NET_API_STATUS NetApiBufferFree(void *buffer); NetJoinDomain ****************************************************************/ -NET_API_STATUS NetJoinDomain(const char *server, - const char *domain, - const char *account_ou, - const char *account, - const char *password, - uint32_t join_options); +NET_API_STATUS NetJoinDomain(const char * server /* [in] */, + const char * domain /* [in] [ref] */, + const char * account_ou /* [in] */, + const char * account /* [in] */, + const char * password /* [in] */, + uint32_t join_flags /* [in] */); /**************************************************************** NetUnjoinDomain ****************************************************************/ -NET_API_STATUS NetUnjoinDomain(const char *server_name, - const char *account, - const char *password, - uint32_t unjoin_flags); +NET_API_STATUS NetUnjoinDomain(const char * server_name /* [in] */, + const char * account /* [in] */, + const char * password /* [in] */, + uint32_t unjoin_flags /* [in] */); /**************************************************************** NetGetJoinInformation ****************************************************************/ -NET_API_STATUS NetGetJoinInformation(const char *server_name, - const char **name_buffer, - uint16_t *name_type); +NET_API_STATUS NetGetJoinInformation(const char * server_name /* [in] */, + const char * *name_buffer /* [out] [ref] */, + uint16_t *name_type /* [out] [ref] */); /**************************************************************** NetGetJoinableOUs ****************************************************************/ -NET_API_STATUS NetGetJoinableOUs(const char *server_name, - const char *domain, - const char *account, - const char *password, - uint32_t *ou_count, - const char ***ous); +NET_API_STATUS NetGetJoinableOUs(const char * server_name /* [in] */, + const char * domain /* [in] [ref] */, + const char * account /* [in] */, + const char * password /* [in] */, + uint32_t *ou_count /* [out] [ref] */, + const char * **ous /* [out] [ref] */); /**************************************************************** NetServerGetInfo ****************************************************************/ -NET_API_STATUS NetServerGetInfo(const char *server_name, - uint32_t level, - uint8_t **buffer); +NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */); /**************************************************************** NetServerSetInfo ****************************************************************/ -NET_API_STATUS NetServerSetInfo(const char *server_name, - uint32_t level, - uint8_t *buffer, - uint32_t *parm_error); +NET_API_STATUS NetServerSetInfo(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t *parm_error /* [out] [ref] */); /**************************************************************** NetGetDCName ****************************************************************/ -NET_API_STATUS NetGetDCName(const char *server_name, - const char *domain_name, - uint8_t **buffer); +NET_API_STATUS NetGetDCName(const char * server_name /* [in] */, + const char * domain_name /* [in] */, + uint8_t **buffer /* [out] [ref] */); /**************************************************************** NetGetAnyDCName ****************************************************************/ -NET_API_STATUS NetGetAnyDCName(const char *server_name, - const char *domain_name, - uint8_t **buffer); +NET_API_STATUS NetGetAnyDCName(const char * server_name /* [in] */, + const char * domain_name /* [in] */, + uint8_t **buffer /* [out] [ref] */); #endif -- cgit From 05202a5d4ef3326db3d43feff2bef5271850296b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 8 Apr 2008 18:43:51 +0200 Subject: Add DsGetDcName call to libnetapi library. Guenther (This used to be commit 27780e984152e38c8f80e1c67ddf13b73a2b220d) --- source3/lib/netapi/netapi.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 87126fbacf..68f23720ff 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -31,6 +31,37 @@ typedef enum { /**************************************************************** ****************************************************************/ +#ifndef _HEADER_misc + +struct GUID { + uint32_t time_low; + uint16_t time_mid; + uint16_t time_hi_and_version; + uint8_t clock_seq[2]; + uint8_t node[6]; +}; + +#endif /* _HEADER_misc */ + +#ifndef _HEADER_libnetapi + +struct DOMAIN_CONTROLLER_INFO { + const char * domain_controller_name; + const char * domain_controller_address; + uint32_t domain_controller_address_type; + struct GUID domain_guid; + const char * domain_name; + const char * dns_foreset_name; + uint32_t flags; + const char * dc_site_name; + const char * client_site_name; +}; + +#endif /* _HEADER_libnetapi */ + +/**************************************************************** +****************************************************************/ + struct libnetapi_ctx { char *debuglevel; char *error_string; @@ -134,4 +165,15 @@ NET_API_STATUS NetGetAnyDCName(const char * server_name /* [in] */, const char * domain_name /* [in] */, uint8_t **buffer /* [out] [ref] */); + +/**************************************************************** + DsGetDcName +****************************************************************/ + +NET_API_STATUS DsGetDcName(const char * server_name /* [in] [unique] */, + const char * domain_name /* [in] [ref] */, + struct GUID *domain_guid /* [in] [unique] */, + const char * site_name /* [in] [unique] */, + uint32_t flags /* [in] */, + struct DOMAIN_CONTROLLER_INFO **dc_info /* [out] [ref] */); #endif -- cgit From 6b2ae8e9ffabfa61f48397bf27966fd87a39aff9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 9 Apr 2008 12:38:22 +0200 Subject: Add NetUserAdd to libnetapi. Guenther (This used to be commit cb98996ed2ac93a0e15838048405772d2043021a) --- source3/lib/netapi/netapi.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 68f23720ff..f328f57946 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -57,6 +57,21 @@ struct DOMAIN_CONTROLLER_INFO { const char * client_site_name; }; +struct USER_INFO_0 { + const char * usri0_name; +}; + +struct USER_INFO_1 { + const char * usri1_name; + const char * usri1_password; + uint32_t usri1_password_age; + uint32_t usri1_priv; + const char * usri1_home_dir; + const char * usri1_comment; + uint32_t usri1_flags; + const char * usri1_script_path; +}; + #endif /* _HEADER_libnetapi */ /**************************************************************** @@ -176,4 +191,13 @@ NET_API_STATUS DsGetDcName(const char * server_name /* [in] [unique] */, const char * site_name /* [in] [unique] */, uint32_t flags /* [in] */, struct DOMAIN_CONTROLLER_INFO **dc_info /* [out] [ref] */); + +/**************************************************************** + NetUserAdd +****************************************************************/ + +NET_API_STATUS NetUserAdd(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t *parm_error /* [out] [ref] */); #endif -- cgit From fb538ad641842b69e83709cc7588cbef80d6544b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 9 Apr 2008 13:35:49 +0200 Subject: Add NetUserDel to libnetapi. Guenther (This used to be commit 92ba18fcd0816fb85846c6e788ea4a04c71e02a8) --- source3/lib/netapi/netapi.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index f328f57946..67919eeb01 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -200,4 +200,12 @@ NET_API_STATUS NetUserAdd(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t *parm_error /* [out] [ref] */); + +/**************************************************************** + NetUserDel +****************************************************************/ + +NET_API_STATUS NetUserDel(const char * server_name /* [in] */, + const char * user_name /* [in] */); + #endif -- cgit From 4801d0c6f3cd08cbbfc0d68d36632044356e9d12 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 9 Apr 2008 13:47:51 +0200 Subject: Add NetUserEnum to libnetapi. Guenther (This used to be commit 6c933d0b3838808aeee7f4b29ee89aab8d203538) --- source3/lib/netapi/netapi.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 67919eeb01..483973566f 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -23,11 +23,12 @@ /**************************************************************** NET_API_STATUS ****************************************************************/ - typedef enum { NET_API_STATUS_SUCCESS = 0 } NET_API_STATUS; +#define ERROR_MORE_DATA ( 234L ) + /**************************************************************** ****************************************************************/ @@ -208,4 +209,17 @@ NET_API_STATUS NetUserAdd(const char * server_name /* [in] */, NET_API_STATUS NetUserDel(const char * server_name /* [in] */, const char * user_name /* [in] */); +/**************************************************************** + NetUserEnum +****************************************************************/ + +NET_API_STATUS NetUserEnum(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint32_t filter /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */, + uint32_t *resume_handle /* [in,out] [ref] */); + #endif -- cgit From 8ea6da93541ccdecbd3a2c55d77cb9afff0a4288 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 10 Apr 2008 21:23:59 +0200 Subject: Fix typo. Guenther (This used to be commit 30337bce2c748e5338f9cc923e096883322f50d3) --- source3/lib/netapi/netapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 483973566f..ea850c51c4 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -52,7 +52,7 @@ struct DOMAIN_CONTROLLER_INFO { uint32_t domain_controller_address_type; struct GUID domain_guid; const char * domain_name; - const char * dns_foreset_name; + const char * dns_forest_name; uint32_t flags; const char * dc_site_name; const char * client_site_name; -- cgit From 1a8a8b776961c9220fa686cb60b7ab82a7c76a3d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 10 Apr 2008 21:31:12 +0200 Subject: Use SERVER_INFO_1005 in libnetapi. Guenther (This used to be commit 5f8793dd1d8a3694afb7f2d882cfb9990eb40b75) --- source3/lib/netapi/netapi.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index ea850c51c4..a9b50c4e89 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -58,6 +58,10 @@ struct DOMAIN_CONTROLLER_INFO { const char * client_site_name; }; +struct SERVER_INFO_1005 { + const char * sv1005_comment; +}; + struct USER_INFO_0 { const char * usri0_name; }; -- cgit From 8ab9696bfb5e127a35ab31e7e7746388a8f8a365 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 10 Apr 2008 21:52:03 +0200 Subject: Split out private headers in libnetapi. Guenther (This used to be commit dd6251d51472a96bfc5ba3d62ea788c8924d4c6b) --- source3/lib/netapi/netapi.h | 51 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 8 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index a9b50c4e89..7b03e41c19 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -95,16 +95,51 @@ struct libnetapi_ctx { ****************************************************************/ NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx); -NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx); + +/**************************************************************** +****************************************************************/ + NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx); -NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx, const char *debuglevel); -NET_API_STATUS libnetapi_get_debuglevel(struct libnetapi_ctx *ctx, char **debuglevel); -NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx, const char *username); -NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, const char *password); -NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, const char *workgroup); + +/**************************************************************** +****************************************************************/ + +NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx); + +/**************************************************************** +****************************************************************/ + +NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx, + const char *debuglevel); + +/**************************************************************** +****************************************************************/ + +NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx, + const char *username); + +/**************************************************************** +****************************************************************/ + +NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, + const char *password); + +/**************************************************************** +****************************************************************/ + +NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, + const char *workgroup); + +/**************************************************************** +****************************************************************/ + const char *libnetapi_errstr(NET_API_STATUS status); -NET_API_STATUS libnetapi_set_error_string(struct libnetapi_ctx *ctx, const char *format, ...); -const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx, NET_API_STATUS status); + +/**************************************************************** +****************************************************************/ + +const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx, + NET_API_STATUS status); /**************************************************************** -- cgit From 631808843400c97f47f29a32ee990205dce7aa20 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 13 Apr 2008 19:23:42 +0200 Subject: libnetapi: Add NetQueryDisplayInformation header. Guenther (This used to be commit 3c107934acc907e3eedd116b42d1d07ee0574183) --- source3/lib/netapi/netapi.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 7b03e41c19..97fed2e1d3 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -261,4 +261,12 @@ NET_API_STATUS NetUserEnum(const char * server_name /* [in] */, uint32_t *total_entries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */); +NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */, + uint32_t level /* [in] */, + uint32_t idx /* [in] */, + uint32_t entries_requested /* [in] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + void **buffer /* [out] [noprint,ref] */); + #endif -- cgit From aea1a244eed1c474d8e95048563c2d304a4f3696 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 13 Apr 2008 19:22:24 +0200 Subject: libnetapi: add libnetapi_set_use_kerberos Don't unconditionally set the kerberos flag for authentication. Guenther (This used to be commit 15bef5ae413adf278cccc0e547c4b8ccd180eca2) --- source3/lib/netapi/netapi.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 97fed2e1d3..0d21067a20 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -89,6 +89,7 @@ struct libnetapi_ctx { char *workgroup; char *password; char *krb5_cc_env; + int use_kerberos; }; /**************************************************************** @@ -133,6 +134,11 @@ NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx, /**************************************************************** ****************************************************************/ +NET_API_STATUS libnetapi_set_use_kerberos(struct libnetapi_ctx *ctx); + +/**************************************************************** +****************************************************************/ + const char *libnetapi_errstr(NET_API_STATUS status); /**************************************************************** -- cgit From 7d7283fb0e11bc452f1da283e210378bd0d0e354 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 15 Apr 2008 22:30:06 +0200 Subject: libnetapi: Add missing headers. Guenther (This used to be commit 3fda711f2526914bf18ec004d553453e692b1e85) --- source3/lib/netapi/netapi.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 0d21067a20..e93381533b 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -77,6 +77,31 @@ struct USER_INFO_1 { const char * usri1_script_path; }; +struct NET_DISPLAY_USER { + const char * usri1_name; + const char * usri1_comment; + uint32_t usri1_flags; + const char * usri1_full_name; + uint32_t usri1_user_id; + uint32_t usri1_next_index; +}; + +struct NET_DISPLAY_MACHINE { + const char * usri2_name; + const char * usri2_comment; + uint32_t usri2_flags; + uint32_t usri2_user_id; + uint32_t usri2_next_index; +}; + +struct NET_DISPLAY_GROUP { + const char * grpi3_name; + const char * grpi3_comment; + uint32_t grpi3_group_id; + uint32_t grpi3_attributes; + uint32_t grpi3_next_index; +}; + #endif /* _HEADER_libnetapi */ /**************************************************************** -- cgit From b10510893955966f36cd8aa0229bfcac6db14055 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Apr 2008 10:03:06 +0200 Subject: libnetapi: Add initial inline doxygen comments. Guenther (This used to be commit 01bc4b6ac03b98c2371b4dfc0948f5ef8d06bcbc) --- source3/lib/netapi/netapi.h | 231 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 195 insertions(+), 36 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index e93381533b..e9fcc3777a 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -179,9 +179,23 @@ const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx, NET_API_STATUS NetApiBufferFree(void *buffer); -/**************************************************************** - NetJoinDomain -****************************************************************/ +/************************************************************//** + * + * NetJoinDomain + * + * @brief Join a computer to a domain or workgroup + * + * @param[in] server The server name to connect to + * @param[in] domain The domain or workgroup to join + * @param[in] account_ou The organizational Unit to create the computer account + * in (AD only) + * @param[in] account The domain account used for joining a domain + * @param[in] password The domain account's password used for joining a domain + * @param[in] join_flags Bitmask field to define specific join features + * @return NET_API_STATUS + * + * example netdomjoin/netdomjoin.c + ***************************************************************/ NET_API_STATUS NetJoinDomain(const char * server /* [in] */, const char * domain /* [in] [ref] */, @@ -190,26 +204,62 @@ NET_API_STATUS NetJoinDomain(const char * server /* [in] */, const char * password /* [in] */, uint32_t join_flags /* [in] */); -/**************************************************************** - NetUnjoinDomain -****************************************************************/ +/************************************************************//** + * + * NetUnjoinDomain + * + * @brief Unjoin a computer from a domain or workgroup + * + * @param[in] server_name The server name to connect to + * @param[in] account The domain account used for unjoining a domain + * @param[in] password The domain account's password used for unjoining a domain + * @param[in] unjoin_flags Bitmask field to define specific unjoin features + * @return NET_API_STATUS + * + ***************************************************************/ NET_API_STATUS NetUnjoinDomain(const char * server_name /* [in] */, const char * account /* [in] */, const char * password /* [in] */, uint32_t unjoin_flags /* [in] */); -/**************************************************************** - NetGetJoinInformation -****************************************************************/ +/************************************************************//** + * + * NetGetJoinInformation + * + * @brief Unjoin a computer from a domain or workgroup + * + * @param[in] server_name The server name to connect to + * @param[out] name_buffer Returns the name of the workgroup or domain + * @param[out] name_type Returns the type of that name + * @return NET_API_STATUS + * + * example netdomjoin-gui/netdomjoin-gui.c + * + ***************************************************************/ NET_API_STATUS NetGetJoinInformation(const char * server_name /* [in] */, const char * *name_buffer /* [out] [ref] */, uint16_t *name_type /* [out] [ref] */); -/**************************************************************** - NetGetJoinableOUs -****************************************************************/ +/************************************************************//** + * + * NetGetJoinableOUs + * + * @brief Query for the list of joinable organizational Units that can be used + * for joining AD + * + * @param[in] server_name The server name to connect to + * @param[in] domain The AD domain to query + * @param[in] account The domain account used for the query + * @param[in] password The domain account's password used for the query + * @param[out] ou_count The number of ous returned + * @param[out] ous Returned string array containing the ous + * @return NET_API_STATUS + * + * example netdomjoin-gui/netdomjoin-gui.c + * + ***************************************************************/ NET_API_STATUS NetGetJoinableOUs(const char * server_name /* [in] */, const char * domain /* [in] [ref] */, @@ -218,43 +268,95 @@ NET_API_STATUS NetGetJoinableOUs(const char * server_name /* [in] */, uint32_t *ou_count /* [out] [ref] */, const char * **ous /* [out] [ref] */); -/**************************************************************** - NetServerGetInfo -****************************************************************/ +/************************************************************//** + * + * NetServerGetInfo + * + * @brief Get Information on a server + * + * @param[in] server_name The server name to connect to + * @param[in] level The level to define which information is requested + * @param[out] buffer The returned buffer carrying the SERVER_INFO structure + * @return NET_API_STATUS + * + ***************************************************************/ NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t **buffer /* [out] [ref] */); -/**************************************************************** - NetServerSetInfo -****************************************************************/ +/************************************************************//** + * + * NetServerSetInfo + * + * @brief Get Information on a server + * + * @param[in] server_name The server name to connect to + * @param[in] level The level to define which information is set + * @param[in] buffer The buffer carrying the SERVER_INFO structure + * @param[out] parm_error On failure returns the invalid SERVER_INFO member + * @return NET_API_STATUS + * + ***************************************************************/ NET_API_STATUS NetServerSetInfo(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t *parm_error /* [out] [ref] */); -/**************************************************************** - NetGetDCName -****************************************************************/ +/************************************************************//** + * + * NetGetDCName + * + * @brief Query for the PDC for a given domain + * + * @param[in] server_name The server name to connect to + * @param[in] domain_name The name of the domain to lookup + * @param[out] buffer The name of the domain to lookup + * @return NET_API_STATUS + * + * example getdc/getdc.c + ***************************************************************/ NET_API_STATUS NetGetDCName(const char * server_name /* [in] */, const char * domain_name /* [in] */, uint8_t **buffer /* [out] [ref] */); -/**************************************************************** - NetGetAnyDCName -****************************************************************/ +/************************************************************//** + * + * NetGetAnyDCName + * + * @brief Query for any DC for a given domain + * + * @param[in] server_name The server name to connect to + * @param[in] domain_name The name of the domain to lookup + * @param[out] buffer The name of the domain to lookup + * @return NET_API_STATUS + * + * example getdc/getdc.c + ***************************************************************/ NET_API_STATUS NetGetAnyDCName(const char * server_name /* [in] */, const char * domain_name /* [in] */, uint8_t **buffer /* [out] [ref] */); -/**************************************************************** - DsGetDcName -****************************************************************/ +/************************************************************//** + * + * DsGetDcName + * + * @brief Lookup a DC for a given domain and return information structure + * + * @param[in] server_name The server name to connect to + * @param[in] domain_name The name of the domain to lookup (cannot be NULL) + * @param[in] domain_guid The GUID of the domain to lookup (optional) + * @param[in] site_name The name of the site the DC should reside in + * @param[in] flags A bitmask to request specific features supported by the DC + * @param[out] dc_info Pointer to a DOMAIN_CONTROLLER_INFO structure + * @return NET_API_STATUS + * + * example dsgetdc/dsgetdc.c + ***************************************************************/ NET_API_STATUS DsGetDcName(const char * server_name /* [in] [unique] */, const char * domain_name /* [in] [ref] */, @@ -263,25 +365,64 @@ NET_API_STATUS DsGetDcName(const char * server_name /* [in] [unique] */, uint32_t flags /* [in] */, struct DOMAIN_CONTROLLER_INFO **dc_info /* [out] [ref] */); -/**************************************************************** - NetUserAdd -****************************************************************/ +/************************************************************//** + * + * NetUserAdd + * + * @brief Create a user on a given server + * + * @param[in] server_name The server name to connect to + * @param[in] level The level of the USER_INFO structure passed in (Currently + * only level 1 is supported) + * @param[in] buffer The buffer carrying the USER_INFO structure + * @param[out] parm_error In case of error returns the failing member of the + * structure + * @return NET_API_STATUS + * + * example user/user_add.c + ***************************************************************/ NET_API_STATUS NetUserAdd(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t *parm_error /* [out] [ref] */); -/**************************************************************** - NetUserDel -****************************************************************/ +/************************************************************//** + * + * NetUserDel + * + * @brief Delete a user on a given server + * + * @param[in] server_name The server name to connect to + * @param[in] user_name The user account to delete + * @return NET_API_STATUS + * + * example user/user_del.c + ***************************************************************/ NET_API_STATUS NetUserDel(const char * server_name /* [in] */, const char * user_name /* [in] */); -/**************************************************************** - NetUserEnum -****************************************************************/ +/************************************************************//** + * + * NetUserEnum + * + * @brief Enumerate accounts on a server + * + * @param[in] server_name The server name to connect to + * @param[in] level The enumeration level used for the query (Currently only + * level 0 is supported) + * @param[in] filter The account flags filter used for the query + * @param[out] buffer The returned enumeration buffer + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of returned entries + * @param[out] total_entries The number of total entries + * @param[in,out] resume_handle A handle passed in and returned for resuming + * operations + * @return NET_API_STATUS + * + * example user/user_enum.c + ***************************************************************/ NET_API_STATUS NetUserEnum(const char * server_name /* [in] */, uint32_t level /* [in] */, @@ -292,6 +433,24 @@ NET_API_STATUS NetUserEnum(const char * server_name /* [in] */, uint32_t *total_entries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */); +/************************************************************//** + * + * NetQueryDisplayInformation + * + * @brief Enumerate accounts on a server + * + * @param[in] server_name The server name to connect to + * @param[in] level The enumeration level used for the query + * @param[in] idx The index to start the the display enumeration at + * @param[in] entries_requested The number of entries requested + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of returned entries + * @param[out] buffer The returned display information buffer + * @return NET_API_STATUS + * + * example user/user_dispinfo.c + ***************************************************************/ + NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */, uint32_t level /* [in] */, uint32_t idx /* [in] */, -- cgit From d8c1f1d24f4c3a065fbb53330f0ed76c31250a3b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 28 May 2008 01:18:05 +0200 Subject: netapi: Add NetGroupDel/NetGroupAdd header. Guenther (This used to be commit 84104cb900774fd2987636e59e562477c3ed2977) --- source3/lib/netapi/netapi.h | 71 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index e9fcc3777a..abfd53e0c9 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -46,6 +46,17 @@ struct GUID { #ifndef _HEADER_libnetapi +#ifndef MAXSUBAUTHS +#define MAXSUBAUTHS 15 /* max sub authorities in a SID */ +#endif + +struct domsid { + uint8_t sid_rev_num; + uint8_t num_auths; + uint8_t id_auth[6]; + uint32_t sub_auths[MAXSUBAUTHS]; +}; + struct DOMAIN_CONTROLLER_INFO { const char * domain_controller_name; const char * domain_controller_address; @@ -102,6 +113,29 @@ struct NET_DISPLAY_GROUP { uint32_t grpi3_next_index; }; +struct GROUP_INFO_0 { + const char * grpi0_name; +}; + +struct GROUP_INFO_1 { + const char * grpi1_name; + const char * grpi1_comment; +}; + +struct GROUP_INFO_2 { + const char * grpi2_name; + const char * grpi2_comment; + uint32_t grpi2_group_id; + uint32_t grpi2_attributes; +}; + +struct GROUP_INFO_3 { + const char * grpi3_name; + const char * grpi3_comment; + struct domsid grpi3_group_sid; + uint32_t grpi3_attributes; +}; + #endif /* _HEADER_libnetapi */ /**************************************************************** @@ -459,4 +493,41 @@ NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [uniq uint32_t *entries_read /* [out] [ref] */, void **buffer /* [out] [noprint,ref] */); +/************************************************************//** + * + * NetGroupAdd + * + * @brief Create Domain Group + * + * @param[in] server_name The server name to connect to + * @param[in] level The level used for the new group creation + * @param[in] buf The buffer containing the group structure + * @param[out] parm_err The returned parameter error number if any + * @return NET_API_STATUS + * + * example group/group_add.c + ***************************************************************/ + +NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buf /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */); + +/************************************************************//** + * + * NetGroupDel + * + * @brief Delete Domain Group + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to be deleted + * @return NET_API_STATUS + * + * example group/group_del.c + ***************************************************************/ + + +NET_API_STATUS NetGroupDel(const char * server_name /* [in] */, + const char * group_name /* [in] */); + #endif -- cgit From b01a0a16a6dc167bf25fb2f90cb7d7a4471194c2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 Jun 2008 12:54:17 +0200 Subject: netapi: Add dummy implementation of NetGroupSetInfo(). Guenther (This used to be commit 7e47bdc0829d7ac856028a99389310f721a265ce) --- source3/lib/netapi/netapi.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index abfd53e0c9..bd4dc09079 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -136,6 +136,14 @@ struct GROUP_INFO_3 { uint32_t grpi3_attributes; }; +struct GROUP_INFO_1002 { + const char * grpi1002_comment; +}; + +struct GROUP_INFO_1005 { + uint32_t grpi1005_attributes; +}; + #endif /* _HEADER_libnetapi */ /**************************************************************** @@ -526,8 +534,28 @@ NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */, * example group/group_del.c ***************************************************************/ - NET_API_STATUS NetGroupDel(const char * server_name /* [in] */, const char * group_name /* [in] */); +/************************************************************//** + * + * NetGroupSetInfo + * + * @brief Set Domain Group Information + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to be modified + * @param[in] level The level defining the structure type in buf + * @param[in] buf The buffer containing a GROUP_INFO_X structure + * @param[out] parm_err The returned parameter error number if any + * @return NET_API_STATUS + * + * example group/group_setinfo.c + ***************************************************************/ + +NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buf /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */); #endif -- cgit From 5b111cc4d59db5573e8d488f49ac87a72cc44ae7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 Jun 2008 13:04:15 +0200 Subject: netapi: add dummy implementation of NetGroupGetInfo(). Guenther (This used to be commit 88d03b1645d78334eb6f1fee52838a08539a6aba) --- source3/lib/netapi/netapi.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index bd4dc09079..0f9d70ee35 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -558,4 +558,25 @@ NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t *buf /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); + +/************************************************************//** + * + * NetGroupGetInfo + * + * @brief Get Domain Group Information + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to be modified + * @param[in] level The level defining the requested GROUP_INFO_X structure + * @param[out] buf The buffer containing a GROUP_INFO_X structure + * @return NET_API_STATUS + * + * example group/group_del.c + ***************************************************************/ + +NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buf /* [out] [ref] */); + #endif -- cgit From 749e5a80c24f5f6d0c4b91c5e5ae30606acad3a5 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 Jun 2008 14:46:56 +0200 Subject: netapi: implement NetGroupAddUser(). Guenther (This used to be commit c727a49519b2da6c5eb9ccc5025ab844fe8330ad) --- source3/lib/netapi/netapi.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 0f9d70ee35..c4beda2a9c 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -579,4 +579,22 @@ NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t **buf /* [out] [ref] */); +/************************************************************//** + * + * NetGroupAddUser + * + * @brief Add existing User to existing Domain Group + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to be modified + * @param[in] user_name The name of the user that is going to be added to the + * group + * @return NET_API_STATUS + * + * example group/group_adduser.c + ***************************************************************/ + +NET_API_STATUS NetGroupAddUser(const char * server_name /* [in] */, + const char * group_name /* [in] */, + const char * user_name /* [in] */); #endif -- cgit From 4dcfa15b0bde75d15f8831ef572fb9ce9aad18a8 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 Jun 2008 14:58:01 +0200 Subject: netapi: Implement NetGroupDelUser(). Guenther (This used to be commit 10f69b3ce58be06d95e4dfd5782d9481f4af76bf) --- source3/lib/netapi/netapi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index c4beda2a9c..d787cedf4c 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -597,4 +597,24 @@ NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */, NET_API_STATUS NetGroupAddUser(const char * server_name /* [in] */, const char * group_name /* [in] */, const char * user_name /* [in] */); + +/************************************************************//** + * + * NetGroupDelUser + * + * @brief Remove User from Domain Group + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to be modified + * @param[in] user_name The name of the user that is going to be removed from + * the group + * @return NET_API_STATUS + * + * example group/group_deluser.c + ***************************************************************/ + +NET_API_STATUS NetGroupDelUser(const char * server_name /* [in] */, + const char * group_name /* [in] */, + const char * user_name /* [in] */); + #endif -- cgit From dac9e2228c93d296f2fd3110837ec8e7edbd3ea8 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 Jun 2008 19:12:54 +0200 Subject: netapi: add NetLocalGroupAdd to public api. Guenther (This used to be commit 05ded246426415b61597d003ffac519847c08620) --- source3/lib/netapi/netapi.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index d787cedf4c..d08f1b7f74 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -144,6 +144,19 @@ struct GROUP_INFO_1005 { uint32_t grpi1005_attributes; }; +struct LOCALGROUP_INFO_0 { + const char * lgrpi0_name; +}; + +struct LOCALGROUP_INFO_1 { + const char * lgrpi1_name; + const char * lgrpi1_comment; +}; + +struct LOCALGROUP_INFO_1002 { + const char * lgrpi1002_comment; +}; + #endif /* _HEADER_libnetapi */ /**************************************************************** @@ -617,4 +630,24 @@ NET_API_STATUS NetGroupDelUser(const char * server_name /* [in] */, const char * group_name /* [in] */, const char * user_name /* [in] */); +/************************************************************//** + * + * NetLocalGroupAdd + * + * @brief Create Local Group + * + * @param[in] server_name The server name to connect to + * @param[in] level The level used for the new group creation + * @param[in] buf The buffer containing the group structure + * @param[out] parm_err The returned parameter error number if any + * @return NET_API_STATUS + * + * example localgroup/localgroup_add.c + ***************************************************************/ + +NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buf /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */); + #endif -- cgit From 5800a52950ef3bd3509b3b332b9c890323f22a89 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 Jun 2008 19:45:23 +0200 Subject: netapi: add NetLocalGroupDel() to public headers. Guenther (This used to be commit efd4a899f5d139b5e3e22660f5fb1c12f59525fc) --- source3/lib/netapi/netapi.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index d08f1b7f74..28bb7fa68a 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -650,4 +650,21 @@ NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */, uint8_t *buf /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); +/************************************************************//** + * + * NetLocalGroupDel + * + * @brief Delete Local Group + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to be deleted + * @return NET_API_STATUS + * + * example localgroup/localgroup_del.c + ***************************************************************/ + + +NET_API_STATUS NetLocalGroupDel(const char * server_name /* [in] */, + const char * group_name /* [in] */); + #endif -- cgit From d8fc64de7604c38de12ea267cb071520db2a7730 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 Jun 2008 20:27:49 +0200 Subject: netapi: add NetLocalGroupGetInfo() to public headers. Guenther (This used to be commit 4d40d8b51a5323c36ff78ccfc4d7405ac97dde6b) --- source3/lib/netapi/netapi.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 28bb7fa68a..5b7a31f320 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -667,4 +667,23 @@ NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */, NET_API_STATUS NetLocalGroupDel(const char * server_name /* [in] */, const char * group_name /* [in] */); +/************************************************************//** + * + * NetLocalGroupGetInfo + * + * @brief Get Local Group Information + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to be queried + * @param[in] level The level defining the requested LOCALGROUP_INFO_X structure + * @param[out] buf The buffer containing a LOCALGROUP_INFO_X structure + * @return NET_API_STATUS + * + * example localgroup/localgroup_getinfo.c + ***************************************************************/ + +NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buf /* [out] [ref] */); #endif -- cgit From e46506866ae6c55aba6f65cff3f1889fea5227f4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 Jun 2008 23:37:42 +0200 Subject: netapi: add public header for NetLocalGroupSetInfo(). Guenther (This used to be commit cb20271012e7713a28c302e199b676bdb821e5e4) --- source3/lib/netapi/netapi.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 5b7a31f320..d80e78ebbf 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -686,4 +686,28 @@ NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */, const char * group_name /* [in] */, uint32_t level /* [in] */, uint8_t **buf /* [out] [ref] */); + +/************************************************************//** + * + * NetLocalGroupSetInfo + * + * @brief Set Local Group Information + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to be modified + * @param[in] level The level defining the requested LOCALGROUP_INFO_X structure + * @param[in] buf The buffer containing a LOCALGROUP_INFO_X structure + * @param[out] parm_err The returned parameter error number if any + * @return NET_API_STATUS + * + * example localgroup/localgroup_setinfo.c + ***************************************************************/ + + +NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buf /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */); + #endif -- cgit From feca006232764fdd389a221aa23f322a492347e2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 6 Jun 2008 16:44:35 +0200 Subject: netapi: make NetRemoteTOD() headers public. Guenther (This used to be commit 1262ab1843a8a8cb794f6bbfb113bd2d99ffba22) --- source3/lib/netapi/netapi.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index d80e78ebbf..d24e15901b 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -157,6 +157,21 @@ struct LOCALGROUP_INFO_1002 { const char * lgrpi1002_comment; }; +struct TIME_OF_DAY_INFO { + uint32_t tod_elapsedt; + uint32_t tod_msecs; + uint32_t tod_hours; + uint32_t tod_mins; + uint32_t tod_secs; + uint32_t tod_hunds; + int32_t tod_timezone; + uint32_t tod_tinterval; + uint32_t tod_day; + uint32_t tod_month; + uint32_t tod_year; + uint32_t tod_weekday; +}; + #endif /* _HEADER_libnetapi */ /**************************************************************** @@ -710,4 +725,20 @@ NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */, uint8_t *buf /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); +/************************************************************//** + * + * NetRemoteTOD + * + * @brief Query remote Time of Day + * + * @param[in] server_name The server name to connect to + * @param[out] buf The buffer containing a TIME_OF_DAY_INFO structure + * @return NET_API_STATUS + * + * example server/remote_tod.c + ***************************************************************/ + +NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */, + uint8_t **buf /* [out] [ref] */); + #endif -- cgit From b330ea29c7af8e0cdd7d9773016e8fdc2d09df22 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 17 Jun 2008 13:13:10 +0200 Subject: netapi: add NetUserEnum filter constants to public headers. Guenther (This used to be commit 32a66131eb56e1c66b89e348141047c6b98cf35e) --- source3/lib/netapi/netapi.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index d24e15901b..9496d77e83 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -69,6 +69,12 @@ struct DOMAIN_CONTROLLER_INFO { const char * client_site_name; }; +#define FILTER_TEMP_DUPLICATE_ACCOUNT ( 0x0001 ) +#define FILTER_NORMAL_ACCOUNT ( 0x0002 ) +#define FILTER_INTERDOMAIN_TRUST_ACCOUNT ( 0x0008 ) +#define FILTER_WORKSTATION_TRUST_ACCOUNT ( 0x0010 ) +#define FILTER_SERVER_TRUST_ACCOUNT ( 0x0020 ) + struct SERVER_INFO_1005 { const char * sv1005_comment; }; -- cgit From 8a01bd8f7364bdad6d758236a415359e84bffde4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 25 Jun 2008 00:47:41 +0200 Subject: netapi: add NetUserChangePassword() to public headers. Guenther (This used to be commit 5d06891238d7dddedeb6fe2aca677c765b90c74a) --- source3/lib/netapi/netapi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 9496d77e83..113a72ca13 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -509,6 +509,26 @@ NET_API_STATUS NetUserEnum(const char * server_name /* [in] */, uint32_t *total_entries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */); +/************************************************************//** + * + * NetUserChangePassword + * + * @brief Change the password for a user on a given server or in a given domain + * + * @param[in] domain_name The server or domain name to connect to + * @param[in] user_name The user account to change the password for + * @param[in] old_password The user account's old password + * @param[in] old_password The user account's new password + * @return NET_API_STATUS + * + * example user/user_chgpwd.c + ***************************************************************/ + +NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */, + const char * user_name /* [in] */, + const char * old_password /* [in] */, + const char * new_password /* [in] */); + /************************************************************//** * * NetQueryDisplayInformation -- cgit From b74c0fa10f3bddd2a0fcc5bb098133df66744f93 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 2 Jul 2008 13:09:23 +0200 Subject: netapi: fix doxygen warning. Guenther (This used to be commit cfd59383d680e41a885e546842b0eb8585123acb) --- source3/lib/netapi/netapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 113a72ca13..8ec1fbfb03 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -518,7 +518,7 @@ NET_API_STATUS NetUserEnum(const char * server_name /* [in] */, * @param[in] domain_name The server or domain name to connect to * @param[in] user_name The user account to change the password for * @param[in] old_password The user account's old password - * @param[in] old_password The user account's new password + * @param[in] new_password The user account's new password * @return NET_API_STATUS * * example user/user_chgpwd.c -- cgit From bda5542de19445b00398440518e2896ad165d5fd Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Jul 2008 16:20:42 +0200 Subject: netapi: fix documentation for NetGroupSetInfo. Guenther (This used to be commit 7b4f84793b39f2940381bccae27f65275cc39572) --- source3/lib/netapi/netapi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 8ec1fbfb03..323b0c8754 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -620,12 +620,12 @@ NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */, * @brief Get Domain Group Information * * @param[in] server_name The server name to connect to - * @param[in] group_name The name of the group that is going to be modified + * @param[in] group_name The name of the group that is going to be queried * @param[in] level The level defining the requested GROUP_INFO_X structure * @param[out] buf The buffer containing a GROUP_INFO_X structure * @return NET_API_STATUS * - * example group/group_del.c + * example group/group_getinfo.c ***************************************************************/ NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */, -- cgit From a6aeb73e4afcdcfbddbc8f9f2983e252d75975c8 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Jul 2008 15:22:04 +0200 Subject: netapi: add ConvertSidToStringSid() for convenience of the callers. Guenther (This used to be commit b7633998ed76c7bb2faa803841fafe9126a39847) --- source3/lib/netapi/netapi.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 323b0c8754..e7f3527d1a 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -255,6 +255,21 @@ const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx, NET_API_STATUS NetApiBufferFree(void *buffer); +/************************************************************//** + * + * ConvertSidToStringSid + * + * @brief Convert a domain sid into a string + * + * @param[in] sid A pointer to a sid structure + * @param[in] sid_string A pointer that holds a pointer to a sid string. Caller + * needs to free with free(3) + * @return bool + ***************************************************************/ + +int ConvertSidToStringSid(const struct domsid *sid, + char **sid_string); + /************************************************************//** * * NetJoinDomain -- cgit From a035851b65700e93316344ab47c48460f6ef8397 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 1 Jul 2008 20:11:38 +0200 Subject: netapi: add NetGroupEnum to public headers. Guenther (This used to be commit 4564581f9aaf4afd6c47c6d5a9a299bc5012244d) --- source3/lib/netapi/netapi.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index e7f3527d1a..086a9a9fca 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -606,6 +606,34 @@ NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */, NET_API_STATUS NetGroupDel(const char * server_name /* [in] */, const char * group_name /* [in] */); +/************************************************************//** + * + * NetGroupEnum + * + * @brief Enumerate groups on a server + * + * @param[in] server_name The server name to connect to + * @param[in] level The enumeration level used for the query (Currently only + * level 0 is supported) + * @param[out] buffer The returned enumeration buffer + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of returned entries + * @param[out] total_entries The number of total entries + * @param[in,out] resume_handle A handle passed in and returned for resuming + * operations + * @return NET_API_STATUS + * + * example group/group_enum.c + ***************************************************************/ + +NET_API_STATUS NetGroupEnum(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */, + uint32_t *resume_handle /* [in,out] [ref] */); + /************************************************************//** * * NetGroupSetInfo -- cgit From 89f4e869b657b6c92f84741bc1cdebbabe4dd72d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Jul 2008 16:14:47 +0200 Subject: netapi: fix map_group_info_to_buffer for GROUP_INFO_3 change. Guenther (This used to be commit f2875677194f440ffebf18e6f5171be948114353) --- source3/lib/netapi/netapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 086a9a9fca..f6345afe67 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -138,7 +138,7 @@ struct GROUP_INFO_2 { struct GROUP_INFO_3 { const char * grpi3_name; const char * grpi3_comment; - struct domsid grpi3_group_sid; + struct domsid * grpi3_group_sid; uint32_t grpi3_attributes; }; -- cgit From 3f0da66d5cae7efb600080c054ab52ed5b5a650f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 1 Jul 2008 20:14:36 +0200 Subject: netapi: add libnetapi_private_ctx and init function. Guenther (This used to be commit 45fff2d37ae21c76d100f66d9154f6add446f380) --- source3/lib/netapi/netapi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index f6345afe67..3612fa8240 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -191,6 +191,8 @@ struct libnetapi_ctx { char *password; char *krb5_cc_env; int use_kerberos; + + void *private_data; }; /**************************************************************** -- cgit From 29e1bbcf001516eeba528c46f12de729093e6e54 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 17 Jul 2008 13:37:50 +0200 Subject: netapi: add new USER_INFO_X structures to public headers. Guenther (This used to be commit 4439edb0465630091e53fdcc2d647acc7abf1045) --- source3/lib/netapi/netapi.h | 140 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 3612fa8240..2260c28bf1 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -94,6 +94,146 @@ struct USER_INFO_1 { const char * usri1_script_path; }; +struct USER_INFO_2 { + const char * usri2_name; + const char * usri2_password; + uint32_t usri2_password_age; + uint32_t usri2_priv; + const char * usri2_home_dir; + const char * usri2_comment; + uint32_t usri2_flags; + const char * usri2_script_path; + uint32_t usri2_auth_flags; + const char * usri2_full_name; + const char * usri2_usr_comment; + const char * usri2_parms; + const char * usri2_workstations; + uint32_t usri2_last_logon; + uint32_t usri2_last_logoff; + uint32_t usri2_acct_expires; + uint32_t usri2_max_storage; + uint32_t usri2_units_per_week; + uint8_t *usri2_logon_hours;/* [unique] */ + uint32_t usri2_bad_pw_count; + uint32_t usri2_num_logons; + const char * usri2_logon_server; + uint32_t usri2_country_code; + uint32_t usri2_code_page; +}; + +struct USER_INFO_3 { + const char * usri3_name; + uint32_t usri3_password_age; + uint32_t usri3_priv; + const char * usri3_home_dir; + const char * usri3_comment; + uint32_t usri3_flags; + const char * usri3_script_path; + uint32_t usri3_auth_flags; + const char * usri3_full_name; + const char * usri3_usr_comment; + const char * usri3_parms; + const char * usri3_workstations; + uint32_t usri3_last_logon; + uint32_t usri3_last_logoff; + uint32_t usri3_acct_expires; + uint32_t usri3_max_storage; + uint32_t usri3_units_per_week; + uint8_t *usri3_logon_hours;/* [unique] */ + uint32_t usri3_bad_pw_count; + uint32_t usri3_num_logons; + const char * usri3_logon_server; + uint32_t usri3_country_code; + uint32_t usri3_code_page; + uint32_t usri3_user_id; + uint32_t usri3_primary_group_id; + const char * usri3_profile; + const char * usri3_home_dir_drive; + uint32_t usri3_password_expired; +}; + +struct USER_INFO_4 { + const char * usri4_name; + const char * usri4_password; + uint32_t usri4_password_age; + uint32_t usri4_priv; + const char * usri4_home_dir; + const char * usri4_comment; + uint32_t usri4_flags; + const char * usri4_script_path; + uint32_t usri4_auth_flags; + const char * usri4_full_name; + const char * usri4_usr_comment; + const char * usri4_parms; + const char * usri4_workstations; + uint32_t usri4_last_logon; + uint32_t usri4_last_logoff; + uint32_t usri4_acct_expires; + uint32_t usri4_max_storage; + uint32_t usri4_units_per_week; + uint8_t *usri4_logon_hours;/* [unique] */ + uint32_t usri4_bad_pw_count; + uint32_t usri4_num_logons; + const char * usri4_logon_server; + uint32_t usri4_country_code; + uint32_t usri4_code_page; + struct dom_sid *usri4_user_sid;/* [unique] */ + uint32_t usri4_primary_group_id; + const char * usri4_profile; + const char * usri4_home_dir_drive; + uint32_t usri4_password_expired; +}; + +struct USER_INFO_10 { + const char * usri10_name; + const char * usri10_comment; + const char * usri10_usr_comment; + const char * usri10_full_name; +}; + +struct USER_INFO_11 { + const char * usri11_name; + const char * usri11_comment; + const char * usri11_usr_comment; + const char * usri11_full_name; + uint32_t usri11_priv; + uint32_t usri11_auth_flags; + uint32_t usri11_password_age; + const char * usri11_home_dir; + const char * usri11_parms; + uint32_t usri11_last_logon; + uint32_t usri11_last_logoff; + uint32_t usri11_bad_pw_count; + uint32_t usri11_num_logons; + const char * usri11_logon_server; + uint32_t usri11_country_code; + const char * usri11_workstations; + uint32_t usri11_max_storage; + uint32_t usri11_units_per_week; + uint8_t *usri11_logon_hours;/* [unique] */ + uint32_t usri11_code_page; +}; + +struct USER_INFO_20 { + const char * usri20_name; + const char * usri20_full_name; + const char * usri20_comment; + uint32_t usri20_flags; + uint32_t usri20_user_id; +}; + +struct USER_INFO_23 { + const char * usri23_name; + const char * usri23_full_name; + const char * usri23_comment; + uint32_t usri23_flags; + struct domsid *usri23_user_sid;/* [unique] */ +}; + +struct USER_INFO_1007 { + const char * usri1007_comment; +}; + struct NET_DISPLAY_USER { const char * usri1_name; const char * usri1_comment; -- cgit From 04463e29f3b10d8230e21bf2743e44fdbbed60c3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Jul 2008 10:50:26 +0200 Subject: netapi: add NetUserGetInfo to public headers. Guenther (This used to be commit 7260fb4dbae556b116e385bdcc240416e8a8cbd2) --- source3/lib/netapi/netapi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 2260c28bf1..95ecbe35cd 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -686,6 +686,26 @@ NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */, const char * old_password /* [in] */, const char * new_password /* [in] */); +/************************************************************//** + * + * NetUserGetInfo + * + * @brief Get User Information + * + * @param[in] server_name The server name to connect to + * @param[in] user_name The name of the user that is going to be queried + * @param[in] level The level defining the requested USER_INFO_X structure + * @param[out] buffer The buffer containing a USER_INFO_X structure + * @return NET_API_STATUS + * + * example user/user_getinfo.c + ***************************************************************/ + +NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */); + /************************************************************//** * * NetQueryDisplayInformation -- cgit From ce6db92d952de87ac22cf637aab4a5159531a70d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 18 Jul 2008 01:40:14 +0200 Subject: netapi: add NetUserSetInfo to public header. Guenther (This used to be commit 0acf8352a3ca7deb2e3465be441f20d455eb802b) --- source3/lib/netapi/netapi.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 95ecbe35cd..9c3468d055 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -706,6 +706,28 @@ NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t **buffer /* [out] [ref] */); +/************************************************************//** + * + * NetUserSetInfo + * + * @brief Set User Information + * + * @param[in] server_name The server name to connect to + * @param[in] user_name The name of the user that is going to be modified + * @param[in] level The level defining the requested USER_INFO_X structure + * @param[in] buf The buffer containing a USER_INFO_X structure + * @param[out] parm_err The returned parameter error number if any + * @return NET_API_STATUS + * + * example user/user_setinfo.c + ***************************************************************/ + +NET_API_STATUS NetUserSetInfo(const char * server_name /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */); + /************************************************************//** * * NetQueryDisplayInformation -- cgit From ca2296f19f65e77dd65aac2c849f8f1db5d210df Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 18 Jul 2008 01:40:34 +0200 Subject: netapi: add NetLocalGroupEnum to public header. Guenther (This used to be commit 151c8fa7901983a3e7a82f1af599c839249b6cd7) --- source3/lib/netapi/netapi.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 9c3468d055..300bae59ea 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -978,6 +978,34 @@ NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */, uint8_t *buf /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); +/************************************************************//** + * + * NetLocalGroupEnum + * + * @brief Enumerate local groups on a server + * + * @param[in] server_name The server name to connect to + * @param[in] level The enumeration level used for the query (Currently only + * level 0 is supported) + * @param[out] buffer The returned enumeration buffer + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of returned entries + * @param[out] total_entries The number of total entries + * @param[in,out] resume_handle A handle passed in and returned for resuming + * operations + * @return NET_API_STATUS + * + * example localgroup/localgroup_enum.c + ***************************************************************/ + +NET_API_STATUS NetLocalGroupEnum(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */, + uint32_t *resume_handle /* [in,out] [ref] */); + /************************************************************//** * * NetRemoteTOD -- cgit From c703304f557021c78ba0ad24e9b2e7b42147b8fd Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 17 Jul 2008 22:44:24 +0200 Subject: netapi: add caching of samr policy handles. Guenther (This used to be commit bf8453da9af1be788955204cc581c5143a854072) --- source3/lib/netapi/netapi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 300bae59ea..7d32ffcbae 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -331,6 +331,7 @@ struct libnetapi_ctx { char *password; char *krb5_cc_env; int use_kerberos; + int disable_policy_handle_cache; void *private_data; }; -- cgit From 493fb24e37f5685c5999eb684f5a8ca0bcf8e09e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 18 Jul 2008 23:43:33 +0200 Subject: netapi: add NetGroupGetUsers to public header. Guenther (This used to be commit d31f822b79ed5344ec3c6795d66ceefd024b7d30) --- source3/lib/netapi/netapi.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 7d32ffcbae..a1041c009d 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -290,6 +290,15 @@ struct GROUP_INFO_1005 { uint32_t grpi1005_attributes; }; +struct GROUP_USERS_INFO_0 { + const char * grui0_name; +}; + +struct GROUP_USERS_INFO_1 { + const char * grui1_name; + uint32_t grui1_attributes; +}; + struct LOCALGROUP_INFO_0 { const char * lgrpi0_name; }; @@ -899,6 +908,35 @@ NET_API_STATUS NetGroupDelUser(const char * server_name /* [in] */, const char * group_name /* [in] */, const char * user_name /* [in] */); +/************************************************************//** + * + * NetGroupGetUsers + * + * @brief Get Users for a group on a server + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The group name to enumerate users for + * @param[in] level The enumeration level used for the query + * @param[out] buffer The returned enumeration buffer + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of returned entries + * @param[out] total_entries The number of total entries + * @param[in,out] resume_handle A handle passed in and returned for resuming + * operations + * @return NET_API_STATUS + * + * example group/group_getusers.c + ***************************************************************/ + +NET_API_STATUS NetGroupGetUsers(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */, + uint32_t *resume_handle /* [in,out] [ref] */); + /************************************************************//** * * NetLocalGroupAdd -- cgit From c7c35108105eea60e3cf81f2d53d241889349c91 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 1 Aug 2008 15:15:05 +0200 Subject: netapi: add ConvertStringSidToSid(). Guenther (This used to be commit 36f1e45e4ec295115f1ba39ec7ad3690a96dac3e) --- source3/lib/netapi/netapi.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index a1041c009d..2c6b667123 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -422,6 +422,21 @@ NET_API_STATUS NetApiBufferFree(void *buffer); int ConvertSidToStringSid(const struct domsid *sid, char **sid_string); +/************************************************************//** + * + * ConvertStringSidToSid + * + * @brief Convert a string into a domain sid + * + * @param[in] sid_string A pointer to a sid string. + * @param[in] sid A pointer that holds a pointer to a sid structure. + * Caller needs to free with free(3) + * @return bool + ***************************************************************/ + +int ConvertStringSidToSid(const char *sid_string, + struct domsid **sid); + /************************************************************//** * * NetJoinDomain -- cgit From e480162e5b44cd9705b05a0bf9d64894309a7ae4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 1 Aug 2008 16:44:05 +0200 Subject: netapi: add NetApiBufferAllocate. Guenther (This used to be commit 99cc8f023b4ad9210b677e11371f404048752031) --- source3/lib/netapi/netapi.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 2c6b667123..9cc8e9eca4 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -400,6 +400,12 @@ const char *libnetapi_errstr(NET_API_STATUS status); const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx, NET_API_STATUS status); +/**************************************************************** + NetApiBufferAllocate +****************************************************************/ + +NET_API_STATUS NetApiBufferAllocate(uint32_t byte_count, + void **buffer); /**************************************************************** NetApiBufferFree -- cgit From ee43b80149933980b5280cf66f51f16d3a10d97b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 31 Jul 2008 16:47:15 +0200 Subject: netapi: add NetUserModalsGet and NetUserModalsSet to public headers. Guenther (This used to be commit b4c912bfbc62768ff4d7ecb39c02dc4a2a9825d2) --- source3/lib/netapi/netapi.h | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 9cc8e9eca4..9b6288d9e9 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -75,6 +75,8 @@ struct DOMAIN_CONTROLLER_INFO { #define FILTER_WORKSTATION_TRUST_ACCOUNT ( 0x0010 ) #define FILTER_SERVER_TRUST_ACCOUNT ( 0x0020 ) +#define TIMEQ_FOREVER ( (uint32_t)-1L ) + struct SERVER_INFO_1005 { const char * sv1005_comment; }; @@ -234,6 +236,58 @@ struct USER_INFO_1007 { const char * usri1007_comment; }; +struct USER_MODALS_INFO_0 { + uint32_t usrmod0_min_passwd_len; + uint32_t usrmod0_max_passwd_age; + uint32_t usrmod0_min_passwd_age; + uint32_t usrmod0_force_logoff; + uint32_t usrmod0_password_hist_len; +}; + +struct USER_MODALS_INFO_1 { + uint32_t usrmod1_role; + const char * usrmod1_primary; +}; + +struct USER_MODALS_INFO_2 { + const char * usrmod2_domain_name; + struct domsid *usrmod2_domain_id;/* [unique] */ +}; + +struct USER_MODALS_INFO_3 { + uint32_t usrmod3_lockout_duration; + uint32_t usrmod3_lockout_observation_window; + uint32_t usrmod3_lockout_threshold; +}; + +struct USER_MODALS_INFO_1001 { + uint32_t usrmod1001_min_passwd_len; +}; + +struct USER_MODALS_INFO_1002 { + uint32_t usrmod1002_max_passwd_age; +}; + +struct USER_MODALS_INFO_1003 { + uint32_t usrmod1003_min_passwd_age; +}; + +struct USER_MODALS_INFO_1004 { + uint32_t usrmod1004_force_logoff; +}; + +struct USER_MODALS_INFO_1005 { + uint32_t usrmod1005_password_hist_len; +}; + +struct USER_MODALS_INFO_1006 { + uint32_t usrmod1006_role; +}; + +struct USER_MODALS_INFO_1007 { + const char * usrmod1007_primary; +}; + struct NET_DISPLAY_USER { const char * usri1_name; const char * usri1_comment; @@ -759,6 +813,14 @@ NET_API_STATUS NetUserSetInfo(const char * server_name /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); +NET_API_STATUS NetUserModalsGet(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */); +NET_API_STATUS NetUserModalsSet(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */); + /************************************************************//** * * NetQueryDisplayInformation -- cgit From 90a8f9d27741294e392cd207b2dfb9b47edae023 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 31 Jul 2008 16:24:58 +0200 Subject: netapi: add NetLocalGroup*Member calls to public headers. Guenther (This used to be commit d4a51bb01d33ad17db4e623085a89d258e91b57e) --- source3/lib/netapi/netapi.h | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 9b6288d9e9..dbf293e25b 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -366,6 +366,39 @@ struct LOCALGROUP_INFO_1002 { const char * lgrpi1002_comment; }; +enum SID_NAME_USE { + SidTypeUser=1, + SidTypeGroup=2, + SidTypeDomain=3, + SidTypeAlias=4, + SidTypeWellKnownGroup=5, + SidTypeDeletedAccount=6, + SidTypeInvalid=7, + SidTypeUnknown=8, + SidTypeComputer=9, + SidTypeLabel=10 +}; + +struct LOCALGROUP_MEMBERS_INFO_0 { + struct domsid *lgrmi0_sid;/* [unique] */ +}; + +struct LOCALGROUP_MEMBERS_INFO_1 { + struct domsid *lgrmi1_sid;/* [unique] */ + enum SID_NAME_USE lgrmi1_sidusage; + const char * lgrmi1_name; +}; + +struct LOCALGROUP_MEMBERS_INFO_2 { + struct domsid *lgrmi2_sid;/* [unique] */ + enum SID_NAME_USE lgrmi2_sidusage; + const char * lgrmi2_domainandname; +}; + +struct LOCALGROUP_MEMBERS_INFO_3 { + const char * lgrmi3_domainandname; +}; + struct TIME_OF_DAY_INFO { uint32_t tod_elapsedt; uint32_t tod_msecs; @@ -1128,6 +1161,30 @@ NET_API_STATUS NetLocalGroupEnum(const char * server_name /* [in] */, uint32_t *total_entries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */); +NET_API_STATUS NetLocalGroupAddMembers(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t total_entries /* [in] */); +NET_API_STATUS NetLocalGroupDelMembers(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t total_entries /* [in] */); +NET_API_STATUS NetLocalGroupGetMembers(const char * server_name /* [in] */, + const char * local_group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */, + uint32_t *resume_handle /* [in,out] [ref] */); +NET_API_STATUS NetLocalGroupSetMembers(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t total_entries /* [in] */); + /************************************************************//** * * NetRemoteTOD -- cgit From 93d2a982fc98cc0bcd2896b9d1e6cd50fe384ae9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Aug 2008 19:38:22 +0200 Subject: netapi: add c++ guard. Guenther (This used to be commit c9e38fef647520e4038f04bd163678bf4b30853d) --- source3/lib/netapi/netapi.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index dbf293e25b..5f9cff97db 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -20,6 +20,10 @@ #ifndef __LIB_NETAPI_H__ #define __LIB_NETAPI_H__ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /**************************************************************** NET_API_STATUS ****************************************************************/ @@ -1200,5 +1204,8 @@ NET_API_STATUS NetLocalGroupSetMembers(const char * server_name /* [in] */, NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */, uint8_t **buf /* [out] [ref] */); +#ifdef __cplusplus +} +#endif /* __cplusplus */ -#endif +#endif /* __LIB_NETAPI_H__ */ -- cgit From 214e6e7d72deb3a6c95bcd4cbaed0562c6b68110 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Aug 2008 19:39:38 +0200 Subject: netapi: add doxygen documentation for NetLocalGroup{Add,Del,Set,Get}Members. Guenther (cherry picked from commit eee28804b7efc3089ce3528f13de6c930cf00adb) (This used to be commit b725852502d45b568c80eb3c323861b89928983d) --- source3/lib/netapi/netapi.h | 75 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 5f9cff97db..e3cec7dc58 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1165,16 +1165,73 @@ NET_API_STATUS NetLocalGroupEnum(const char * server_name /* [in] */, uint32_t *total_entries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */); +/************************************************************//** + * + * NetLocalGroupAddMembers + * + * @brief Add Members to a Local Group + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to modified + * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure + * @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure + * @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in + * the buffer + * @return NET_API_STATUS + * + * example localgroup/localgroup_addmembers.c + ***************************************************************/ + NET_API_STATUS NetLocalGroupAddMembers(const char * server_name /* [in] */, const char * group_name /* [in] */, uint32_t level /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t total_entries /* [in] */); + +/************************************************************//** + * + * NetLocalGroupDelMembers + * + * @brief Delete Members from a Local Group + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to modified + * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure + * @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure + * @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in + * the buffer + * @return NET_API_STATUS + * + * example localgroup/localgroup_delmembers.c + ***************************************************************/ + NET_API_STATUS NetLocalGroupDelMembers(const char * server_name /* [in] */, const char * group_name /* [in] */, uint32_t level /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t total_entries /* [in] */); + +/************************************************************//** + * + * NetLocalGroupGetMembers + * + * @brief Enumerate Members in a local group + * + * @param[in] server_name The server name to connect to + * @param[in] local_group_name The localgroup that is going to be queried + * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure + * @param[out] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X + * structure + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of LOCALGROUP_MEMBERS_INFO_X entries in the buffer + * @param[out] total_entries The total number of LOCALGROUP_MEMBERS_INFO_X entries for that group + * @param[in,out] resume_handle A handle passed in and returned for resuming + * operations + * @return NET_API_STATUS + * + * example localgroup/localgroup_getmembers.c + ***************************************************************/ + NET_API_STATUS NetLocalGroupGetMembers(const char * server_name /* [in] */, const char * local_group_name /* [in] */, uint32_t level /* [in] */, @@ -1183,6 +1240,24 @@ NET_API_STATUS NetLocalGroupGetMembers(const char * server_name /* [in] */, uint32_t *entries_read /* [out] [ref] */, uint32_t *total_entries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */); + +/************************************************************//** + * + * NetLocalGroupSetMembers + * + * @brief Set Members in a Local Group + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to modified + * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure + * @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure + * @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in + * the buffer + * @return NET_API_STATUS + * + * example localgroup/localgroup_setmembers.c + ***************************************************************/ + NET_API_STATUS NetLocalGroupSetMembers(const char * server_name /* [in] */, const char * group_name /* [in] */, uint32_t level /* [in] */, -- cgit From 2b89fc16ccdc486a94d9a77d2356a89e34dbf7d9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Aug 2008 19:47:37 +0200 Subject: netapi: add doxygen documentation for NetUserModalsGet and NetUserModalsSet. Guenther (cherry picked from commit 93210f04c3b1e4fe977a395531ddc0387a65dab5) (This used to be commit ab1b214ba0bebfebf0685f9c05fdcf6eb141adb9) --- source3/lib/netapi/netapi.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index e3cec7dc58..270c76dca8 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -850,9 +850,39 @@ NET_API_STATUS NetUserSetInfo(const char * server_name /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); +/************************************************************//** + * + * NetUserModalsGet + * + * @brief Get SAM domain and password information + * + * @param[in] server_name The server name to connect to + * @param[in] level The level defining which USER_MODALS_INFO_X buffer to query + * @param[out] buffer The returned USER_MODALS_INFO_X buffer + * @return NET_API_STATUS + * + * example user/user_modalsget.c + ***************************************************************/ + NET_API_STATUS NetUserModalsGet(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t **buffer /* [out] [ref] */); + +/************************************************************//** + * + * NetUserModalsSet + * + * @brief Set SAM domain and password information + * + * @param[in] server_name The server name to connect to + * @param[in] level The level defining which USER_MODALS_INFO_X buffer to query + * @param[out] buffer The buffer conntaing a USER_MODALS_INFO_X structure + * @param[out] parm_err The returned parameter error number if any + * @return NET_API_STATUS + * + * example user/user_modalsset.c + ***************************************************************/ + NET_API_STATUS NetUserModalsSet(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t *buffer /* [in] [ref] */, -- cgit From 06ad4dc625a91b0d94fce5f45349b68f093d7c9a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 13 Aug 2008 13:59:08 +0200 Subject: netapi: add some remaining documentation fixes. Guenther (cherry picked from commit 4a4e90a3872d34791de43c3849c60e2f4e713d47) (This used to be commit c542307b7484df4adb9269f4bb99fa55d5dc48b8) --- source3/lib/netapi/netapi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 270c76dca8..f7bf1880cc 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -511,7 +511,7 @@ NET_API_STATUS NetApiBufferFree(void *buffer); * @brief Convert a domain sid into a string * * @param[in] sid A pointer to a sid structure - * @param[in] sid_string A pointer that holds a pointer to a sid string. Caller + * @param[in,out] sid_string A pointer that holds a pointer to a sid string. Caller * needs to free with free(3) * @return bool ***************************************************************/ @@ -526,7 +526,7 @@ int ConvertSidToStringSid(const struct domsid *sid, * @brief Convert a string into a domain sid * * @param[in] sid_string A pointer to a sid string. - * @param[in] sid A pointer that holds a pointer to a sid structure. + * @param[in,out] sid A pointer that holds a pointer to a sid structure. * Caller needs to free with free(3) * @return bool ***************************************************************/ @@ -837,7 +837,7 @@ NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */, * @param[in] server_name The server name to connect to * @param[in] user_name The name of the user that is going to be modified * @param[in] level The level defining the requested USER_INFO_X structure - * @param[in] buf The buffer containing a USER_INFO_X structure + * @param[in] buffer The buffer containing a USER_INFO_X structure * @param[out] parm_err The returned parameter error number if any * @return NET_API_STATUS * -- cgit From 2e8b0006b181944eda8694d03d8cb36eb561341e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 26 Aug 2008 21:12:23 +0200 Subject: netapi: add all USER_INFO structs to public header. Guenther (This used to be commit d19c06d7d055e4b1e8e47cc2df1a192a0a19eb14) --- source3/lib/netapi/netapi.h | 108 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index f7bf1880cc..71873b7656 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -228,6 +228,37 @@ struct USER_INFO_20 { uint32_t usri20_user_id; }; +struct USER_INFO_21 { + uint8_t *usri21_password; +}; + +struct USER_INFO_22 { + const char * usri22_name; + uint8_t *usri22_password; + uint32_t usri22_password_age; + uint32_t usri22_priv; + const char * usri22_home_dir; + const char * usri22_comment; + uint32_t usri22_flags; + uint32_t usri22_script_path; + uint32_t usri22_auth_flags; + const char * usri22_full_name; + const char * usri22_usr_comment; + const char * usri22_parms; + const char * usri22_workstations; + uint32_t usri22_last_logon; + uint32_t usri22_last_logoff; + uint32_t usri22_acct_expires; + uint32_t usri22_max_storage; + uint32_t usri22_units_per_week; + uint8_t *usri22_logon_hours;/* [unique] */ + uint32_t usri22_bad_pw_count; + uint32_t usri22_num_logons; + const char * usri22_logon_server; + uint32_t usri22_country_code; + uint32_t usri22_code_page; +}; + struct USER_INFO_23 { const char * usri23_name; const char * usri23_full_name; @@ -236,10 +267,87 @@ struct USER_INFO_23 { struct domsid *usri23_user_sid;/* [unique] */ }; +struct USER_INFO_1003 { + const char * usri1003_password; +}; + +struct USER_INFO_1005 { + uint32_t usri1005_priv; +}; + +struct USER_INFO_1006 { + const char * usri1006_home_dir; +}; + struct USER_INFO_1007 { const char * usri1007_comment; }; +struct USER_INFO_1008 { + uint32_t usri1008_flags; +}; + +struct USER_INFO_1009 { + const char * usri1009_script_path; +}; + +struct USER_INFO_1010 { + uint32_t usri1010_auth_flags; +}; + +struct USER_INFO_1011 { + const char * usri1011_full_name; +}; + +struct USER_INFO_1012 { + const char * usri1012_usr_comment; +}; + +struct USER_INFO_1013 { + const char * usri1013_parms; +}; + +struct USER_INFO_1014 { + const char * usri1014_workstations; +}; + +struct USER_INFO_1017 { + uint32_t usri1017_acct_expires; +}; + +struct USER_INFO_1018 { + uint32_t usri1018_max_storage; +}; + +struct USER_INFO_1020 { + uint32_t usri1020_units_per_week; + uint8_t *usri1020_logon_hours;/* [unique] */ +}; + +struct USER_INFO_1023 { + const char * usri1023_logon_server; +}; + +struct USER_INFO_1024 { + uint32_t usri1024_country_code; +}; + +struct USER_INFO_1025 { + uint32_t usri1025_code_page; +}; + +struct USER_INFO_1051 { + uint32_t usri1051_primary_group_id; +}; + +struct USER_INFO_1052 { + const char * usri1052_profile; +}; + +struct USER_INFO_1053 { + const char * usri1053_home_dir_drive; +}; + struct USER_MODALS_INFO_0 { uint32_t usrmod0_min_passwd_len; uint32_t usrmod0_max_passwd_age; -- cgit From ab6fc34ebc20ff2d3eb60393b066feeb35230b9b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Aug 2008 00:30:51 +0200 Subject: netapi: add ENCRYPTED_PWLEN to public header. Guenther (This used to be commit 7010230c4af667b4197c9bd58685dc5a0b2b7c4f) --- source3/lib/netapi/netapi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 71873b7656..4882ada893 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -33,6 +33,8 @@ typedef enum { #define ERROR_MORE_DATA ( 234L ) +#define ENCRYPTED_PWLEN ( 16 ) + /**************************************************************** ****************************************************************/ -- cgit From 29e8a0fa2a8ac8da624ebcf79f9d350ed1407c80 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Aug 2008 13:13:57 +0200 Subject: netapi: add NetUserGetGroups to public headers. Guenther (This used to be commit 2f95b7d9b5ad513e43d7d41ce9fb87300ec357a8) --- source3/lib/netapi/netapi.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 4882ada893..9ba1d30f5c 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -998,6 +998,33 @@ NET_API_STATUS NetUserModalsSet(const char * server_name /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); +/************************************************************//** + * + * NetUserGetGroups + * + * @brief Enumerate grouplist of a user on a server + * + * @param[in] server_name The server name to connect to + * @param[in] user_name The user name to query + * @param[in] level The enumeration level used for the query (Currently only + * level 0 is supported) + * @param[out] buffer The returned enumeration buffer + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of returned entries + * @param[out] total_entries The number of total entries + * @return NET_API_STATUS + * + * example user/user_getgroups.c + ***************************************************************/ + +NET_API_STATUS NetUserGetGroups(const char * server_name /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */); + /************************************************************//** * * NetQueryDisplayInformation -- cgit From 36de16b472a5377269cacb7f7e5227e8834d1788 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Aug 2008 19:15:32 +0200 Subject: netapi: fix public header for USER_INFO_4. Guenther (This used to be commit f54b24c70afb28b6897ce258929ab2c97f255d86) --- source3/lib/netapi/netapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 9ba1d30f5c..1dc933a9d9 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -185,7 +185,7 @@ struct USER_INFO_4 { const char * usri4_logon_server; uint32_t usri4_country_code; uint32_t usri4_code_page; - struct dom_sid *usri4_user_sid;/* [unique] */ + struct domsid *usri4_user_sid;/* [unique] */ uint32_t usri4_primary_group_id; const char * usri4_profile; const char * usri4_home_dir_drive; -- cgit From 0faaff160813f8659ec16c708fb71c9e4a39fdf7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Aug 2008 22:38:32 +0200 Subject: netapi: add USER_PRIV_* constants to public header. Guenther (This used to be commit 2274e5d8a8236b15558507289a8a455c15ca2633) --- source3/lib/netapi/netapi.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 1dc933a9d9..51ea17ad7b 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -91,6 +91,10 @@ struct USER_INFO_0 { const char * usri0_name; }; +#define USER_PRIV_GUEST ( 0 ) +#define USER_PRIV_USER ( 1 ) +#define USER_PRIV_ADMIN ( 2 ) + struct USER_INFO_1 { const char * usri1_name; const char * usri1_password; -- cgit From 1283d081b2f9e15a1cefffa00f974039d96926de Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Aug 2008 23:43:01 +0200 Subject: netapi: add AF_OP constants to public header. Guenther (This used to be commit a06e21782a4970840f5a8c65b633c9654443161d) --- source3/lib/netapi/netapi.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 51ea17ad7b..0c7c23b36f 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -106,6 +106,11 @@ struct USER_INFO_1 { const char * usri1_script_path; }; +#define AF_OP_PRINT ( 0x1 ) +#define AF_OP_COMM ( 0x2 ) +#define AF_OP_SERVER ( 0x4 ) +#define AF_OP_ACCOUNTS ( 0x8 ) + struct USER_INFO_2 { const char * usri2_name; const char * usri2_password; -- cgit From f7b293353a06b1b44e67364ad5de5cc6d4d738dd Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Aug 2008 01:06:12 +0200 Subject: netapi: add NetShareAdd to public header. Guenther (This used to be commit 5a036a431f4a8c686ddcd72df476acc6befddba0) --- source3/lib/netapi/netapi.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 0c7c23b36f..95d2316c9e 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -537,6 +537,17 @@ struct TIME_OF_DAY_INFO { uint32_t tod_weekday; }; +struct SHARE_INFO_2 { + const char * shi2_netname; + uint32_t shi2_type; + const char * shi2_remark; + uint32_t shi2_permissions; + uint32_t shi2_max_uses; + uint32_t shi2_current_uses; + const char * shi2_path; + const char * shi2_passwd; +}; + #endif /* _HEADER_libnetapi */ /**************************************************************** @@ -1455,6 +1466,27 @@ NET_API_STATUS NetLocalGroupSetMembers(const char * server_name /* [in] */, NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */, uint8_t **buf /* [out] [ref] */); + +/************************************************************//** + * + * NetShareAdd + * + * @brief Add Share + * + * @param[in] server_name The server name to connect to + * @param[in] level The level defining the requested SHARE_INFO_X structure + * @param[in] buf The buffer containing a SHARE_INFO_X structure + * @param[out] parm_err The returned parameter error number if any + * @return NET_API_STATUS + * + * example share/share_add.c + ***************************************************************/ + +NET_API_STATUS NetShareAdd(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit From 57fe0182d3a17c1b61e969e8842b891c362c12f2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 29 Aug 2008 12:46:38 +0200 Subject: netapi: add NetJoinFlags to public header. Guenther (This used to be commit 3babf758f49d6b08af8bd41c1dc8bd8de11a3893) --- source3/lib/netapi/netapi.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 95d2316c9e..05c702cb3f 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -75,6 +75,20 @@ struct DOMAIN_CONTROLLER_INFO { const char * client_site_name; }; +/* bitmap NetJoinFlags */ +#define NETSETUP_JOIN_DOMAIN ( 0x00000001 ) +#define NETSETUP_ACCT_CREATE ( 0x00000002 ) +#define NETSETUP_ACCT_DELETE ( 0x00000004 ) +#define NETSETUP_WIN9X_UPGRADE ( 0x00000010 ) +#define NETSETUP_DOMAIN_JOIN_IF_JOINED ( 0x00000020 ) +#define NETSETUP_JOIN_UNSECURE ( 0x00000040 ) +#define NETSETUP_MACHINE_PWD_PASSED ( 0x00000080 ) +#define NETSETUP_DEFER_SPN_SET ( 0x00000100 ) +#define NETSETUP_JOIN_DC_ACCOUNT ( 0x00000200 ) +#define NETSETUP_JOIN_WITH_NEW_NAME ( 0x00000400 ) +#define NETSETUP_INSTALL_INVOCATION ( 0x00040000 ) +#define NETSETUP_IGNORE_UNSUPPORTED_FLAGS ( 0x10000000 ) + #define FILTER_TEMP_DUPLICATE_ACCOUNT ( 0x0001 ) #define FILTER_NORMAL_ACCOUNT ( 0x0002 ) #define FILTER_INTERDOMAIN_TRUST_ACCOUNT ( 0x0008 ) -- cgit From e51de3e502fed7b932e43f115f7c1cdabfd576e3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 29 Aug 2008 18:35:48 +0200 Subject: netapi: add NetShareDel to public header. Guenther (This used to be commit 3ac8f83fcd9f92fe944de8c094d6aa6bda9074dc) --- source3/lib/netapi/netapi.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 05c702cb3f..89665371a0 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1501,6 +1501,24 @@ NET_API_STATUS NetShareAdd(const char * server_name /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); +/************************************************************//** + * + * NetShareDel + * + * @brief Delete Share + * + * @param[in] server_name The server name to connect to + * @param[in] net_name The name of the share to delete + * @param[in] reserved + * @return NET_API_STATUS + * + * example share/share_del.c + ***************************************************************/ + +NET_API_STATUS NetShareDel(const char * server_name /* [in] */, + const char * net_name /* [in] */, + uint32_t reserved /* [in] */); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit From d7b966714b2851c011845be50945796fddd3769f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 4 Sep 2008 16:46:36 +0200 Subject: netapi: add new SHARE_INFO structs to public header. Guenther (This used to be commit 30b99eb7e18ba274299ef37e3883154b35d6f2dc) --- source3/lib/netapi/netapi.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 89665371a0..856791807a 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -551,6 +551,16 @@ struct TIME_OF_DAY_INFO { uint32_t tod_weekday; }; +struct SHARE_INFO_0 { + const char * shi0_netname; +}; + +struct SHARE_INFO_1 { + const char * shi1_netname; + uint32_t shi1_type; + const char * shi1_remark; +}; + struct SHARE_INFO_2 { const char * shi2_netname; uint32_t shi2_type; @@ -562,6 +572,25 @@ struct SHARE_INFO_2 { const char * shi2_passwd; }; +struct SHARE_INFO_501 { + const char * shi501_netname; + uint32_t shi501_type; + const char * shi501_remark; + uint32_t shi501_flags; +}; + +struct SHARE_INFO_1004 { + const char * shi1004_remark; +}; + +struct SHARE_INFO_1005 { + uint32_t shi1005_flags; +}; + +struct SHARE_INFO_1006 { + uint32_t shi1006_max_uses; +}; + #endif /* _HEADER_libnetapi */ /**************************************************************** -- cgit From a1febe0513ed0228f344f85b2b96ad9efa483b4b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 29 Aug 2008 19:00:38 +0200 Subject: netapi: add NetShareEnum to public headers. Guenther (This used to be commit c2e936743227f10c2ade61589fe15c1805c79773) --- source3/lib/netapi/netapi.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 856791807a..817d4029ec 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1548,6 +1548,33 @@ NET_API_STATUS NetShareDel(const char * server_name /* [in] */, const char * net_name /* [in] */, uint32_t reserved /* [in] */); +/************************************************************//** + * + * NetShareEnum + * + * @brief Enumerate Shares + * + * @param[in] server_name The server name to connect to + * @param[in] level The level defining the SHARE_INFO_X structure + * @param[out] buffer The buffer containing a SHARE_INFO_X structure + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of SHARE_INFO_X entries in the buffer + * @param[out] total_entries The total number of SHARE_INFO_X entries + * @param[in,out] resume_handle A handle passed in and returned for resuming + * operations + * @return NET_API_STATUS + * + * example share/share_enum.c + ***************************************************************/ + +NET_API_STATUS NetShareEnum(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */, + uint32_t *resume_handle /* [in,out] [ref] */); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit From 240188b6ba50d00cb705c88ba3a8278f5db4bb5f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 1 Sep 2008 18:36:50 +0200 Subject: netapi: add new SERVER_INFO structures to public header. Guenther (This used to be commit cff66738936f9f5cc4d2cd284cde2e1ac2972d33) --- source3/lib/netapi/netapi.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 817d4029ec..80c44f0ddb 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -97,6 +97,37 @@ struct DOMAIN_CONTROLLER_INFO { #define TIMEQ_FOREVER ( (uint32_t)-1L ) +struct SERVER_INFO_100 { + uint32_t sv100_platform_id; + const char * sv100_name; +}; + +struct SERVER_INFO_101 { + uint32_t sv101_platform_id; + const char * sv101_name; + uint32_t sv101_version_major; + uint32_t sv101_version_minor; + uint32_t sv101_type; + const char * sv101_comment; +}; + +struct SERVER_INFO_102 { + uint32_t sv102_platform_id; + const char * sv102_name; + uint32_t sv102_version_major; + uint32_t sv102_version_minor; + uint32_t sv102_type; + const char * sv102_comment; + uint32_t sv102_users; + uint32_t sv102_disc; + uint8_t sv102_hidden; + uint32_t sv102_announce; + uint32_t sv102_anndelta; + uint32_t sv102_licenses; + const char * sv102_userpath; +}; + + struct SERVER_INFO_1005 { const char * sv1005_comment; }; -- cgit From 10e8f90a65a95e3b2aeda467ec37b5c94288f2a6 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 2 Sep 2008 11:06:22 +0200 Subject: netapi: add NetRenameMachineInDomain to public header. Guenther (This used to be commit b66cee247fa7ef5293074b191b9cc2cbf4eef5f3) --- source3/lib/netapi/netapi.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 80c44f0ddb..ba509f8d8c 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -827,6 +827,29 @@ NET_API_STATUS NetGetJoinableOUs(const char * server_name /* [in] */, uint32_t *ou_count /* [out] [ref] */, const char * **ous /* [out] [ref] */); +/************************************************************//** + * + * NetRenameMachineInDomain + * + * @brief Rename a machine in a domain + * + * @param[in] server_name The server name to connect to + * @param[in] new_machine_name The new machine name + * @param[in] account The domain account used for the query + * @param[in] password The domain account's password used for the query + * @param[in] rename_options Options used for the rename operation + * @return NET_API_STATUS + * + * example join/rename_machine.c + * + ***************************************************************/ + +NET_API_STATUS NetRenameMachineInDomain(const char * server_name /* [in] */, + const char * new_machine_name /* [in] */, + const char * account /* [in] */, + const char * password /* [in] */, + uint32_t rename_options /* [in] */); + /************************************************************//** * * NetServerGetInfo -- cgit From 72718e08990107e087fca8b63418772b110bfbee Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 2 Sep 2008 14:34:58 +0200 Subject: netapi: add NETSETUP_JOIN_STATUS to public header. Guenther (This used to be commit 86de3242a478c9f669958414ee9e7720cddad9aa) --- source3/lib/netapi/netapi.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index ba509f8d8c..8f1ec84fbc 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -97,6 +97,13 @@ struct DOMAIN_CONTROLLER_INFO { #define TIMEQ_FOREVER ( (uint32_t)-1L ) +enum NETSETUP_JOIN_STATUS { + NetSetupUnknownStatus=0, + NetSetupUnjoined=1, + NetSetupWorkgroupName=2, + NetSetupDomainName=3 +}; + struct SERVER_INFO_100 { uint32_t sv100_platform_id; const char * sv100_name; -- cgit From 93cb6d26d168df88900a51d158f56208eb387c74 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 4 Sep 2008 15:59:58 +0200 Subject: netapi: add NetShareGetInfo to public header. Guenther (This used to be commit 5c63b181ec698a6134ce31326dab9e6bd232acf0) --- source3/lib/netapi/netapi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 8f1ec84fbc..4432f767f8 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1636,6 +1636,26 @@ NET_API_STATUS NetShareEnum(const char * server_name /* [in] */, uint32_t *total_entries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */); +/************************************************************//** + * + * NetShareGetInfo + * + * @brief Get Share Info + * + * @param[in] server_name The server name to connect to + * @param[in] net_name The name of the share to query + * @param[in] level The level defining the SHARE_INFO_X structure + * @param[out] buffer The buffer containing a SHARE_INFO_X structure + * @return NET_API_STATUS + * + * example share/share_getinfo.c + ***************************************************************/ + +NET_API_STATUS NetShareGetInfo(const char * server_name /* [in] */, + const char * net_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit From 09e96f2a98019beb8e0982ba86dd25336eed22be Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 4 Sep 2008 20:04:35 +0200 Subject: netapi: add NetShareSetInfo to public header. Guenther (This used to be commit 2066ebc5e3e782b9443aee3e5beb1a99d69096ec) --- source3/lib/netapi/netapi.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 4432f767f8..e9670bb16e 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1656,6 +1656,28 @@ NET_API_STATUS NetShareGetInfo(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t **buffer /* [out] [ref] */); +/************************************************************//** + * + * NetShareSetInfo + * + * @brief Set Share Info + * + * @param[in] server_name The server name to connect to + * @param[in] net_name The name of the share to query + * @param[in] level The level defining the SHARE_INFO_X structure + * @param[in] buffer The buffer containing a SHARE_INFO_X structure + * @param[out] parm_err The returned parameter error number if any + * @return NET_API_STATUS + * + * example share/share_setinfo.c + ***************************************************************/ + +NET_API_STATUS NetShareSetInfo(const char * server_name /* [in] */, + const char * net_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit From 1a32fbeb863479376dec042d532148d6e612145f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 9 Sep 2008 19:36:51 +0200 Subject: netapi: fix doxygen warning. Guenther (This used to be commit e0312728a5ac5abd64622600f47967861a4e0183) --- source3/lib/netapi/netapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index e9670bb16e..234caf4b93 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1579,7 +1579,7 @@ NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */, * * @param[in] server_name The server name to connect to * @param[in] level The level defining the requested SHARE_INFO_X structure - * @param[in] buf The buffer containing a SHARE_INFO_X structure + * @param[in] buffer The buffer containing a SHARE_INFO_X structure * @param[out] parm_err The returned parameter error number if any * @return NET_API_STATUS * -- cgit From fce223602e33232c021ddfa7b4326ab1c464b4b4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 8 Sep 2008 10:26:11 +0200 Subject: netapi: add NetUserSetGroups to public header. Guenther (This used to be commit 3e96cd229c1536a7e16441f600c379ceb651b2b3) --- source3/lib/netapi/netapi.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 234caf4b93..b1b8e8f3fc 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1149,6 +1149,28 @@ NET_API_STATUS NetUserGetGroups(const char * server_name /* [in] */, uint32_t *entries_read /* [out] [ref] */, uint32_t *total_entries /* [out] [ref] */); +/************************************************************//** + * + * NetUserSetGroups + * + * @brief Set grouplist of a user on a server + * + * @param[in] server_name The server name to connect to + * @param[in] user_name The user name to query + * @param[in] level The level defining the GROUP_USERS_INFO_X structures in the buffer + * @param[in] buffer The buffer containing GROUP_USERS_INFO_X structures + * @param[in] num_entries The number of X structures in the buffer + * @return NET_API_STATUS + * + * example user/user_setgroups.c + ***************************************************************/ + +NET_API_STATUS NetUserSetGroups(const char * server_name /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t num_entries /* [in] */); + /************************************************************//** * * NetQueryDisplayInformation -- cgit From b6d861a9c0af1250a60e3e568bed860af40c7918 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 8 Sep 2008 10:23:07 +0200 Subject: netapi: add NetGroupSetUsers to public header. Guenther (This used to be commit 72a0b27aecc9113445dd03bdcd549ac50dd988aa) --- source3/lib/netapi/netapi.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index b1b8e8f3fc..c82dc9af5a 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1370,6 +1370,28 @@ NET_API_STATUS NetGroupGetUsers(const char * server_name /* [in] */, uint32_t *total_entries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */); +/************************************************************//** + * + * NetGroupSetUsers + * + * @brief Set Users for a group on a server + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The group name to enumerate users for + * @param[in] level The enumeration level used for the query + * @param[in] buffer The buffer containing a X structure + * @param[in] num_entries The number of X entries in the buffer + * @return NET_API_STATUS + * + * example group/group_setusers.c + ***************************************************************/ + +NET_API_STATUS NetGroupSetUsers(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t num_entries /* [in] */); + /************************************************************//** * * NetLocalGroupAdd -- cgit From f87901f7e402a067daec2caaad4e3070c0caedc3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 9 Sep 2008 13:44:09 +0200 Subject: netapi: add NetUserGetLocalGroups to public header. Guenther (This used to be commit 299f76f4ce9d6f617431149e2502c27faa4431aa) --- source3/lib/netapi/netapi.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index c82dc9af5a..6e4edab6c6 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -574,6 +574,10 @@ struct LOCALGROUP_MEMBERS_INFO_3 { const char * lgrmi3_domainandname; }; +struct LOCALGROUP_USERS_INFO_0 { + const char * lgrui0_name; +}; + struct TIME_OF_DAY_INFO { uint32_t tod_elapsedt; uint32_t tod_msecs; @@ -1171,6 +1175,34 @@ NET_API_STATUS NetUserSetGroups(const char * server_name /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t num_entries /* [in] */); +/************************************************************//** + * + * NetUserGetLocalGroups + * + * @brief Enumerate local grouplist of a user on a server + * + * @param[in] server_name The server name to connect to + * @param[in] user_name The user name to query + * @param[in] level The enumeration level used for the query + * @param[in] flags The flags used for the query + * @param[out] buffer The returned enumeration buffer + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of returned entries + * @param[out] total_entries The number of total entries + * @return NET_API_STATUS + * + * example user/user_getlocalgroups.c + ***************************************************************/ + +NET_API_STATUS NetUserGetLocalGroups(const char * server_name /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint32_t flags /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */); + /************************************************************//** * * NetQueryDisplayInformation -- cgit From bbd2eeb0f6f553600c8a5edc215aa544f9eab5a9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 9 Sep 2008 19:37:39 +0200 Subject: netapi: add NetFileClose to public header. Guenther (This used to be commit 502bbf00faa500765d1a9dedc1cede271c89b7d1) --- source3/lib/netapi/netapi.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 6e4edab6c6..a95ea50a86 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1754,6 +1754,22 @@ NET_API_STATUS NetShareSetInfo(const char * server_name /* [in] */, uint8_t *buffer /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); +/************************************************************//** + * + * NetFileClose + * + * @brief Close a file + * + * @param[in] server_name The server name to connect to + * @param[in] fileid The fileid of the file that is going to be closed + * @return NET_API_STATUS + * + * example file/file_close.c + ***************************************************************/ + +NET_API_STATUS NetFileClose(const char * server_name /* [in] */, + uint32_t fileid /* [in] */); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit From 8ab0d696c5be9602c239eeb00f5c976fe28ebc87 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 9 Sep 2008 21:56:04 +0200 Subject: netapi: add NetFileGetInfo to public header. Guenther (This used to be commit 5dd017b33f7d4154966aa3633d3ef3c8b482ca62) --- source3/lib/netapi/netapi.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index a95ea50a86..f29ba225ff 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -633,6 +633,18 @@ struct SHARE_INFO_1006 { uint32_t shi1006_max_uses; }; +struct FILE_INFO_2 { + uint32_t fi2_id; +}; + +struct FILE_INFO_3 { + uint32_t fi3_id; + uint32_t fi3_permissions; + uint32_t fi3_num_locks; + const char * fi3_pathname; + const char * fi3_username; +}; + #endif /* _HEADER_libnetapi */ /**************************************************************** @@ -1770,6 +1782,26 @@ NET_API_STATUS NetShareSetInfo(const char * server_name /* [in] */, NET_API_STATUS NetFileClose(const char * server_name /* [in] */, uint32_t fileid /* [in] */); +/************************************************************//** + * + * NetFileGetInfo + * + * @brief Close a file + * + * @param[in] server_name The server name to connect to + * @param[in] fileid The fileid of the file that is going to be closed + * @param[in] level The level of the FILE_INFO_X buffer + * @param[out] buffer The buffer containing a FILE_INFO_X structure + * @return NET_API_STATUS + * + * example file/file_getinfo.c + ***************************************************************/ + +NET_API_STATUS NetFileGetInfo(const char * server_name /* [in] */, + uint32_t fileid /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit From 6b3308648cc828d3e713b330c95bdc63eac4fd53 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 9 Sep 2008 22:16:07 +0200 Subject: netapi: add NetFileEnum to public header. Guenther (This used to be commit 50ce2a3d1a520bd1508110872e871c2c67e0f606) --- source3/lib/netapi/netapi.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'source3/lib/netapi/netapi.h') diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index f29ba225ff..9687461920 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1802,6 +1802,37 @@ NET_API_STATUS NetFileGetInfo(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t **buffer /* [out] [ref] */); +/************************************************************//** + * + * NetFileEnum + * + * @brief Enumerate Files + * + * @param[in] server_name The server name to connect to + * @param[in] base_path The + * @param[in] user_name The + * @param[in] level The level defining the FILE_INFO_X structure + * @param[out] buffer The buffer containing a FILE_INFO_X structure + * @param[in] prefmaxlen The requested maximal buffer size + * @param[out] entries_read The number of FILE_INFO_X entries in the buffer + * @param[out] total_entries The total number of FILE_INFO_X entries + * @param[in,out] resume_handle A handle passed in and returned for resuming + * operations + * @return NET_API_STATUS + * + * example file/file_enum.c + ***************************************************************/ + +NET_API_STATUS NetFileEnum(const char * server_name /* [in] */, + const char * base_path /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */, + uint32_t *resume_handle /* [in,out] [ref] */); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit