1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
https://gitlab.com/samba-team/samba is the Official GitLab mirror of https://git.samba.org/samba.git -- Merge requests should be made on GitLab (not on GitHub)
Go to file
Günther Deschner 0e1695df7f Fix gcc11 compiler issue "-Werror=maybe-uninitialized"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14699

../../source4/dsdb/common/util_links.c: In function ‘ndr_guid_compare’:
../../source4/dsdb/common/util_links.c:38:29: error: ‘v1_data’ may be used uninitialized [-Werror=maybe-uninitialized]
   38 |         struct ldb_val v1 = data_blob_const(v1_data, sizeof(v1_data));
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/dsdb/common/util_links.c:22:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/dsdb/common/util_links.c:37:17: note: ‘v1_data’ declared here
   37 |         uint8_t v1_data[16];
      |                 ^~~~~~~
cc1: all warnings being treated as errors

[1729/3991] Compiling source3/smbd/smbXsrv_open.c
../../libcli/auth/smbencrypt.c: In function ‘decode_wkssvc_join_password_buffer’:
../../libcli/auth/smbencrypt.c:1045:32: error: ‘_confounder’ may be used uninitialized [-Werror=maybe-uninitialized]
 1045 |         DATA_BLOB confounder = data_blob_const(_confounder, 8);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../libcli/auth/smbencrypt.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../libcli/auth/smbencrypt.c:1044:17: note: ‘_confounder’ declared here
 1044 |         uint8_t _confounder[8];
      |                 ^~~~~~~~~~~
cc1: all warnings being treated as errors

[2624/3991] Compiling source4/torture/rpc/samr.c
../../source3/rpc_client/cli_samr.c: In function ‘dcerpc_samr_chgpasswd_user2’:
../../source3/rpc_client/cli_samr.c:158:33: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
  158 |         DATA_BLOB session_key = data_blob_const(old_nt_hash, 16);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source3/../lib/util/samba_util.h:48,
                 from ../../source3/include/includes.h:256,
                 from ../../source3/rpc_client/cli_samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source3/rpc_client/cli_samr.c:152:17: note: ‘old_nt_hash’ declared here
  152 |         uint8_t old_nt_hash[16];
      |                 ^~~~~~~~~~~
../../source3/rpc_client/cli_samr.c: In function ‘dcerpc_samr_chgpasswd_user3’:
../../source3/rpc_client/cli_samr.c:365:33: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
  365 |         DATA_BLOB session_key = data_blob_const(old_nt_hash, 16);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source3/../lib/util/samba_util.h:48,
                 from ../../source3/include/includes.h:256,
                 from ../../source3/rpc_client/cli_samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source3/rpc_client/cli_samr.c:358:17: note: ‘old_nt_hash’ declared here
  358 |         uint8_t old_nt_hash[16];
      |                 ^~~~~~~~~~~
cc1: all warnings being treated as errors

[3399/3991] Compiling source3/rpcclient/cmd_spotlight.c
../../source3/smbd/smbXsrv_open.c: In function ‘smbXsrv_open_set_replay_cache’:
../../source3/smbd/smbXsrv_open.c:936:26: error: ‘data’ may be used uninitialized [-Werror=maybe-uninitialized]
  936 |         DATA_BLOB blob = data_blob_const(data, ARRAY_SIZE(data));
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source3/../lib/util/samba_util.h:48,
                 from ../../source3/include/includes.h:256,
                 from ../../source3/smbd/smbXsrv_open.c:21:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source3/smbd/smbXsrv_open.c:935:17: note: ‘data’ declared here
  935 |         uint8_t data[SMBXSRV_OPEN_REPLAY_CACHE_FIXED_SIZE];
      |                 ^~~~
cc1: all warnings being treated as errors

../../source3/rpcclient/cmd_spotlight.c: In function ‘cmd_mdssvc_fetch_properties’:
../../source3/rpcclient/cmd_spotlight.c:60:18: error: ‘share_path’ may be used uninitialized [-Werror=maybe-uninitialized]
   60 |         status = dcerpc_mdssvc_open(b, mem_ctx,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   61 |                                     &device_id,
      |                                     ~~~~~~~~~~~
   62 |                                     &unkn1,
      |                                     ~~~~~~~
   63 |                                     &unkn2,
      |                                     ~~~~~~~
   64 |                                     argv[2],
      |                                     ~~~~~~~~
   65 |                                     argv[1],
      |                                     ~~~~~~~~
   66 |                                     share_path,
      |                                     ~~~~~~~~~~~
   67 |                                     &share_handle);
      |                                     ~~~~~~~~~~~~~~
