Andreas Schneider
a94adedd0e
s3:netapi: Remove unused variables
...
source3/lib/netapi/tests/netfile.c:40:22: error: variable 'i2' set but not used
[-Werror,-Wunused-but-set-variable]
struct FILE_INFO_2 *i2 = NULL;
^
source3/lib/netapi/tests/netfile.c:41:22: error: variable 'i3' set but not used
[-Werror,-Wunused-but-set-variable]
struct FILE_INFO_3 *i3 = NULL;
^
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2023-02-06 22:51:32 +00:00
Günther Deschner
39e8489dfc
s3-librpc: add ads.idl and convert ads_struct to talloc.
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-12-16 20:38:32 +00:00
Samuel Cabrero
633ccc55c0
s3:libads: Allocate ads->auth.user_name under ADS_STRUCT talloc context
...
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-06-27 15:50:30 +00:00
Samuel Cabrero
d64335eaef
s3:libads: Allocate ads->auth.password under ADS_STRUCT talloc context
...
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-06-27 15:50:30 +00:00
Samuel Cabrero
d0dc0171ad
s3:libads: Allocate ADS_STRUCT under a talloc context
...
The ads_destroy() function is now static and only called from the
ADS_STRUCT destructor.
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-06-27 15:50:30 +00:00
Samuel Cabrero
ee8ff51cfa
s3:netapi: Allocate a temporary talloc context for NetGetJoinableOUs_l()
...
Prepare to allocate ADS_STRUCT under a talloc context.
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-06-27 15:50:29 +00:00
Pavel Filipenský
3bb6b05781
s3:lib: Fix use_after_free: Using freed pointer "p"
...
Found by covscan.
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-05-23 18:25:28 +00:00
Andreas Schneider
e8e1a74da3
s3:lib: Do not close fd = -1 on fail in netapi example
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-12-15 19:32:30 +00:00
Andreas Schneider
9bd0fbf5e8
s3:lib: Fix memory leak in netapi examples
...
Found by covscan.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-12-15 19:32:30 +00:00
Alexander Bokovoy
e2d5b4d709
CVE-2020-25717: Add FreeIPA domain controller role
...
As we want to reduce use of 'classic domain controller' role but FreeIPA
relies on it internally, add a separate role to mark FreeIPA domain
controller role.
It means that role won't result in ROLE_STANDALONE.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14801
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14556
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-11-09 19:45:33 +00:00
Volker Lendecke
5cb5fadce4
libnetapi: Save lines with any_nt_status_not_ok()
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-06 17:22:30 +00:00
Günther Deschner
ec6fd45d7b
s3-libnetapi: add djoin tool
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
3e3269d34b
s3-libnetapi: implement NetRequestOfflineDomainJoin_l
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
e7a8aeee44
s3-libnetapi: add NetRequestOfflineDomainJoin example code
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
c1f937bfb1
s3-libnetapi: add NetRequestOfflineDomainJoin to api
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
0816a3d9e6
s3-libnetapi: add NetRequestOfflineDomainJoin() boilerplate.
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
3c8254a2fa
s3-libnetapi: implement NetProvisionComputerAccount_l
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
962c803947
s3-libnetapi: add NetProvisionComputerAccount example code
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
8bf2a3f9c0
s3-libnetapi: add NetProvisionComputerAccount to api.
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
3f71d1fa1c
s3-libnetapi: add NetProvisionComputerAccount() boilerplate
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
fc51b38ed8
s3-libnetapi: add netapi_save_file_ucs2() to example code
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
3cfe663651
s3-libnetapi: add netapi_read_file helper
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
4d65b26356
s3-libnetapi: add missing NetJoinFlags for netapi
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
1c62cac7f2
s3-libnetapi: add libnetapi_set_logfile()
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
927390bae5
s3-libnetapi: add libnetapi_get_use_kerberos()
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Günther Deschner
adcdb696cf
re-run make libnetapi ....
...
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14 16:49:30 +00:00
Andreas Schneider
08585bcfb2
s3:libnetapi: Check return code of cli_credentials_guess()
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-29 02:19:35 +00:00
Andreas Schneider
2fbc63cacc
auth:creds: Add obtained arg to cli_credentials_set_gensec_features()
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-28 03:43:34 +00:00
Andreas Schneider
521f77c667
auth:creds: Add obtained arg to cli_credentials_set_kerberos_state()
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-28 03:43:34 +00:00
Andreas Schneider
dc05cdb192
s3:libnetapi: Remove unused header file
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-03-30 05:48:37 +00:00
Andreas Schneider
c871c22461
s3:netapi: Add libnetapi_set_creds()
...
This will be used by the 'net' command in future!
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Mar 24 02:07:20 UTC 2021 on sn-devel-184
2021-03-24 02:07:20 +00:00
Andreas Schneider
6968a325d9
s3:netapi: Get rid of set_cmdline_auth_info_*()
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
3f3093933a
s3:netapi: Remove use_ccache from 'struct libnetapi_ctx'
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
67d49ac148
s3:netapi: Remove use_kerberos from struct libnetapi_ctx
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
dd7adbfa8f
s3:netapi: Remove workgroup from 'struct libnetapi_ctx'
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
51d5bebcc1
s3:netapi: Remove password from 'struct libnetapi_ctx'
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
d94053f9d8
s3:netapi: Remove username from 'struct libnetapi_ctx'
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
fd78554d11
s3:netapi: Use public functions for username/password
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
0aeca4e5a1
s3:netapi: Get username/password from cli_credentials in joindomain.c
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
3506800d3e
s3:netapi: Get username/password from cli_credentials in netapi.c
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
9285e64a62
s3:netapi: Fill also cli_credentials with netapi setters
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
7bb70f701e
s3:netapi: Add a cli_credentials pointer to struct libnetapi_ctx
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
517f94f5bf
s3:netapi: Remove unused ctx->krb5_cc_env
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
e79b067e23
s3:netapi: Make 'struct libnetapi_ctx' opaque
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
bcc3945e53
s3:netapi: Use public getters in getjoinableous example
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
44ef7f96e1
s3:netapi: Use public getters in remote_machine example
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Andreas Schneider
c9222ab838
s3:netapi: Implement public libnetapi_get_(username|password) functions
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2021-03-24 00:55:32 +00:00
Volker Lendecke
bb5bf50819
lib: Remove init_names()
...
is_myname() looks at lp_* directly, nmbd maintains its own list: We don't
need the baroque loadparm handler anymore.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-16 17:09:32 +00:00
Andreas Schneider
4aac9daf09
s3:libsmb: Remove max_protocol from cli_cm_open()
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-10-09 19:16:46 +00:00
Andreas Schneider
df1623abd7
s3:libsmb: Pass cli_credentials to cli_cm_open()
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-10-09 19:16:46 +00:00