1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

493 Commits

Author SHA1 Message Date
Andrew Bartlett
5e26e94092 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Günther Deschner
f103e0c39f s3: fix more -Wunused-but-set-variable build warnings.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Jun  1 00:29:30 CEST 2011 on sn-devel-104
2011-06-01 00:29:30 +02:00
Volker Lendecke
797316ae97 s3: Use cli_connect_nb in net_rpc_check
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat May 28 21:57:04 CEST 2011 on sn-devel-104
2011-05-28 21:57:04 +02:00
Andrew Bartlett
da662b82b8 s3-lib Replace StrnCaseCmp() with strncasecmp_m()
strncasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Andrew Bartlett
c615ebed6e s3-lib Replace StrCaseCmp() with strcasecmp_m()
strcasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Jeremy Allison
9eee6e2fd2 More const fixes... getting near the end now.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May  6 00:57:00 CEST 2011 on sn-devel-104
2011-05-06 00:57:00 +02:00
Jeremy Allison
8380835fc6 Fix warning messages caused by addition of null check in fstrcpy macro. 2011-05-04 12:12:15 -07:00
Andrew Bartlett
0eca33bbf6 s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0a3c84b554 s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
317e19aeb3 s3-smb Use FILE_ATTRIBUTE_HIDDEN intead of aHIDDEN
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:12 +10:00
Sumit Bose
11c342724f s3-net: Add net trust utility
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-06 12:25:42 +02:00
Sumit Bose
34ea813553 s3-net: Do not use uninitialized value
s3-net: Do not use uninitialized value

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Mar 31 18:09:57 CEST 2011 on sn-devel-104
2011-03-31 18:09:57 +02:00
Günther Deschner
235f148590 s3-passdb: use passdb headers where needed.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
d85f140826 s3-winbind: remove global inclusion of libwbclient.
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
7a91282c9f s3-libsmb: only include rap client when needed.
Guenther
2011-03-15 21:16:35 +01:00
Volker Lendecke
c97ea5976c s3-net: Use wbcSidToStringBuf 2011-03-05 14:29:32 +01:00
Andreas Schneider
bf18403c81 s3-rpc_client: Move client pipe functions to own header. 2011-02-28 18:15:04 +01:00
Günther Deschner
00478b0559 s3-net: prefer dcerpc_lsa_X functions in "net rpc".
Guenther
2011-02-02 19:03:36 +01:00
Stefan Metzmacher
0313969aed s3:net: "net rpc vampire" is an alias for "net rpc vampire passdb"
The should use exactly the same code path for both.

