From: Jule Anger Date: Thu, 24 Mar 2022 13:38:46 +0000 (+0100) Subject: smbstatus: add frame files for json specific methods X-Git-Tag: samba-4.17.0rc1~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f604e4d4cd9eae0cbbd9b60c7912a55ec97517c1;p=thirdparty%2Fsamba.git smbstatus: add frame files for json specific methods Signed-off-by: Jule Anger Reviewed-by: Ralph Boehme --- diff --git a/source3/utils/status.c b/source3/utils/status.c index 765e57ea71a..8381bc5c07f 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -49,6 +49,7 @@ #include "serverid.h" #include "status_profile.h" #include "status.h" +#include "status_json.h" #include "smbd/notifyd/notifyd_db.h" #include "cmdline_contexts.h" #include "locking/leases_db.h" diff --git a/source3/utils/status_json.c b/source3/utils/status_json.c new file mode 100644 index 00000000000..b2ade6bc69b --- /dev/null +++ b/source3/utils/status_json.c @@ -0,0 +1,28 @@ +/* + * Samba Unix/Linux SMB client library + * Json output + * Copyright (C) Jule Anger 2022 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "includes.h" +#include "smbprofile.h" +#include "status_json.h" +#include "../libcli/security/security.h" +#include "status.h" + +#include +#include "audit_logging.h" /* various JSON helpers */ +#include "auth/common_auth.h" diff --git a/source3/utils/status_json.h b/source3/utils/status_json.h new file mode 100644 index 00000000000..bb42acd16bd --- /dev/null +++ b/source3/utils/status_json.h @@ -0,0 +1,25 @@ +/* + * Samba Unix/Linux SMB client library + * Json output + * Copyright (C) Jule Anger 2022 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "status.h" + +#ifndef STATUS_JSON_H +#define STATUS_JSON_H + +#endif diff --git a/source3/utils/status_json_dummy.c b/source3/utils/status_json_dummy.c new file mode 100644 index 00000000000..0854eb70ef4 --- /dev/null +++ b/source3/utils/status_json_dummy.c @@ -0,0 +1,24 @@ +/* + * Samba Unix/Linux SMB client library + * Json output + * Copyright (C) Jule Anger 2022 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "includes.h" +#include "smbprofile.h" +#include "../libcli/security/security.h" +#include "librpc/gen_ndr/open_files.h" +#include "status_json.h" diff --git a/source3/utils/wscript_build b/source3/utils/wscript_build index a89a4db8b59..f5aa0af7eed 100644 --- a/source3/utils/wscript_build +++ b/source3/utils/wscript_build @@ -312,6 +312,11 @@ if bld.CONFIG_GET("WITH_PROFILE"): else: smbstatus_source += ' status_profile_dummy.c' +if bld.CONFIG_GET("HAVE_JANSSON"): + smbstatus_source += ' status_json.c' +else: + smbstatus_source += ' status_json_dummy.c' + bld.SAMBA3_BINARY('smbstatus', source=smbstatus_source, deps='''