In file included from ../../source3/rpcclient/cmd_spotlight.c:24:
source3/../librpc/gen_ndr/ndr_mdssvc_c.h:26:10: note: by argument 8 of type ‘const char *’ to ‘dcerpc_mdssvc_open’ declared here
   26 | NTSTATUS dcerpc_mdssvc_open(struct dcerpc_binding_handle *h,
      |          ^~~~~~~~~~~~~~~~~~
../../source3/rpcclient/cmd_spotlight.c:40:14: note: ‘share_path’ declared here
   40 |         char share_path[1025];
      |              ^~~~~~~~~~
cc1: all warnings being treated as errors

../../source4/torture/rpc/samr.c: In function ‘test_ChangePasswordUser2’:
../../source4/torture/rpc/samr.c:2266:19: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
 2266 |                 = data_blob_const(old_nt_hash, sizeof(old_nt_hash));
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/torture/rpc/samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/torture/rpc/samr.c:2263:17: note: ‘old_nt_hash’ declared here
 2263 |         uint8_t old_nt_hash[16], new_nt_hash[16];
      |                 ^~~~~~~~~~~
../../source4/torture/rpc/samr.c: In function ‘test_ChangePasswordUser2_ntstatus’:
../../source4/torture/rpc/samr.c:2371:19: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
 2371 |                 = data_blob_const(old_nt_hash, sizeof(old_nt_hash));
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/torture/rpc/samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/torture/rpc/samr.c:2368:17: note: ‘old_nt_hash’ declared here
 2368 |         uint8_t old_nt_hash[16], new_nt_hash[16];
      |                 ^~~~~~~~~~~
../../source4/torture/rpc/samr.c: In function ‘test_ChangePasswordUser3’:
../../source4/torture/rpc/samr.c:2478:38: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
 2478 |         DATA_BLOB old_nt_hash_blob = data_blob_const(old_nt_hash, 16);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/torture/rpc/samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/torture/rpc/samr.c:2473:17: note: ‘old_nt_hash’ declared here
 2473 |         uint8_t old_nt_hash[16], new_nt_hash[16];
      |                 ^~~~~~~~~~~
../../source4/torture/rpc/samr.c: In function ‘test_ChangePasswordRandomBytes’:
../../source4/torture/rpc/samr.c:2794:19: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
 2794 |                 = data_blob_const(old_nt_hash,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2795 |                                   sizeof(old_nt_hash));
      |                                   ~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/torture/rpc/samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/torture/rpc/samr.c:2792:17: note: ‘old_nt_hash’ declared here
 2792 |         uint8_t old_nt_hash[16], new_nt_hash[16];
      |                 ^~~~~~~~~~~
cc1: all warnings being treated as errors

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2021-05-07 06:23:32 +00:00
.github Added redirect from GitHub to GitLab 2018-12-05 16:35:33 +01:00
auth auth:creds:tests: Add test for cli_credentials_get_password_and_obtained() 2021-04-28 03:43:34 +00:00
bootstrap bootstrap/.gitlab-ci.yml: make sure we force gitlab.com runners for now 2021-04-13 08:23:35 +00:00
buildtools wafsamba: let 'use_hostcc=True' result in -D_SAMBA_HOSTCC_ 2021-04-20 11:42:37 +00:00
coverity coverity: Add modeling file for Coverity scan 2017-02-23 07:11:18 +01:00
ctdb lib: Make pidfile_path_create() return the existing PID on conflict 2021-03-16 17:09:32 +00:00
dfs_server lib/util: remove extra safe_string.h file 2020-08-28 02:18:40 +00:00
docs-xml docs-xml: Update samba.8 manpage for new cmdline opition parser 2021-04-29 03:58:37 +00:00
dynconfig dynconfig: Introduce and expose SAMBA_LIBEXECDIR 2021-04-01 19:32:36 +00:00
examples auth:creds: Add obtained arg to cli_credentials_set_kerberos_state() 2021-04-28 03:43:34 +00:00
file_server s3: Remove --log-stdout from daemons 2021-04-29 03:58:37 +00:00
include
lib lib:cmdline: Align integer types 2021-05-06 13:29:27 +00:00
libcli Fix gcc11 compiler issue "-Werror=maybe-uninitialized" 2021-05-07 06:23:32 +00:00
libds/common libds: rename UF_MACHINE_ACCOUNT_MASK to UF_TRUST_ACCOUNT_MASK 2018-03-13 18:59:17 +01:00
libgpo gpo: Don't free talloc pointer held elsewhere 2021-03-08 19:08:07 +00:00
librpc auth: Fix a typo 2021-04-27 13:24:35 +00:00
nsswitch tests: Use --configfile instead of -s 2021-04-28 03:43:34 +00:00
packaging winbind.service: drop quotes from $WINBINDOPTIONS variable 2020-05-12 12:27:11 +00:00
pidl pidl: set the per-request memory context in the pidl generator 2021-03-31 11:11:31 +00:00
python gpo: Correct name of files gpo 2021-04-29 22:27:20 +00:00
release-scripts
script selftest: Specify /dev/null as the smbd config file 2021-04-28 03:43:34 +00:00
selftest s3: Remove --log-stdout from daemons 2021-04-29 03:58:37 +00:00
source3 Fix gcc11 compiler issue "-Werror=maybe-uninitialized" 2021-05-07 06:23:32 +00:00
source4 Fix gcc11 compiler issue "-Werror=maybe-uninitialized" 2021-05-07 06:23:32 +00:00
testdata regfio: Improve handling of malformed registry hive files 2019-03-20 05:26:18 +00:00
testprogs tests: Use --configfile instead of -s 2021-04-28 03:43:34 +00:00
tests tests/sysquotas.c: include jfs/quota.h for 4B test on AIX 2019-02-17 13:33:13 +01:00
testsuite auth3: Remove auth_skel.c 2021-04-19 18:18:31 +00:00
third_party third_party: Update socket_wrapper to version 1.3.3 2021-03-17 23:53:04 +00:00
wintest wintest: py3 telnet.sendline() doesn't like string with ^Z 2019-07-02 04:21:36 +00:00
.bzrignore
.gitattributes gitattributes: Ignore .SAMBABACKUP files 2018-08-16 23:42:22 +02:00
.gitignore gitignore: Add .build.log 2019-11-26 12:49:41 +00:00
.gitlab-ci-coverage-runners.yml add .gitlab-ci-coverage.yml for a scheduled build 2021-04-13 09:33:14 +00:00
.gitlab-ci-coverage.yml add .gitlab-ci-coverage.yml for a scheduled build 2021-04-13 09:33:14 +00:00
.gitlab-ci-default-runners.yml .gitlab-ci*.yml: only use gitlab.org shared runners if possible 2021-04-13 08:23:35 +00:00
.gitlab-ci-default.yml add .gitlab-ci-coverage.yml for a scheduled build 2021-04-13 09:33:14 +00:00
.gitlab-ci-main.yml .gitlab-ci.yml: Always build the ubuntu1804-samba-o3 with --enable-coverage 2021-04-28 03:43:34 +00:00
.gitlab-ci-private.yml .gitlab-ci.yml: move the content to .gitlab-ci-main.yml 2021-04-13 08:23:35 +00:00
.gitlab-ci.yml .gitlab-ci.yml: move the content to .gitlab-ci-main.yml 2021-04-13 08:23:35 +00:00
.testr.conf
.ycm_extra_conf.py PEP8: fix E302: expected 2 blank lines, found 1 2018-08-24 07:49:29 +02:00
callcatcher-exceptions.grep
configure build: Move python detection back into waf (instead of in configure and Makefile) 2018-12-14 14:40:19 +01:00
configure.developer
COPYING
GPG_AA99442FB680B620_replaces_6F33915B6568B7EA.txt ReleaseKey: add GnuPG key transition statement for the Samba release key 2021-01-21 13:57:45 +01:00
Makefile Makefile: add support for 'make testonly' 2021-01-27 09:56:29 +00:00
PFIF.txt docs: protocolfreedom.org is no longer 2020-06-12 22:11:43 +00:00
README.cifs-utils
README.Coding.md README.Coding: target Python 3.6+ 2020-08-03 04:13:37 +00:00
README.contributing Rename Samba's DCO to Samba Developer's Declaration 2020-10-20 22:54:01 +00:00
README.md Update README.md with more up to date information 2020-06-12 22:11:43 +00:00
SECURITY.md Update SECURITY.md to point to security releases 2020-06-03 15:55:10 +00:00
setup.cfg pep8 tidy up config 2020-12-17 00:54:51 +00:00
VERSION VERSION: Bump version up to 4.15.0pre1... 2021-01-21 13:58:22 +01:00
VFS-License-clarification.txt VFS-License-clarification: minor improvements aligning w/ GPLv3 text 2020-11-04 21:29:40 +00:00
WHATSNEW.txt WHATSNEW: Document removal of NIS support 2021-04-28 08:47:21 +00:00
wscript build: Use bison at build time rather than lexyacc.sh to build the embedded heimdal 2021-04-28 03:43:34 +00:00
wscript_build lib:cmdline: Add initial code for new cmdline option parser 2021-04-28 03:43:34 +00:00
wscript_build_embedded_heimdal wscript_build_embedded_heimdal: update to handle waf 2.0.4 2018-09-05 06:37:25 +02:00
wscript_build_system_heimdal wscript: port build_system_heimdal to waf 2.0 2018-09-05 06:37:27 +02:00
wscript_build_system_mitkrb5 wscript: port build_system_mitkrb5 to waf 2.0 2018-09-05 06:37:27 +02:00
wscript_configure_embedded_heimdal build: Use bison at build time rather than lexyacc.sh to build the embedded heimdal 2021-04-28 03:43:34 +00:00
wscript_configure_system_gnutls waf: Check correctly if gnutls has been compiled with fips mode support 2021-04-13 19:17:56 +00:00
wscript_configure_system_heimdal wscript: Fix build with system heimdal 2019-11-13 17:49:38 +00:00
wscript_configure_system_mitkrb5 Fix uxsuccess test with new MIT krb5 library 1.18 2020-03-10 13:02:27 +00:00

About Samba

Samba is the standard Windows interoperability suite of programs for Linux and Unix. Samba is Free Software licensed under the GNU General Public License and the Samba project is a member of the Software Freedom Conservancy. Since 1992, Samba has provided secure, stable and fast file and print services for all clients using the SMB/CIFS protocol, such as all versions of DOS and Windows, OS/2, Linux and many others. Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments. It can function both as a domain controller or as a regular domain member.

For the AD DC implementation a full HOWTO is provided at: https://wiki.samba.org/index.php/Samba4/HOWTO

Community guidelines can be read at: https://wiki.samba.org/index.php/How_to_do_Samba:_Nicely

This software is freely distributable under the GNU public license, a copy of which you should have received with this software (in a file called COPYING).

CONTRIBUTIONS

Please see https://wiki.samba.org/index.php/Contribute for detailed set-by-step instructions on how to submit a patch for Samba via GitLab.

Samba's GitLab mirror is at https://gitlab.com/samba-team/samba

OUR CONTRIBUTORS

See https://www.samba.org/samba/team/ for details of the Samba Team, as well as details of all those currently active in Samba development.

If you like a particular feature then look through the git change-log (on the web at https://gitweb.samba.org/?p=samba.git;a=summary) and see who added it, then send them an email.

Remember that free software of this kind lives or dies by the response we get. If no one tells us they like it then we'll probably move onto something else.

MORE INFO

DOCUMENTATION

There is quite a bit of documentation included with the package, including man pages and the wiki at https://wiki.samba.org

If you would like to help with our documentation, please contribute that improved content to the wiki, we are moving as much content there as possible.

MAILING LIST

Please do NOT send subscription/unsubscription requests to the lists!

There is a mailing list for discussion of Samba. For details go to https://lists.samba.org/ or send mail to samba-subscribe@lists.samba.org

There is also an announcement mailing list where new versions are announced. To subscribe go to https://lists.samba.org/ or send mail to samba-announce-subscribe@lists.samba.org. All announcements also go to the samba list, so you only need to be on one.

For details of other Samba mailing lists and for access to archives, see https://lists.samba.org/

MAILING LIST ETIQUETTE

A few tips when submitting to this or any mailing list.

  1. Make your subject short and descriptive. Avoid the words "help" or "Samba" in the subject. The readers of this list already know that a) you need help, and b) you are writing about samba (of course, you may need to distinguish between Samba PDC and other file sharing software). Avoid phrases such as "what is" and "how do i". Some good subject lines might look like "Slow response with Excel files" or "Migrating from Samba PDC to NT PDC".

  2. If you include the original message in your reply, trim it so that only the relevant lines, enough to establish context, are included. Chances are (since this is a mailing list) we've already read the original message.

  3. Trim irrelevant headers from the original message in your reply. All we need to see is a) From, b) Date, and c) Subject. We don't even really need the Subject, if you haven't changed it. Better yet is to just preface the original message with "On [date] [someone] wrote:".

  4. Please don't reply to or argue about spam, spam filters or viruses on any Samba lists. We do have a spam filtering system that is working quite well thank you very much but occasionally unwanted messages slip through. Deal with it.

  5. Never say "Me too." It doesn't help anyone solve the problem. Instead, if you ARE having the same problem, give more information. Have you seen something that the other writer hasn't mentioned, which may be helpful?

  6. If you ask about a problem, then come up with the solution on your own or through another source, by all means post it. Someone else may have the same problem and is waiting for an answer, but never hears of it.

  7. Give as much relevant information as possible such as Samba release number, OS, kernel version, etc...

  8. RTFM. Google.

WEBSITE

A Samba website has been setup with lots of useful info. Connect to:

https://www.samba.org/

As well as general information and documentation, this also has searchable archives of the mailing list and links to other useful resources such as the wiki.