metze
2011-02-02 15:45:20 +01:00
Günther Deschner
a19c1cbb8d s3-net: prefer dcerpc_samr_X functions in rpc_trustdom_list.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb  2 00:21:19 CET 2011 on sn-devel-104
2011-02-02 00:21:19 +01:00
Günther Deschner
c7b1432b6e s3-net: prefer dcerpc_samr_X functions in rpc_trustdom_del_internals.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
95ee07d8ab s3-net: prefer dcerpc_samr_X functions in rpc_trustdom_add_internals.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
49f08d1d7c s3-net: prefer dcerpc_samr_X functions in rpc_aliaslist_internals.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
37f2f518be s3-net: prefer dcerpc_samr_X functions in rpc_fetch_domain_aliases.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
bf10bbc074 s3-net: prefer dcerpc_samr_X functions in rpc_group_members_internals.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
20edb2d48b s3-net: prefer dcerpc_samr_X functions in rpc_list_alias_members.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
2a63433e94 s3-net: prefer dcerpc_samr_X functions in rpc_list_group_members.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
d280a52fdd s3-net: prefer dcerpc_samr_X functions in rpc_group_list_internals.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
84e3d14f7a s3-net: prefer dcerpc_samr_X functions in rpc_del_aliasmem.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
b9b2325f45 s3-net: prefer dcerpc_samr_X functions in rpc_del_groupmem.
Guenther
2011-02-01 23:29:14 +01:00
Günther Deschner
55e042a4f2 s3-net: prefer dcerpc_samr_X functions in rpc_add_aliasmem.
Guenther
2011-02-01 23:29:13 +01:00
Günther Deschner
f8147fbb14 s3-net: prefer dcerpc_samr_X functions in rpc_add_groupmem.
Guenther
2011-02-01 23:29:13 +01:00
Günther Deschner
e14c214ab3 s3-net: prefer dcerpc_samr_X functions in rpc_group_delete_internals.
Guenther
2011-02-01 23:29:13 +01:00
Günther Deschner
54b74c781d s3-net: prefer dcerpc_samr_X functions in rpc_sh_user_flag_edit_internals.
Guenther
2011-02-01 23:29:13 +01:00
Günther Deschner
1d3b378001 s3-net: prefer dcerpc_samr_X functions in rpc_sh_user_str_edit_internals.
Guenther
2011-02-01 23:29:13 +01:00
Günther Deschner
a87a9fc9ce s3-net: prefer dcerpc_samr_X functions in rpc_sh_user_show_internals.
Guenther
2011-02-01 23:29:13 +01:00
Günther Deschner
021e0b4cda s3-net: prefer dcerpc_samr_X functions in rpc_sh_handle_user.
Guenther
2011-02-01 23:29:13 +01:00
Günther Deschner
f140e892f6 s3-net: prefer dcerpc_samr_X functions in rpc_info_internals.
Guenther
2011-02-01 23:29:13 +01:00
Andreas Schneider
089c25cbbb s3-rpc_client: Rename get_query_dispinfo_params. 2011-01-21 14:34:18 +01:00
Olly Betts
f8f1711f61 Fix "net usersidlist" not to skip every other user
Remove double increment from for loop over users in get_user_tokens(),
left over from when this used to be a while loop.  Bug was introduced
in 1e39a619.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jan 19 01:34:29 CET 2011 on sn-devel-104
2011-01-19 01:34:29 +01:00
Günther Deschner
430664d769 s3-net: use correct spoolss header in net rpc.
Guenther
2011-01-18 23:54:31 +01:00
Günther Deschner
da433458e5 s3-net: prefer dcerpc_winreg_X functions.
Guenther

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-01-13 14:15:00 +01:00
Günther Deschner
8aa5b067b9 s3-net: prefer dcerpc_srvsvc_X functions.
Guenther

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-01-13 14:12:52 +01:00
Günther Deschner
1259e93ac0 s3-net: prefer dcerpc_netr_X functions.
Guenther

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-01-13 12:23:02 +01:00
Günther Deschner
9bad150705 s3-net: add missing breaks in switch statement in get_share_info().
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Jan 12 14:31:05 CET 2011 on sn-devel-104
2011-01-12 14:31:05 +01:00
Günther Deschner
d1954ce8e7 s3-initshutdown: prefer dcerpc_initshutdown_X functions.
Guenther
2011-01-11 17:12:04 +01:00
Günther Deschner
f08fdfae27 s3-net: fix net sid type build warning.
Guenther
2010-12-17 11:33:05 +01:00
Andrew Bartlett
88d020ade0 s3-netapi Add libnetapi_net_init(), don't double-init common Samba subsystems
The issue here is that libnet and net were both trying to load the
smb.conf files, the case tables and set the debug levels.  The set of
the debug levels caused problems, because it would force the level to
0, not (say) 10 as requested on the command line.

This regression was apparently introduced in
cf4de8ec2c when eliminating
AllowDebugChange.

