The branch, master has been updated via 9053391f86a s3:mdssvc: fix flex compilation error via fa2a530cadb bootstrap: add mingw packages via 37de8208d1c winexe: Use C99 initializer for poptOption in winexe.c from 2ef79a4c1d6 dbcheck: fallback to the default tombstoneLifetime of 180 days
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 9053391f86a529e0a7dbcd23fa3a555d85c2207c Author: Ralph Boehme <s...@samba.org> Date: Mon May 27 12:27:57 2019 +0200 s3:mdssvc: fix flex compilation error [4440/4495] Compiling bin/default/source3/rpc_server/mdssvc/sparql_lexer.lex.c ../../source3/rpc_server/mdssvc/sparql_lexer.l:26: error: "yyalloc" redefined [-Werror] 26 | #define yyalloc SMB_MALLOC Looks like the dirty redefine trick doesn't work anymore with newer flex versions. According to the flex manual the right thing to do is to provide own functions for yyalloc and yyrealloc when passing the options "noyyalloc noyyrealloc". Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue May 28 11:49:06 UTC 2019 on sn-devel-184 commit fa2a530cadb2540a8fb677c6b35d5f85fc635921 Author: Stefan Metzmacher <me...@samba.org> Date: Thu May 23 15:01:52 2019 +0200 bootstrap: add mingw packages This makes sure we at least compile the example/winexe code Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 37de8208d1c24008c5832b95417a274f86bc2336 Author: Stefan Metzmacher <me...@samba.org> Date: Thu May 23 09:16:51 2019 +0200 winexe: Use C99 initializer for poptOption in winexe.c Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> ----------------------------------------------------------------------- Summary of changes: .gitlab-ci.yml | 4 +- bootstrap/config.py | 2 + bootstrap/generated-dists/centos6/bootstrap.sh | 1 + bootstrap/generated-dists/centos6/packages.yml | 1 + bootstrap/generated-dists/centos7/bootstrap.sh | 1 + bootstrap/generated-dists/centos7/packages.yml | 1 + bootstrap/generated-dists/debian7/bootstrap.sh | 1 + bootstrap/generated-dists/debian7/packages.yml | 1 + bootstrap/generated-dists/debian8/bootstrap.sh | 1 + bootstrap/generated-dists/debian8/packages.yml | 1 + bootstrap/generated-dists/debian9/bootstrap.sh | 1 + bootstrap/generated-dists/debian9/packages.yml | 1 + bootstrap/generated-dists/fedora28/bootstrap.sh | 1 + bootstrap/generated-dists/fedora28/packages.yml | 1 + bootstrap/generated-dists/fedora29/bootstrap.sh | 1 + bootstrap/generated-dists/fedora29/packages.yml | 1 + bootstrap/generated-dists/ubuntu1404/bootstrap.sh | 1 + bootstrap/generated-dists/ubuntu1404/packages.yml | 1 + bootstrap/generated-dists/ubuntu1604/bootstrap.sh | 1 + bootstrap/generated-dists/ubuntu1604/packages.yml | 1 + bootstrap/generated-dists/ubuntu1804/bootstrap.sh | 1 + bootstrap/generated-dists/ubuntu1804/packages.yml | 1 + bootstrap/sha1sum.txt | 2 +- examples/winexe/winexe.c | 149 +++++++++++++++++----- source3/rpc_server/mdssvc/sparql_lexer.l | 12 +- 25 files changed, 151 insertions(+), 38 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fbf329178b4..dfa1f6423d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,9 +22,11 @@ variables: # Set this to the contents of bootstrap/sha1sum.txt # which is generated by bootstrap/template.py --render # - SAMBA_CI_CONTAINER_TAG: 1185fa2a316b3bb7e0c24e9fb8279d4c17450809 + SAMBA_CI_CONTAINER_TAG: a50a08a6ecfbe1113f3892c0cb3e2646d58a1521 + # # We use the ubuntu1804 image as default as # it matches what we have on sn-devel-184. + # SAMBA_CI_CONTAINER_IMAGE: ubuntu1804 # # The following images are available diff --git a/bootstrap/config.py b/bootstrap/config.py index bd651e28597..279d1f0a046 100644 --- a/bootstrap/config.py +++ b/bootstrap/config.py @@ -65,6 +65,7 @@ COMMON = [ PKGS = [ # NAME1-dev, NAME2-devel ('lmdb-utils', 'lmdb'), + ('mingw-w64', 'mingw64-gcc'), ('nettle-dev', 'nettle-devel'), ('zlib1g-dev', 'zlib-devel'), ('libbsd-dev', 'libbsd-devel'), @@ -525,6 +526,7 @@ RPM_DISTS = { 'quota-devel': '', 'glusterfs-api-devel': '', 'libtasn1-tools': '', # asn1Parser is part of libtasn1 + 'mingw64-gcc': '', # doesn't exist } } } diff --git a/bootstrap/generated-dists/centos6/bootstrap.sh b/bootstrap/generated-dists/centos6/bootstrap.sh index 1279bbce7b9..6d60bd2cdc9 100755 --- a/bootstrap/generated-dists/centos6/bootstrap.sh +++ b/bootstrap/generated-dists/centos6/bootstrap.sh @@ -62,6 +62,7 @@ yum install -y \ lmdb \ lmdb-devel \ make \ + mingw64-gcc \ ncurses-devel \ nettle-devel \ openldap-devel \ diff --git a/bootstrap/generated-dists/centos6/packages.yml b/bootstrap/generated-dists/centos6/packages.yml index cb60034d299..168fbe9d334 100644 --- a/bootstrap/generated-dists/centos6/packages.yml +++ b/bootstrap/generated-dists/centos6/packages.yml @@ -50,6 +50,7 @@ packages: - lmdb - lmdb-devel - make + - mingw64-gcc - ncurses-devel - nettle-devel - openldap-devel diff --git a/bootstrap/generated-dists/centos7/bootstrap.sh b/bootstrap/generated-dists/centos7/bootstrap.sh index 81786a80bea..b59ef6a5dcf 100755 --- a/bootstrap/generated-dists/centos7/bootstrap.sh +++ b/bootstrap/generated-dists/centos7/bootstrap.sh @@ -62,6 +62,7 @@ yum install -y \ lmdb \ lmdb-devel \ make \ + mingw64-gcc \ ncurses-devel \ nettle-devel \ openldap-devel \ diff --git a/bootstrap/generated-dists/centos7/packages.yml b/bootstrap/generated-dists/centos7/packages.yml index 7f10cd38f1c..7a106d8dfd5 100644 --- a/bootstrap/generated-dists/centos7/packages.yml +++ b/bootstrap/generated-dists/centos7/packages.yml @@ -50,6 +50,7 @@ packages: - lmdb - lmdb-devel - make + - mingw64-gcc - ncurses-devel - nettle-devel - openldap-devel diff --git a/bootstrap/generated-dists/debian7/bootstrap.sh b/bootstrap/generated-dists/debian7/bootstrap.sh index f506af4c616..4e126cf5e8e 100755 --- a/bootstrap/generated-dists/debian7/bootstrap.sh +++ b/bootstrap/generated-dists/debian7/bootstrap.sh @@ -69,6 +69,7 @@ apt-get -y install \ lsb-release \ make \ mawk \ + mingw-w64 \ nettle-dev \ patch \ perl \ diff --git a/bootstrap/generated-dists/debian7/packages.yml b/bootstrap/generated-dists/debian7/packages.yml index 645df5a0692..667825c283e 100644 --- a/bootstrap/generated-dists/debian7/packages.yml +++ b/bootstrap/generated-dists/debian7/packages.yml @@ -58,6 +58,7 @@ packages: - lsb-release - make - mawk + - mingw-w64 - nettle-dev - patch - perl diff --git a/bootstrap/generated-dists/debian8/bootstrap.sh b/bootstrap/generated-dists/debian8/bootstrap.sh index 214574fed08..4c8c65223f9 100755 --- a/bootstrap/generated-dists/debian8/bootstrap.sh +++ b/bootstrap/generated-dists/debian8/bootstrap.sh @@ -72,6 +72,7 @@ apt-get -y install \ lsb-release \ make \ mawk \ + mingw-w64 \ nettle-dev \ patch \ perl \ diff --git a/bootstrap/generated-dists/debian8/packages.yml b/bootstrap/generated-dists/debian8/packages.yml index f5574edb1b9..a2d4bdb0638 100644 --- a/bootstrap/generated-dists/debian8/packages.yml +++ b/bootstrap/generated-dists/debian8/packages.yml @@ -61,6 +61,7 @@ packages: - lsb-release - make - mawk + - mingw-w64 - nettle-dev - patch - perl diff --git a/bootstrap/generated-dists/debian9/bootstrap.sh b/bootstrap/generated-dists/debian9/bootstrap.sh index 9349fd2fa5b..fa7051a67e1 100755 --- a/bootstrap/generated-dists/debian9/bootstrap.sh +++ b/bootstrap/generated-dists/debian9/bootstrap.sh @@ -72,6 +72,7 @@ apt-get -y install \ lsb-release \ make \ mawk \ + mingw-w64 \ nettle-dev \ patch \ perl \ diff --git a/bootstrap/generated-dists/debian9/packages.yml b/bootstrap/generated-dists/debian9/packages.yml index d46d33f1e57..1e3bd0c380c 100644 --- a/bootstrap/generated-dists/debian9/packages.yml +++ b/bootstrap/generated-dists/debian9/packages.yml @@ -61,6 +61,7 @@ packages: - lsb-release - make - mawk + - mingw-w64 - nettle-dev - patch - perl diff --git a/bootstrap/generated-dists/fedora28/bootstrap.sh b/bootstrap/generated-dists/fedora28/bootstrap.sh index 85b328cc711..048efa5f3a3 100755 --- a/bootstrap/generated-dists/fedora28/bootstrap.sh +++ b/bootstrap/generated-dists/fedora28/bootstrap.sh @@ -65,6 +65,7 @@ dnf install -y \ lmdb \ lmdb-devel \ make \ + mingw64-gcc \ ncurses-devel \ nettle-devel \ openldap-devel \ diff --git a/bootstrap/generated-dists/fedora28/packages.yml b/bootstrap/generated-dists/fedora28/packages.yml index 3655cdbd278..c96df0b96a1 100644 --- a/bootstrap/generated-dists/fedora28/packages.yml +++ b/bootstrap/generated-dists/fedora28/packages.yml @@ -54,6 +54,7 @@ packages: - lmdb - lmdb-devel - make + - mingw64-gcc - ncurses-devel - nettle-devel - openldap-devel diff --git a/bootstrap/generated-dists/fedora29/bootstrap.sh b/bootstrap/generated-dists/fedora29/bootstrap.sh index 85b328cc711..048efa5f3a3 100755 --- a/bootstrap/generated-dists/fedora29/bootstrap.sh +++ b/bootstrap/generated-dists/fedora29/bootstrap.sh @@ -65,6 +65,7 @@ dnf install -y \ lmdb \ lmdb-devel \ make \ + mingw64-gcc \ ncurses-devel \ nettle-devel \ openldap-devel \ diff --git a/bootstrap/generated-dists/fedora29/packages.yml b/bootstrap/generated-dists/fedora29/packages.yml index 3655cdbd278..c96df0b96a1 100644 --- a/bootstrap/generated-dists/fedora29/packages.yml +++ b/bootstrap/generated-dists/fedora29/packages.yml @@ -54,6 +54,7 @@ packages: - lmdb - lmdb-devel - make + - mingw64-gcc - ncurses-devel - nettle-devel - openldap-devel diff --git a/bootstrap/generated-dists/ubuntu1404/bootstrap.sh b/bootstrap/generated-dists/ubuntu1404/bootstrap.sh index ba193207c44..65625604f4b 100755 --- a/bootstrap/generated-dists/ubuntu1404/bootstrap.sh +++ b/bootstrap/generated-dists/ubuntu1404/bootstrap.sh @@ -70,6 +70,7 @@ apt-get -y install \ lsb-release \ make \ mawk \ + mingw-w64 \ nettle-dev \ patch \ perl \ diff --git a/bootstrap/generated-dists/ubuntu1404/packages.yml b/bootstrap/generated-dists/ubuntu1404/packages.yml index 477fc4fb090..8838828d7b8 100644 --- a/bootstrap/generated-dists/ubuntu1404/packages.yml +++ b/bootstrap/generated-dists/ubuntu1404/packages.yml @@ -59,6 +59,7 @@ packages: - lsb-release - make - mawk + - mingw-w64 - nettle-dev - patch - perl diff --git a/bootstrap/generated-dists/ubuntu1604/bootstrap.sh b/bootstrap/generated-dists/ubuntu1604/bootstrap.sh index 6a3e43f3dab..a47ef984cb5 100755 --- a/bootstrap/generated-dists/ubuntu1604/bootstrap.sh +++ b/bootstrap/generated-dists/ubuntu1604/bootstrap.sh @@ -71,6 +71,7 @@ apt-get -y install \ lsb-release \ make \ mawk \ + mingw-w64 \ nettle-dev \ patch \ perl \ diff --git a/bootstrap/generated-dists/ubuntu1604/packages.yml b/bootstrap/generated-dists/ubuntu1604/packages.yml index 653add38bfb..23939c38e80 100644 --- a/bootstrap/generated-dists/ubuntu1604/packages.yml +++ b/bootstrap/generated-dists/ubuntu1604/packages.yml @@ -60,6 +60,7 @@ packages: - lsb-release - make - mawk + - mingw-w64 - nettle-dev - patch - perl diff --git a/bootstrap/generated-dists/ubuntu1804/bootstrap.sh b/bootstrap/generated-dists/ubuntu1804/bootstrap.sh index 6149a2b27ea..45212ccfb81 100755 --- a/bootstrap/generated-dists/ubuntu1804/bootstrap.sh +++ b/bootstrap/generated-dists/ubuntu1804/bootstrap.sh @@ -73,6 +73,7 @@ apt-get -y install \ lsb-release \ make \ mawk \ + mingw-w64 \ nettle-dev \ patch \ perl \ diff --git a/bootstrap/generated-dists/ubuntu1804/packages.yml b/bootstrap/generated-dists/ubuntu1804/packages.yml index 07e0ab9c217..f2c981fba83 100644 --- a/bootstrap/generated-dists/ubuntu1804/packages.yml +++ b/bootstrap/generated-dists/ubuntu1804/packages.yml @@ -62,6 +62,7 @@ packages: - lsb-release - make - mawk + - mingw-w64 - nettle-dev - patch - perl diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt index 02229d245ac..7aa5a4a6aea 100644 --- a/bootstrap/sha1sum.txt +++ b/bootstrap/sha1sum.txt @@ -1 +1 @@ -1185fa2a316b3bb7e0c24e9fb8279d4c17450809 +a50a08a6ecfbe1113f3892c0cb3e2646d58a1521 diff --git a/examples/winexe/winexe.c b/examples/winexe/winexe.c index 429ba2f5163..b2257852272 100644 --- a/examples/winexe/winexe.c +++ b/examples/winexe/winexe.c @@ -88,41 +88,122 @@ static void parse_args(int argc, const char *argv[], char *opt_kerberos = NULL; char *opt_auth_file = NULL; char *opt_debuglevel = NULL; - struct poptOption long_options[] = { - { "help", 'h', POPT_ARG_NONE, &flag_help, 0, - "Display help message" }, - { "version", 'V', POPT_ARG_NONE, &flag_version, 0, - "Display version number" }, - { "user", 'U', POPT_ARG_STRING, &opt_user, 0, - "Set the network username", "[DOMAIN/]USERNAME[%PASSWORD]" }, - { "authentication-file", 'A', - POPT_ARG_STRING, &opt_auth_file, 0, - "Get the credentials from a file", "FILE" }, - { "no-pass", 'N', POPT_ARG_NONE, &flag_nopass, 0, - "Do not ask for a password", NULL }, - { "kerberos", 'k', POPT_ARG_STRING, &opt_kerberos, 0, - "Use Kerberos, -k [yes|no]" }, - { "debuglevel", 'd', POPT_ARG_STRING, &opt_debuglevel, 0, - "Set debug level", "DEBUGLEVEL" }, - { "uninstall", 0, POPT_ARG_NONE, &flag_uninstall, 0, - "Uninstall winexe service after remote execution", NULL}, - { "reinstall", 0, POPT_ARG_NONE, &flag_reinstall, 0, - "Reinstall winexe service before remote execution", NULL}, - { "runas", 0, POPT_ARG_STRING, &options->runas, 0, - "Run as the given user (BEWARE: this password is sent " - "in cleartext over the network!)", - "[DOMAIN\\]USERNAME%PASSWORD"}, - { "runas-file", 0, POPT_ARG_STRING, &options->runas_file, 0, - "Run as user options defined in a file", "FILE"}, - { "interactive", 0, POPT_ARG_INT, &flag_interactive, 0, - "Desktop interaction: 0 - disallow, 1 - allow. If allow, " - "also use the --system switch (Windows requirement). Vista " - "does not support this option.", "0|1"}, - { "ostype", 0, POPT_ARG_INT, &flag_ostype, 0, - "OS type: 0 - 32-bit, 1 - 64-bit, 2 - winexe will decide. " - "Determines which version (32-bit or 64-bit) of service " - "will be installed.", "0|1|2"}, + { + .longName = "help", + .shortName = 'h', + .argInfo = POPT_ARG_NONE, + .arg = &flag_help, + .val = 0, + .descrip = "Display help message", + .argDescrip = NULL, + },{ + .longName = "version", + .shortName = 'V', + .argInfo = POPT_ARG_NONE, + .arg = &flag_version, + .val = 0, + .descrip = "Display version number", + .argDescrip = NULL, + },{ + .longName = "user", + .shortName = 'U', + .argInfo = POPT_ARG_STRING, + .arg = &opt_user, + .val = 0, + .descrip = "Set the network username", + .argDescrip = "[DOMAIN/]USERNAME[%PASSWORD]", + },{ + .longName = "authentication-file", + .shortName = 'A', + .argInfo = POPT_ARG_STRING, + .arg = &opt_auth_file, + .val = 0, + .descrip = "Get the credentials from a file", + .argDescrip = "FILE", + },{ + .longName = "no-pass", + .shortName = 'N', + .argInfo = POPT_ARG_NONE, + .arg = &flag_nopass, + .val = 0, + .descrip = "Do not ask for a password", + .argDescrip = NULL + },{ + .longName = "kerberos", + .shortName = 'k', + .argInfo = POPT_ARG_STRING, + .arg = &opt_kerberos, + .val = 0, + .descrip = "Use Kerberos", + .argDescrip = "[yes|no]", + },{ + .longName = "debuglevel", + .shortName = 'd', + .argInfo = POPT_ARG_STRING, + .arg = &opt_debuglevel, + .val = 0, + .descrip = "Set debug level", + .argDescrip = "DEBUGLEVEL", + },{ + .longName = "uninstall", + .shortName = 0, + .argInfo = POPT_ARG_NONE, + .arg = &flag_uninstall, + .val = 0, + .descrip = "Uninstall winexe service after " + "remote execution", + .argDescrip = NULL, + },{ + .longName = "reinstall", + .shortName = 0, + .argInfo = POPT_ARG_NONE, + .arg = &flag_reinstall, + .val = 0, + .descrip = "Reinstall winexe service before " + "remote execution", + .argDescrip = NULL, + },{ + .longName = "runas", + .shortName = 0, + .argInfo = POPT_ARG_STRING, + .arg = &options->runas, + .val = 0, + .descrip = "Run as the given user (BEWARE: this " + "password is sent in cleartext over " + "the network!)", + .argDescrip = "[DOMAIN\\]USERNAME%PASSWORD", + },{ + .longName = "runas-file", + .shortName = 0, + .argInfo = POPT_ARG_STRING, + .arg = &options->runas_file, + .val = 0, + .descrip = "Run as user options defined in a file", + .argDescrip = "FILE", + },{ + .longName = "interactive", + .shortName = 0, + .argInfo = POPT_ARG_INT, + .arg = &flag_interactive, + .val = 0, + .descrip = "Desktop interaction: 0 - disallow, " + "1 - allow. If allow, also use the " + "--system switch (Windows requirement). " + "Vista does not support this option.", + .argDescrip = "0|1", + },{ + .longName = "ostype", + .shortName = 0, + .argInfo = POPT_ARG_INT, + .arg = &flag_ostype, + .val = 0, + .descrip = "OS type: 0 - 32-bit, 1 - 64-bit, " + "2 - winexe will decide. " + "Determines which version (32-bit or 64-bit)" + " of service will be installed.", + .argDescrip = "0|1|2", + }, POPT_TABLEEND }; diff --git a/source3/rpc_server/mdssvc/sparql_lexer.l b/source3/rpc_server/mdssvc/sparql_lexer.l index e60a3fb5de3..b6383504380 100644 --- a/source3/rpc_server/mdssvc/sparql_lexer.l +++ b/source3/rpc_server/mdssvc/sparql_lexer.l @@ -23,8 +23,6 @@ #include "rpc_server/mdssvc/sparql_parser.tab.h" #define YY_NO_INPUT -#define yyalloc SMB_MALLOC -#define yyrealloc SMB_REALLOC %} %option nounput noyyalloc noyyrealloc prefix="mdsyy" @@ -57,3 +55,13 @@ true {mdsyylval.bval = true; return BOOL;} {UANY}+ {mdsyylval.sval = talloc_strdup(talloc_tos(), mdsyytext); return WORD;} [ \t\n] /* ignore */ %% + +void *yyalloc(yy_size_t bytes) +{ + return SMB_MALLOC(bytes); +} + +void *yyrealloc(void *ptr, yy_size_t bytes) +{ + return SMB_REALLOC(ptr, bytes); +} -- Samba Shared Repository