1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/source3/lib
Andreas Schneider ff7568daae s3:lib: Use memcpy() in escape_ldap_string()
../source3/lib/ldap_escape.c: In function ‘escape_ldap_string’:
../source3/lib/ldap_escape.c:79:4: error: ‘strncpy’ output truncated
    before terminating nul copying 3 bytes from a string of the same length
[-Werror=stringop-truncation]
    strncpy (p, sub, 3);
    ^~~~~~~~~~~~~~~~~~~

We concatenat and do not care about NUL-termination till the loop has
finished.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2018-05-17 17:30:09 +02:00
..
ABI smbldap: expose bind callback via API and increase smbldap ABI version 2017-07-04 11:14:49 +02:00
dbwrap dbwrap: Remove calls to loadparm 2018-04-24 01:53:19 +02:00
eventlog eventlog: Fix CID 1363194 Resource leak 2018-04-05 19:11:57 +02:00
netapi libsmb: Give dsgetdcname.c its own header 2018-04-11 01:06:39 +02:00
smbconf werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source3/lib/smbconf/smbconf_reg.c 2016-09-28 00:04:17 +02:00
addrchange.c s3:lib/addrchange: make use of tdgram_* in addrchange_*() 2015-06-12 17:08:17 +02:00
addrchange.h
adt_tree.c
audit.c Change all uses of uint32/16/8 in proto.h to uint32_t/16_t/8_t. 2015-04-29 23:42:20 +02:00
avahi.c
background.c s3: Move call to prctl_set_comment to reinit_after_fork 2015-09-24 08:00:16 +02:00
background.h
cbuf.c s3:lib: Add FALL_THROUGH statements in cbuf.c 2018-03-01 04:37:42 +01:00
cbuf.h Fix spelling s/formated/formatted/ 2018-05-12 02:09:26 +02:00
charcnv.c s3:lib:charcnv: Remove use of global global_iconv_handle 2017-04-18 11:47:17 +02:00
cleanupdb.c smbd: Simplify cleanupdb a bit 2017-10-20 20:03:12 +02:00
cleanupdb.h s3/lib: add smbd_cleanupd.tdb 2016-07-28 05:00:18 +02:00
cluster_support.c lib: Move lp_ctdbd_socket() to cluster_support.c 2015-10-03 00:01:11 +02:00
cluster_support.h lib: Move lp_ctdbd_socket() to cluster_support.c 2015-10-03 00:01:11 +02:00
conn_tdb.c smbstatus: show signing state of sessions and tcons 2016-01-22 07:52:21 +01:00
conn_tdb.h smbstatus: show signing state of sessions and tcons 2016-01-22 07:52:21 +01:00
ctdb_dummy.c lib: Add "unique_id" to ctdbd_process_exists 2017-09-26 09:37:13 +02:00
ctdbd_conn.c lib: Fix a typo 2017-11-27 04:51:59 +01:00
dmallocmsg.c
dumpcore.c s3/dump_core: Honour pipe symbol (|) in system-wide core_pattern under linux 2016-11-23 20:49:28 +01:00
errmap_unix.c s3-lib: Fix error mapping for EROFS 2017-09-08 02:33:14 +02:00
file_id.c
file_id.h
filename_util.c s3: lib: Add new utility function cp_smb_filename_nostream(). 2017-05-31 22:50:21 +02:00
fstring.c
g_lock.c tevent: Fix callers of tevent_req_set_endtime 2018-04-24 19:41:15 +02:00
gencache.c lib: Pass blob instead of &blob to gencache_set_data_blob 2017-11-29 16:59:16 +01:00
gencache.h lib: Pass blob instead of &blob to gencache_set_data_blob 2017-11-29 16:59:16 +01:00
id_cache.c lib/util: move memcache.[ch] to the toplevel 'samba-util' library 2014-07-18 15:43:33 +02:00
id_cache.h s3-lib: remove some dead prototypes 2017-05-10 15:53:20 +02:00
idmap_cache.c lib: Fix a comment in idmap_cache.c 2016-12-27 14:21:27 +01:00
idmap_cache.h s3-lib/idmap_cache: remove some dead prototypes 2017-05-10 15:53:21 +02:00
interface.c s3:lib: extend interpret_interface() to optionally read speed, caps, and index from config 2016-01-26 07:33:16 +01:00
ldap_debug_handler.c
ldap_escape.c s3:lib: Use memcpy() in escape_ldap_string() 2018-05-17 17:30:09 +02:00
lsa.c lib: Avoid an "includes.h" 2017-02-15 02:28:16 +01:00
messages_ctdb_ref.c messaging: Add messages_ctdb_ref 2017-07-25 17:43:18 +02:00
messages_ctdb_ref.h messaging: Add messages_ctdb_ref 2017-07-25 17:43:18 +02:00
messages_ctdb.c s3:messages: check tevent_fd_get_flags() == 0 before using stale event context pointer 2018-04-24 11:13:17 +02:00
messages_ctdb.h messages_ctdb: Add messaging_ctdb_connection 2017-07-25 17:43:18 +02:00
messages_dgm_ref.c messaging: Add an indirection for messaging_dgm_register_tevent_context 2016-10-05 11:47:17 +02:00
messages_dgm_ref.h messages_dgm_ref: Pass receiving "ev" to recv_cb 2016-10-05 00:06:22 +02:00
messages_dgm.c s3:messages: check tevent_fd_get_flags() == 0 before using stale event context pointer 2018-04-24 11:13:17 +02:00
messages_dgm.h messaging: Add messaging_dgm_forall 2017-12-05 00:56:12 +01:00
messages_util.c lib: Add lib/util/server_id.h 2017-01-22 18:30:11 +01:00
messages_util.h messaging: Define a binary format for message headers 2015-02-13 23:32:07 +01:00
messages.c s3:messages: improve tevent_create_immediate recycling 2018-04-24 14:30:20 +02:00
ms_fnmatch.c s3:lib: Fix size types in ms_fnmatch() 2018-03-21 20:43:19 +01:00
namearray.c
namemap_cache.c s3:lib: Fix probably a copy&paste error in namemap_cache_set_sid2name() 2018-03-23 01:59:07 +01:00
namemap_cache.h lib: Add namemap_cache 2017-11-29 16:59:16 +01:00
popt_common.c CVE-2017-12150: s3:popt_common: don't turn a guessed username into a specified one 2017-09-20 13:04:10 +02:00
privileges.c Fix various spelling errors 2015-11-06 13:43:45 +01:00
privileges.h
readdir_attr.h s3:vfs: add SMB_VFS_READDIR_ATTR() 2014-12-04 22:11:07 +01:00
recvfile.c lib: Move sys_rw* to lib/util 2015-10-13 01:23:07 +02:00
sendfile.c Remove a few #ifdef EWOULDBLOCk 2014-09-18 20:36:11 +02:00
server_contexts.c s3: server: s3_tevent_context_init() -> samba_tevent_context_init() 2016-09-24 19:52:08 +02:00
server_id_db_util.c lib: Add lib/util/server_id.h 2017-01-22 18:30:11 +01:00
server_id_db_util.h lib: Add server_id_db_set_exclusive 2015-07-07 23:51:23 +02:00
server_id_watch.c lib: Add server_id_watch_send 2016-07-15 16:56:13 +02:00
server_id_watch.h lib: Add server_id_watch_send 2016-07-15 16:56:13 +02:00
server_mutex.c server_mutex: don't leak lock_path onto talloc tos 2014-11-03 23:46:05 +01:00
server_prefork_util.c
server_prefork_util.h
server_prefork.c source3/lib/server_prefork.c set socket close on exec 2017-12-18 04:38:20 +01:00
server_prefork.h
serverid.c lib: Remove unused serverid.tdb 2017-12-05 04:58:26 +01:00
sessionid_tdb.c smbstatus: show signing state of sessions and tcons 2016-01-22 07:52:21 +01:00
sharesec.c sharesec: Remove error message for unmarshall_sec_desc failure 2015-07-06 20:19:12 +02:00
smbd_shim.c
smbd_shim.h
smbldap.c smbldap: don't try start tls on ldaps:// connections 2018-01-02 18:01:17 +01:00
smbrun.c Update smbrun to allow for settings environment variables. 2016-10-13 04:26:26 +02:00
srprs.c s3:lib: fix/simplify srprs_hex() 2014-11-25 07:25:44 +01:00
srprs.h
substitute_generic.c s3:lib: Add FALL_THROUGH statements in substitute_generic.c 2018-03-01 04:37:41 +01:00
substitute.c Add substitutions %t, %j, and %J as path-safe variants of %T, %i, and %I. 2018-01-08 03:34:17 +01:00
sys_popen.c lib: Extract sys_popen() 2016-02-23 22:03:16 +01:00
sys_popen.h lib: Extract sys_popen() 2016-02-23 22:03:16 +01:00
sysacls.c s3:lib: Add FALL_THROUGH statements in sysacls.c 2018-03-01 04:37:42 +01:00
sysquotas_4A.c sys-quotas: do not fail if user has no quota 2016-03-31 20:30:10 +02:00
sysquotas_4B.c s3-quotas: fix sysquotas_4B quota fetching for BSD 2016-05-23 23:28:12 +02:00
sysquotas_linux.c s3-sysquotas-linux: do not check for EDQUOT 2016-06-01 00:57:32 +02:00
sysquotas_nfs.c waf: Fix NFS quota support with libtirpc 2018-01-22 17:26:52 +01:00
sysquotas_xfs.c xfs quotas - fix case of no quota for user 2016-04-29 05:39:14 +02:00
sysquotas.c s3-sysquotas: correctly restore path when finding mount point 2016-10-08 05:22:25 +02:00
system_smbd.c lib: Avoid a malloc/realloc in getgroups_unix_user 2015-03-11 16:11:08 +01:00
system.c s3: VFS: Protect errno if sys_getwd() fails across free() call. 2017-10-04 10:06:15 +02:00
tallocmsg.c lib: Use talloc_report_str 2015-02-13 23:32:07 +01:00
tdb_validate.c lib: Remove sys_waitpid 2016-02-23 22:03:16 +01:00
tdb_validate.h lib: Remove tdb_compat 2015-03-17 11:30:52 +01:00
test_tldap.c tests: Add tests for parsing LDAPv3 and LDAPv2 filter strings 2018-02-19 23:47:08 +01:00
tevent_barrier.c lib: Avoid a "includes.h" 2017-01-22 18:30:11 +01:00
tevent_barrier.h
tevent_wait.c s3:tevent_wait: simplify the code by using tevent_req_defer_callback() 2015-05-19 16:37:52 +02:00
tevent_wait.h
time.c lib: Align nt_time_to_unix_timespec with unix_timespec_to_nt_time 2014-06-30 22:28:14 +02:00
tldap_gensec_bind.c s3: tldap: Make tldap_gensec_bind_send()/tldap_gensec_bind_recv() static. 2016-06-28 11:19:33 +02:00
tldap_gensec_bind.h s3: tldap: Make tldap_gensec_bind_send()/tldap_gensec_bind_recv() static. 2016-06-28 11:19:33 +02:00
tldap_util.c tldap: Dump unnecessary includes 2018-02-20 21:55:13 +01:00
tldap.c s3:lib: Fix size types in tldap_find_first_star() 2018-03-21 20:43:19 +01:00
username.c lib/util: move memcache.[ch] to the toplevel 'samba-util' library 2014-07-18 15:43:33 +02:00
util_builtin.c Change all uses of uint32/16/8 in proto.h to uint32_t/16_t/8_t. 2015-04-29 23:42:20 +02:00
util_cluster.c lib: Make ctdbd_probe return 0/errno 2015-10-07 23:54:06 +02:00
util_cluster.h
util_cmdline.c CVE-2017-12150: s3:lib: get_cmdline_auth_info_signing_state smb_encrypt SMB_SIGNING_REQUIRED 2017-09-20 13:04:10 +02:00
util_ea.c dlist: remove unneeded type argument from DLIST_ADD_END() 2016-02-06 21:48:17 +01:00
util_ea.h
util_event.c lib: #include "util_event.h" only where needed 2018-04-24 22:26:22 +02:00
util_file.c lib: Remove "includes.h" from util_file.c 2016-02-23 22:03:17 +01:00
util_file.h lib: Remove "includes.h" from util_file.c 2016-02-23 22:03:17 +01:00
util_malloc.c
util_names.c s3:lib: add braces around if-block in my_sam_name() 2016-01-26 03:19:18 +01:00
util_nscd.c
util_nttoken.c
util_path.c s3:lib: Add FALL_THROUGH statements in util_path.c 2018-03-01 04:37:41 +01:00
util_path.h s3: lib: Add canonicalize_absolute_path(). 2017-01-30 18:39:18 +01:00
util_procid.c lib: Move some procid functions out of util.c 2015-11-09 07:53:18 +01:00
util_procid.h lib: Move some procid functions out of util.c 2015-11-09 07:53:18 +01:00
util_sd.c s3:lib: Add FALL_THROUGH statements in util_sd.c 2018-03-01 04:37:42 +01:00
util_sec.c s3-lib: Get the real initial uid for selftest 2015-11-05 09:23:15 +01:00
util_sid_passdb.c lib: Add lib/util_unixsids.h 2016-12-28 20:17:12 +01:00
util_sid_passdb.h
util_sid.c s3-util: skip S-1-18 sids in token generaion in sid_array_from_info3(). 2016-01-16 01:24:04 +01:00
util_sock.c tevent: Fix callers of tevent_req_set_endtime 2018-04-24 19:41:15 +02:00
util_specialsids.c s3-util: add helper functions to deal with the S-1-18 domain. 2016-01-15 22:19:07 +01:00
util_str.c s3:lib: Add FALL_THROUGH statements in util_str.c 2018-03-01 04:37:41 +01:00
util_tdb.c s3-lib: Fix format-nonliteral warning 2016-08-24 01:33:50 +02:00
util_transfer_file.c lib: Move sys_rw* to lib/util 2015-10-13 01:23:07 +02:00
util_tsock.c lib: Introduce util_tsock.h 2016-01-10 22:24:17 +01:00
util_tsock.h lib: Introduce util_tsock.h 2016-01-10 22:24:17 +01:00
util_unixsids.c lib: Avoid an includes.h 2016-12-28 20:17:13 +01:00
util_unixsids.h passdb: Move lookup_unix_[user|group]_name to lookup_sid.c 2016-12-28 20:17:12 +01:00
util_wellknown.c s3:lib: validate domain name in lookup_wellknown_name() 2015-10-15 19:56:14 +02:00
util.c s3:util: remove reinit_after_fork_pipe_handler before sending SIGTERM 2018-04-24 19:41:14 +02:00
version_test.c
version.c
winbind_util.c lib: Remove unused winbind_get_groups and _get_sid_aliases 2017-03-28 17:45:18 +02:00
winbind_util.h lib: Remove unused winbind_get_groups and _get_sid_aliases 2017-03-28 17:45:18 +02:00
wins_srv.c
xattr_tdb.c
xattr_tdb.h