Andrew Bartlett
2010-11-24 08:37:04 +01:00
Jeremy Allison
14ff2e8de9 Fix bug #7700 - Improvement of return code of smbclient
Based on an initial patch from H Hasegawa <hasegawa.hiroyuki@fujixerox.co.jp>.
Convert cli_list and associated functions to take calls that return NTSTATUS.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 29 19:40:16 UTC 2010 on sn-devel-104
2010-10-29 19:40:16 +00:00
Andrew Bartlett
deb7c02436 s3 Replace is_sid_in_token() with security_token_has_sid() from common code
The two routines are identical, so there is no need to keep both.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:04 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
b7683a2c9d samr: for correctness, rename samr_RidTypeArray to samr_RidAttrArray.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct  7 12:04:32 UTC 2010 on sn-devel-104
2010-10-07 12:04:32 +00:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Andrew Bartlett
d1bb21b0d5 s3:auth Remove NT_USER_TOKEN
The all UPPER case typedef is no longer the preferred Samba style
and this makes it easier to see that this is the IDL-derivied structure

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:06 +10:00
Andrew Bartlett
8c15cf54ae s3-auth Rename NT_USER_TOKEN user_sids -> sids
This is closer to the struct security_token from security.idl
2010-08-31 10:20:14 +10:00
Günther Deschner
e978a3d3f4 s3-lsa: separate out init_lsa headers.
Guenther
2010-08-25 22:50:39 +02:00
Günther Deschner
002ac5681f s3-net: only include netapi header when needed.
Guenther
2010-08-06 15:43:38 +02:00
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +02:00
Volker Lendecke
867626abca s3: Convert cli_list() to return NTSTATUS
If needed, the callback functions can count themselves
2010-08-04 20:32:50 +02:00
Volker Lendecke
dace013898 s3: Remove a typedef (struct file_info) 2010-07-27 21:05:35 +02:00
Volker Lendecke
2ef87d8ec0 s3: fix a typo 2010-07-26 15:05:19 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Günther Deschner
8478770c35 s3-rpc_client: move protos to init_samr.h
Guenther
2010-05-18 21:42:57 +02:00
Günther Deschner
230b880d14 s3-rpc_client: move protos to cli_lsarpc.h
Guenther
2010-05-18 21:42:41 +02:00
Günther Deschner
3f2719c202 s3-rpc_client: move protos to cli_samr.h
Guenther
2010-05-18 21:42:32 +02:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
7887d99a60 s3-net: Fix Bug #7417. 'net rpc user password' can set the wrong password.
Guenther
2010-05-10 10:36:39 +02:00
Volker Lendecke
abdb96b8ff s3: Implement "net rpc user setprimarygroup" 2010-04-26 17:10:31 +02:00
Volker Lendecke
dc1bcec73c s3: Add --use-ccache to net 2010-01-24 20:32:17 +01:00
Kai Blin
66de52c4f4 s3 net: Fix compile warnings 2010-01-19 14:48:34 +01:00
Kai Blin
09bc13728f s3 net/i18n: Use only one spelling for "Usage:" 2010-01-19 10:07:36 +01:00
Björn Jacke
bd3c922e2b s3/net: split up some printable stings to ease i18n
If we put strings like "Usage:" into separate _() macros and not the whole
"Usage:..." string we can cover much more messages by only one single
translation. The drawback is that the message in the sources looks less pretty.
2010-01-18 23:45:05 +01:00
Jeremy Allison
6653cc4323 Fix bug #7036 - net rpc getsid fails in hardened windows environments.
Fix suggested by Dave.Daugherty@Centrify.com.
2010-01-14 15:39:30 -08:00
Volker Lendecke
3ea64e0ad8 s3: Replace most calls to sid_append_rid() by sid_compose() 2010-01-10 20:56:16 +01:00
Volker Lendecke
99f292479f s3: Convert cli_tdis to the async API 2010-01-03 21:14:57 +01:00
Volker Lendecke
6aef5e591f Fix bug 6546: Avoid accessing buf[-1] if NUL byte comes from fgets 2009-11-30 21:48:59 +01:00
Günther Deschner
3d679a3b5f s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
Guenther
2009-11-26 20:03:17 +01:00
Volker Lendecke
579bb30188 s3: Fix bug 6338 -- net rpc trustdom list always display "none" 2009-11-22 22:42:02 +01:00
Volker Lendecke
b02c46bef9 Revert "s3: Make run_rpc_command take strings instead of a ndr_interface_table"
This reverts commit 53f2a1595e.
2009-11-08 19:43:46 +01:00
Volker Lendecke
53f2a1595e s3: Make run_rpc_command take strings instead of a ndr_interface_table 2009-11-08 13:12:15 +01:00
Volker Lendecke
2aa0af9867 s3: get_pipe_name_from_iface -> get_pipe_name_from_syntax 2009-11-07 09:14:15 +01:00
Björn Jacke
0ba004dc7d s3:net: fix output of net rpc trustdom list
Move some messages from stderr to stdout. When some trusting DCs were
unreachable we lacked \n's on stdout which screwed up whole the output.
2009-10-28 14:45:49 +01:00
Björn Jacke
6deb1fcc88 s3:net simplify padding to single printf call 2009-10-14 00:19:35 +02:00
Volker Lendecke
8a27fdea89 s3:net: Fix a segfault in "net rpc trustdom list" for overlong domain names
That was a complicated way to say "%-20.s"... But that code was from 2002 ...
2009-10-13 23:09:05 +02:00
Günther Deschner
ebe0e64ba9 s3: use enum netr_SchannelType all over the place.
Guenther
2009-10-13 10:21:46 +02:00
Günther Deschner
4a1b50afd5 s3-netlogon: pass down account name to remote password set functions.
Guenther
2009-10-13 00:07:45 +02:00
Björn Jacke
faad888e1a ѕ3: fix domain trust documentation confusion
fix some trusted/trusting mixups, make documentation more precise
and man page more verbose.
2009-10-12 22:42:27 +02:00
Günther Deschner
55b12d032c s3-net: print error when "net rpc changetrustpw" has failed.
Guenther
2009-10-05 13:01:53 +02:00
Günther Deschner
d3af0346c8 s3-dcerpc: use dcerpc_AuthLevel and remove duplicate set of flags.
Guenther
2009-09-15 17:49:34 +02:00
Günther Deschner
bea8e5fa60 s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_schannel().
Guenther
2009-09-11 09:59:04 +02:00
Günther Deschner
032e01e7c1 s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_spnego_ntlmssp and cli_rpc_pipe_open_ntlmssp.
Guenther
2009-09-11 09:59:04 +02:00
Kai Blin
8dcf3b7062 s3 net: i18n support for net rpc 2009-08-07 09:54:52 +02:00
Kai Blin
8f5ef10633 Revert "net: Use samba default command line arguments."
This reverts commit fb262f79fa
and related commits c36031778e
72fd5fa6bb and
38cd0e086f

