From c148831783238a036f1543ecad73d5b8060b6ac4 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Mon, 7 Mar 2005 05:09:37 +0000 Subject: r5677: Split structure definitions from implementation. rafal (This used to be commit ec177c92266713e9a486e536c2d81af4eaa2425e) --- source4/libnet/composite.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 source4/libnet/composite.h (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h new file mode 100644 index 0000000000..f4f5c456fe --- /dev/null +++ b/source4/libnet/composite.h @@ -0,0 +1,43 @@ +/* + Unix SMB/CIFS implementation. + + Copyright (C) Rafal Szczesniak 2005 + + 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 2 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, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* + composite function definitions +*/ + +enum userinfo_stage { USERINFO_OPENUSER, USERINFO_GETUSER, USERINFO_CLOSEUSER }; + +struct rpc_composite_userinfo { + struct { + struct policy_handle domain_handle; + const char *sid; + uint16_t level; + } in; + struct { + union samr_UserInfo info; + } out; +}; + +struct userinfo_state { + enum userinfo_stage stage; + struct dcerpc_pipe *pipe; + struct rpc_request *req; + struct rpc_composite_userinfo io; +}; -- cgit From 772f31797d22a8ef78e7257bbbd0cb36196af03a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 1 Apr 2005 11:24:52 +0000 Subject: r6165: fixed up the userinfo composite code. Fixes include: - talloc should always be done in the right context. For example, when creating the userinfo_state structure, place it inside the composite structure, not directly on the pipe. If this isn't done then correct cleanup can't happen on errors (as cleanup destroys the top level composite context only) - define private structures like userinfo_state in the userinfo.c code, not in the public header - only keep the parameters we need in the state structure. For example, the domain_handle is only needed in the first call, so we don't need to keep it around in the state structure, but the level is needed in later calls, so we need to keep it - always initialise [out,ref] parameters in RPC calls. The [ref] part means that the call assumes the pointer it has been given is valid. If you don't initialise it then you will get a segv on recv. This is why the code was dying. - don't use internal strucrure elements like the pipe pipe->conn->pending outside of the internal rpc implementation. That is an internal list, trying to use it from external code will cause crashes. - rpc calls assume that rpc call strucrures remain valid for the duration of the call. This means you need to keep the structures (such as "struct samr_Close") in the userinfo_state strucrure, otherwise it will go out of scope during the async processing - need to remember to change c->state to SMBCLI_REQUEST_DONE when the request has finished in the close handler, otherwise it will loop forever trying to close Mimir, please look at the diff carefully for more detailed info on the fixes (This used to be commit 01ea1e7762e214e87e74d6f28d6efeb6cdea9736) --- source4/libnet/composite.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index f4f5c456fe..86127a19b3 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -22,8 +22,6 @@ composite function definitions */ -enum userinfo_stage { USERINFO_OPENUSER, USERINFO_GETUSER, USERINFO_CLOSEUSER }; - struct rpc_composite_userinfo { struct { struct policy_handle domain_handle; @@ -34,10 +32,3 @@ struct rpc_composite_userinfo { union samr_UserInfo info; } out; }; - -struct userinfo_state { - enum userinfo_stage stage; - struct dcerpc_pipe *pipe; - struct rpc_request *req; - struct rpc_composite_userinfo io; -}; -- cgit From d4168ac5dd01b6da40c12cbfee07e514d4ef3ea2 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Tue, 19 Apr 2005 03:55:58 +0000 Subject: r6381: Started working on user account management functions. rafal (This used to be commit 7f3aafca07126f2c42670041020b2b7dfb17fa5f) --- source4/libnet/composite.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 86127a19b3..fe8aad835d 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -32,3 +32,14 @@ struct rpc_composite_userinfo { union samr_UserInfo info; } out; }; + + +struct rpc_composite_useradd { + struct { + struct policy_handle domain_handle; + const char *username; + } in; + struct { + struct policy_handle user_handle; + } out; +}; -- cgit From dea0c8729f06a192f564ee84600a733869c2b554 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Thu, 21 Apr 2005 07:24:16 +0000 Subject: r6414: Added composite user del function. Slightly broken still, but I don't want it to hang around not commited. rafal (This used to be commit 98d98b9bc7437e744e1e730fa8005b43fb1b672b) --- source4/libnet/composite.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index fe8aad835d..ee7f240c9c 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -43,3 +43,14 @@ struct rpc_composite_useradd { struct policy_handle user_handle; } out; }; + + +struct rpc_composite_userdel { + struct { + struct policy_handle domain_handle; + const char *username; + } in; + struct { + struct policy_handle user_handle; + } out; +}; -- cgit From f502171a8c071abf4e927c46378f0266e44a5e15 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sat, 23 Apr 2005 02:59:53 +0000 Subject: r6439: Clarify the comment. rafal (This used to be commit 96c3838d51c71318fdda3d1691552eba1feafb7d) --- source4/libnet/composite.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index ee7f240c9c..5a64847472 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -19,7 +19,7 @@ */ /* - composite function definitions + composite function io definitions */ struct rpc_composite_userinfo { -- cgit From d0686bf094263c510a561f69a2da82f73e5f37f7 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Fri, 3 Jun 2005 23:10:26 +0000 Subject: r7250: Starting work on composite domain open call. rafal (This used to be commit aa4cd8f9870b80954801ee588a36fdf286f59f0a) --- source4/libnet/composite.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 5a64847472..e1a3b5051f 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -54,3 +54,13 @@ struct rpc_composite_userdel { struct policy_handle user_handle; } out; }; + + +struct rpc_composite_domain_open { + struct { + uint32_t access_mask; + } in; + struct { + struct policy_handle domain_handle; + } out; +}; -- cgit From 5bb7a33106d70e76e065ed6039aef3c8cdeb9505 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Mon, 6 Jun 2005 08:59:19 +0000 Subject: r7323: Complete composite domain open call. rafal (This used to be commit 03a228477ea525dbe19d9661cd7c027e594f0fe1) --- source4/libnet/composite.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index e1a3b5051f..b983117adc 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -58,6 +58,7 @@ struct rpc_composite_userdel { struct rpc_composite_domain_open { struct { + const char *domain_name; uint32_t access_mask; } in; struct { -- cgit From c29896d0ae66f7ad19d32ded6d0333dbadcb51e2 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sat, 11 Jun 2005 10:31:33 +0000 Subject: r7490: Rename functions and prefices s/rpc_composite/libnet_rpc/ This makes more clear where the functions belong to. Also the rule will be that lowercased function names are not part of "official" libnet API (though it doesn't mean one absolutely cannot use them). rafal (This used to be commit f6ef7b882acc6ee07422944a417a8d9013c9d8d2) --- source4/libnet/composite.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index b983117adc..89ad1c4446 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -22,7 +22,7 @@ composite function io definitions */ -struct rpc_composite_userinfo { +struct libnet_rpc_userinfo { struct { struct policy_handle domain_handle; const char *sid; @@ -34,7 +34,7 @@ struct rpc_composite_userinfo { }; -struct rpc_composite_useradd { +struct libnet_rpc_useradd { struct { struct policy_handle domain_handle; const char *username; @@ -45,7 +45,7 @@ struct rpc_composite_useradd { }; -struct rpc_composite_userdel { +struct libnet_rpc_userdel { struct { struct policy_handle domain_handle; const char *username; @@ -56,7 +56,7 @@ struct rpc_composite_userdel { }; -struct rpc_composite_domain_open { +struct libnet_rpc_domain_open { struct { const char *domain_name; uint32_t access_mask; -- cgit From 204722b86859da5e2addce51054323b6ad49a658 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sat, 18 Jun 2005 22:10:32 +0000 Subject: r7732: Implementation of very basic lookup function (to be used in more specific routines like resolving a pdc). Also, couple of formatting fixes. rafal (This used to be commit b9deaa995da3a732514d5ceab0010adb58be5fe0) --- source4/libnet/composite.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 89ad1c4446..a5608a259e 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -22,6 +22,9 @@ composite function io definitions */ +#include "librpc/gen_ndr/ndr_samr.h" + + struct libnet_rpc_userinfo { struct { struct policy_handle domain_handle; -- cgit From 6868795a3905d390f3c33aea1aa55dd2937d5f13 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Thu, 21 Jul 2005 22:32:04 +0000 Subject: r8692: Starting parts of code to provide user modify functionality. It's more like a placeholder now, than a working code. Just don't want to hang it around my laptop only. rafal (This used to be commit bee1c9ec2dea4cad703386af35470c7d74cef4b0) --- source4/libnet/composite.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index a5608a259e..62ad46ee81 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -59,6 +59,21 @@ struct libnet_rpc_userdel { }; +struct libnet_rpc_usermod { + struct { + struct policy_handle domain_handle; + const char *username; + + struct usermod { + uint32_t fields; /* bitmask field */ + + const char *account_name; + const char *full_name; + } change; + } in; +}; + + struct libnet_rpc_domain_open { struct { const char *domain_name; -- cgit From 64f31e424b3db792a1edb909195eb592a9460aaf Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sat, 23 Jul 2005 10:27:45 +0000 Subject: r8721: Further work on libnet_rpc_usermod function. Now it can change both account name and full name. rafal (This used to be commit 1a779f8643c43677c62fed6ec4bfb54b08647f5b) --- source4/libnet/composite.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 62ad46ee81..70e70d04ee 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -59,12 +59,15 @@ struct libnet_rpc_userdel { }; +#define USERMOD_FIELD_ACCOUNT_NAME ( 0x00000001 ) +#define USERMOD_FIELD_FULL_NAME ( 0x00000002 ) + struct libnet_rpc_usermod { struct { struct policy_handle domain_handle; const char *username; - struct usermod { + struct usermod_change { uint32_t fields; /* bitmask field */ const char *account_name; -- cgit From 2440a008a82f73c8310cde18cbfb53e39c99d362 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Mon, 25 Jul 2005 22:00:56 +0000 Subject: r8759: Another couple of fields in usermod routine. rafal (This used to be commit 266aaacf0be955096d53e2a967bdaa5d0c5558ed) --- source4/libnet/composite.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 70e70d04ee..6fc0886cb3 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -61,6 +61,9 @@ struct libnet_rpc_userdel { #define USERMOD_FIELD_ACCOUNT_NAME ( 0x00000001 ) #define USERMOD_FIELD_FULL_NAME ( 0x00000002 ) +#define USERMOD_FIELD_DESCRIPTION ( 0x00000010 ) +#define USERMOD_FIELD_LOGON_SCRIPT ( 0x00000100 ) +#define USERMOD_FIELD_PROFILE_PATH ( 0x00000200 ) struct libnet_rpc_usermod { struct { @@ -72,6 +75,9 @@ struct libnet_rpc_usermod { const char *account_name; const char *full_name; + const char *description; + const char *logon_script; + const char *profile_path; } change; } in; }; -- cgit From 5cc8a42a058a6d8850143cae68e87f1395de99cc Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Wed, 27 Jul 2005 21:46:06 +0000 Subject: r8807: Modifying datetime field using struct timeval argument rather than text-based, after recent discussion with both Andrews :) Basic test seems to work (at least it doesn't fail now). rafal (This used to be commit 1bc3162e9441aeae1d8c4b4f03b5b75eb848f4bf) --- source4/libnet/composite.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 6fc0886cb3..256590bc5b 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -64,6 +64,7 @@ struct libnet_rpc_userdel { #define USERMOD_FIELD_DESCRIPTION ( 0x00000010 ) #define USERMOD_FIELD_LOGON_SCRIPT ( 0x00000100 ) #define USERMOD_FIELD_PROFILE_PATH ( 0x00000200 ) +#define USERMOD_FIELD_ACCT_EXPIRY ( 0x00004000 ) struct libnet_rpc_usermod { struct { @@ -78,6 +79,7 @@ struct libnet_rpc_usermod { const char *description; const char *logon_script; const char *profile_path; + struct timeval *acct_expiry; } change; } in; }; -- cgit From aff62e9ee2f15d92e5331afe9ff942e449a25d8e Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Mon, 1 Aug 2005 20:47:26 +0000 Subject: r8896: Handle more complex case where field being changed doesn't appear alone in any of userinfo levels. What's needed is extra query step to fill the userinfo structure and then modify a single field. The other way to do it is userinfo level 21 with bitmap flags set, but first all field flags need to be found. rafal (This used to be commit 59769977e8ebc54be7fa80f19638b634f52df515) --- source4/libnet/composite.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 256590bc5b..169b65f215 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -62,9 +62,12 @@ struct libnet_rpc_userdel { #define USERMOD_FIELD_ACCOUNT_NAME ( 0x00000001 ) #define USERMOD_FIELD_FULL_NAME ( 0x00000002 ) #define USERMOD_FIELD_DESCRIPTION ( 0x00000010 ) +#define USERMOD_FIELD_COMMENT ( 0x00000020 ) #define USERMOD_FIELD_LOGON_SCRIPT ( 0x00000100 ) #define USERMOD_FIELD_PROFILE_PATH ( 0x00000200 ) #define USERMOD_FIELD_ACCT_EXPIRY ( 0x00004000 ) +#define USERMOD_FIELD_ALLOW_PASS_CHG ( 0x00008000 ) +#define USERMOD_FIELD_ACCT_FLAGS ( 0x00100000 ) struct libnet_rpc_usermod { struct { @@ -77,9 +80,11 @@ struct libnet_rpc_usermod { const char *account_name; const char *full_name; const char *description; + const char *comment; const char *logon_script; const char *profile_path; struct timeval *acct_expiry; + struct timeval *allow_password_change; } change; } in; }; -- cgit From 9d7d5ea229cc12ac56d565f400990e7b56685a56 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Thu, 4 Aug 2005 02:51:26 +0000 Subject: r9037: New fields in usermod function - allow_password_change and force_password_change datetime. rafal (This used to be commit dfa2cc6c4ed8273b1d3ee604954c81c75f0890bd) --- source4/libnet/composite.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 169b65f215..85aa1c08e1 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -67,6 +67,7 @@ struct libnet_rpc_userdel { #define USERMOD_FIELD_PROFILE_PATH ( 0x00000200 ) #define USERMOD_FIELD_ACCT_EXPIRY ( 0x00004000 ) #define USERMOD_FIELD_ALLOW_PASS_CHG ( 0x00008000 ) +#define USERMOD_FIELD_FORCE_PASS_CHG ( 0x00010000 ) #define USERMOD_FIELD_ACCT_FLAGS ( 0x00100000 ) struct libnet_rpc_usermod { @@ -85,6 +86,7 @@ struct libnet_rpc_usermod { const char *profile_path; struct timeval *acct_expiry; struct timeval *allow_password_change; + struct timeval *force_password_change; } change; } in; }; -- cgit From 6f6e42c8565c63c637bc9b5a73aa08bf3a48550a Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Fri, 5 Aug 2005 01:23:06 +0000 Subject: r9090: Another field in usermod function - account flags. rafal (This used to be commit f0d51b78c040937bd27857c063fae215a3f0f465) --- source4/libnet/composite.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 85aa1c08e1..6d805812c0 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -87,6 +87,7 @@ struct libnet_rpc_usermod { struct timeval *acct_expiry; struct timeval *allow_password_change; struct timeval *force_password_change; + uint32_t acct_flags; } change; } in; }; -- cgit From ab4d635b92b116b02b88843b4ec4f5b7517bab1a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 26 Sep 2005 11:47:55 +0000 Subject: r10504: - seperate implementation specific stuff, from the generic composite stuff. - don't use SMBCLI_REQUEST_* state's in the genreic composite stuff - move monitor_fn to libnet. NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR state in the _send() function. I haven't fixed this bugs in this commit! We may need some composite_trigger_*() functions or so. And maybe some other generic helper functions... metze (This used to be commit 4527815a0a9b96e460f301cb1f0c0b3964c166fc) --- source4/libnet/composite.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 6d805812c0..0500e19f5a 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -24,6 +24,25 @@ #include "librpc/gen_ndr/ndr_samr.h" +/* + * Monitor structure and message types definitions. Composite function monitoring + * allows client application to be notified on function progress. This enables + * eg. gui client to display progress bars, status messages, etc. + */ + + +#define rpc_create_user (0x00000001) /* userman.h */ +#define rpc_open_user (0x00000002) /* userinfo.h */ +#define rpc_query_user (0x00000003) /* userinfo.h */ +#define rpc_close_user (0x00000004) /* userinfo.h */ +#define rpc_lookup_name (0x00000005) /* userman.h */ +#define rpc_delete_user (0x00000006) /* userman.h */ + +struct monitor_msg { + uint32_t type; + void *data; + size_t data_size; +}; struct libnet_rpc_userinfo { struct { -- cgit From bc651bd7a49ce266a7e0b12d473abda788035fef Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sun, 2 Oct 2005 19:59:24 +0000 Subject: r10679: Monitor messages should be issued from usermod functions. Also a bit of formatting. rafal (This used to be commit 1fefca2c172085d6bc05bfac1c10e52066e42606) --- source4/libnet/composite.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 0500e19f5a..515db2a792 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -37,6 +37,7 @@ #define rpc_close_user (0x00000004) /* userinfo.h */ #define rpc_lookup_name (0x00000005) /* userman.h */ #define rpc_delete_user (0x00000006) /* userman.h */ +#define rpc_set_user (0x00000007) /* userman.h */ struct monitor_msg { uint32_t type; -- cgit From 8528016978b084213ef53d66e1b6e831b1a01acc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 16 Mar 2006 00:23:11 +0000 Subject: r14464: Don't include ndr_BASENAME.h files unless strictly required, instead try to include just the BASENAME.h files (containing only structs) (This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd) --- source4/libnet/composite.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 515db2a792..916e306124 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -22,7 +22,7 @@ composite function io definitions */ -#include "librpc/gen_ndr/ndr_samr.h" +#include "librpc/gen_ndr/samr.h" /* * Monitor structure and message types definitions. Composite function monitoring -- cgit From 16b5eac38df91b2377cbffe3009cc956fcb8a78a Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Mon, 15 May 2006 21:49:27 +0000 Subject: r15625: Partial commit of my current work. It makes libnet api functions a bit more smart and more aware of what libnet_context can offer. The context is a help when some of the arguments are not passed (programmer counts on using sensible defaults) and stores some of results so that similar subsequent calls don't need to reopen some of policy handles, pipes, etc. again. It also helps to hide some of details the library user don't really want to know much about. Also, change domain open function to be part of public api, as it is going to be used in ejsnet interface. Note, this is work in progress. Comments are welcome. rafal (This used to be commit 1ed80c594c2f466e364a11194d6fdc30ac4a8f27) --- source4/libnet/composite.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 916e306124..516fdd4ef9 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -111,14 +111,3 @@ struct libnet_rpc_usermod { } change; } in; }; - - -struct libnet_rpc_domain_open { - struct { - const char *domain_name; - uint32_t access_mask; - } in; - struct { - struct policy_handle domain_handle; - } out; -}; -- cgit From 8a6ac85a961df1cdfb8a9db0af15b6258ee9da47 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sun, 28 May 2006 10:45:22 +0000 Subject: r15920: Move userman.c and userinfo.c definition into respective header files instead of composite.h rafal (This used to be commit 8cafbe7afedc90346cbd0cbedc2571143ae3dbc6) --- source4/libnet/composite.h | 73 ---------------------------------------------- 1 file changed, 73 deletions(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 516fdd4ef9..4f8e8489ae 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -18,12 +18,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* - composite function io definitions -*/ - -#include "librpc/gen_ndr/samr.h" - /* * Monitor structure and message types definitions. Composite function monitoring * allows client application to be notified on function progress. This enables @@ -44,70 +38,3 @@ struct monitor_msg { void *data; size_t data_size; }; - -struct libnet_rpc_userinfo { - struct { - struct policy_handle domain_handle; - const char *sid; - uint16_t level; - } in; - struct { - union samr_UserInfo info; - } out; -}; - - -struct libnet_rpc_useradd { - struct { - struct policy_handle domain_handle; - const char *username; - } in; - struct { - struct policy_handle user_handle; - } out; -}; - - -struct libnet_rpc_userdel { - struct { - struct policy_handle domain_handle; - const char *username; - } in; - struct { - struct policy_handle user_handle; - } out; -}; - - -#define USERMOD_FIELD_ACCOUNT_NAME ( 0x00000001 ) -#define USERMOD_FIELD_FULL_NAME ( 0x00000002 ) -#define USERMOD_FIELD_DESCRIPTION ( 0x00000010 ) -#define USERMOD_FIELD_COMMENT ( 0x00000020 ) -#define USERMOD_FIELD_LOGON_SCRIPT ( 0x00000100 ) -#define USERMOD_FIELD_PROFILE_PATH ( 0x00000200 ) -#define USERMOD_FIELD_ACCT_EXPIRY ( 0x00004000 ) -#define USERMOD_FIELD_ALLOW_PASS_CHG ( 0x00008000 ) -#define USERMOD_FIELD_FORCE_PASS_CHG ( 0x00010000 ) -#define USERMOD_FIELD_ACCT_FLAGS ( 0x00100000 ) - -struct libnet_rpc_usermod { - struct { - struct policy_handle domain_handle; - const char *username; - - struct usermod_change { - uint32_t fields; /* bitmask field */ - - const char *account_name; - const char *full_name; - const char *description; - const char *comment; - const char *logon_script; - const char *profile_path; - struct timeval *acct_expiry; - struct timeval *allow_password_change; - struct timeval *force_password_change; - uint32_t acct_flags; - } change; - } in; -}; -- cgit From ad521ee793cae006c674dd3a4bf17ca67aa4ade3 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Wed, 12 Jul 2006 22:10:17 +0000 Subject: r17001: Prepare a new monitor messages. rafal (This used to be commit aaa2a5a27adf9bc9bb6853f8b14538a5923b130a) --- source4/libnet/composite.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 4f8e8489ae..9ac2757e7c 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -33,6 +33,10 @@ #define rpc_delete_user (0x00000006) /* userman.h */ #define rpc_set_user (0x00000007) /* userman.h */ +#define net_lookup_dc (0x00000100) /* libnet_rpc.h */ +#define net_pipe_connected (0x00000200) /* libnet_rpc.h */ + + struct monitor_msg { uint32_t type; void *data; -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/libnet/composite.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 9ac2757e7c..738cd615db 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -5,7 +5,7 @@ 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 2 of the License, or + 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, @@ -14,8 +14,7 @@ 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, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ /* -- cgit From 0d80514173fad381a5ccd9d52cbc7b735bfd2d35 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Wed, 18 Jul 2007 21:24:37 +0000 Subject: r23959: add more monitor messages support that's been sitting around on my laptop for a while. rafal (This used to be commit c257363adbc2e8ab577bb86a5b4dbef3caf802ef) --- source4/libnet/composite.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 738cd615db..c888f513d1 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -24,16 +24,22 @@ */ -#define rpc_create_user (0x00000001) /* userman.h */ -#define rpc_open_user (0x00000002) /* userinfo.h */ -#define rpc_query_user (0x00000003) /* userinfo.h */ -#define rpc_close_user (0x00000004) /* userinfo.h */ -#define rpc_lookup_name (0x00000005) /* userman.h */ -#define rpc_delete_user (0x00000006) /* userman.h */ -#define rpc_set_user (0x00000007) /* userman.h */ +#define rpc_create_user (0x00000001) +#define rpc_open_user (0x00000002) +#define rpc_query_user (0x00000003) +#define rpc_close_user (0x00000004) +#define rpc_lookup_name (0x00000005) +#define rpc_delete_user (0x00000006) +#define rpc_set_user (0x00000007) +#define rpc_close (0x00000008) +#define rpc_connect (0x00000009) +#define rpc_lookup_domain (0x00000010) +#define rpc_open_domain (0x00000011) +#define rpc_open_policy (0x00000012) +#define rpc_query_policy (0x00000013) -#define net_lookup_dc (0x00000100) /* libnet_rpc.h */ -#define net_pipe_connected (0x00000200) /* libnet_rpc.h */ +#define net_lookup_dc (0x00000100) +#define net_rpc_connect (0x00000200) struct monitor_msg { -- cgit From a47313851f53f71c38825a4e37f49326d2d5d014 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Wed, 25 Jul 2007 23:17:02 +0000 Subject: r24051: more monitor function calls and monitor msg names convention change. rafal (This used to be commit 6ab10b2ed256fa3c55d1af8ddcc9dfdaf4598a1e) --- source4/libnet/composite.h | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index c888f513d1..ac4d320f09 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -24,22 +24,27 @@ */ -#define rpc_create_user (0x00000001) -#define rpc_open_user (0x00000002) -#define rpc_query_user (0x00000003) -#define rpc_close_user (0x00000004) -#define rpc_lookup_name (0x00000005) -#define rpc_delete_user (0x00000006) -#define rpc_set_user (0x00000007) -#define rpc_close (0x00000008) -#define rpc_connect (0x00000009) -#define rpc_lookup_domain (0x00000010) -#define rpc_open_domain (0x00000011) -#define rpc_open_policy (0x00000012) -#define rpc_query_policy (0x00000013) - -#define net_lookup_dc (0x00000100) -#define net_rpc_connect (0x00000200) +#define mon_SamrCreateUser (0x00000001) +#define mon_SamrOpenUser (0x00000002) +#define mon_SamrQueryUser (0x00000003) +#define mon_SamrCloseUser (0x00000004) +#define mon_SamrLookupName (0x00000005) +#define mon_SamrDeleteUser (0x00000006) +#define mon_SamrSetUser (0x00000007) +#define mon_SamrClose (0x00000008) +#define mon_SamrConnect (0x00000009) +#define mon_SamrLookupDomain (0x0000000A) +#define mon_SamrOpenDomain (0x0000000B) +#define mon_SamrEnumDomains (0x0000000C) +#define mon_LsaOpenPolicy (0x0000000D) +#define mon_LsaQueryPolicy (0x0000000E) +#define mon_LsaClose (0x0000000F) + +#define mon_NetLookupDc (0x00000100) +#define mon_NetRpcConnect (0x00000200) + +#define mon_Mask_Rpc (0x000000FF) +#define mon_Mask_Net (0x0000FF00) struct monitor_msg { -- cgit From 91657bfd51d380e7c9e55306d55a743bc3feebac Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sun, 19 Aug 2007 21:07:11 +0000 Subject: r24554: Add internal implementation (before api function) of group info call. rafal (This used to be commit 75f81f862ef06e86f9dcfcf4709221ed9c4e22ed) --- source4/libnet/composite.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/libnet/composite.h') diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index ac4d320f09..50bf1a761c 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -39,6 +39,8 @@ #define mon_LsaOpenPolicy (0x0000000D) #define mon_LsaQueryPolicy (0x0000000E) #define mon_LsaClose (0x0000000F) +#define mon_SamrOpenGroup (0x00000010) +#define mon_SamrQueryGroup (0x00000011) #define mon_NetLookupDc (0x00000100) #define mon_NetRpcConnect (0x00000200) -- cgit