This change caused more trouble than it solved. We need to do this differently.
Reverting so we don't accidently release this.
2009-07-22 13:39:34 +02:00
Kai Blin
fb262f79fa net: Use samba default command line arguments.
Attention:

The meaning of the -N flag changed.
To get the old meaning for net groupmap set, use the long option --ntname
The long option for using kerberos changed from --kerberos to --use-kerberos

net rpc commands will now prompt for a password if none is given.

As a benefit, net will now accept an authentication file like other samba
command line tools. So no need to specify the password on the command line in
scripts anymore.

This should fix bug #6357

Signed-off-by: Kai Blin <kai@samba.org>
2009-05-25 23:35:38 +02:00
Günther Deschner
077327a923 s3-net: Fix bug 6340: don't segfault when cleartext trustdom pwd could not be retrieved.
Guenther
2009-05-13 15:19:41 +02:00
Jeremy Allison
b4c9cfb2af Fix a bunch of compiler warnings about wrong format types.
Should make Solaris 10 builds look cleaner.
Jeremy.
2009-05-11 21:56:57 -07:00
Volker Lendecke
4949a2cfaa Fix some warnings due to uint16_t!=-1 always being true 2009-05-03 22:48:31 +02:00
Jeremy Allison
8cf78ff553 Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions.
This is smaller than it looks, it just fixes a lot of old code.
Next up, ensure all cli_XX functions return NTSTATUS.
Jeremy.
2009-04-30 15:26:43 -07:00