]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbstatus: add frame files for json specific methods
authorJule Anger <janger@samba.org>
Thu, 24 Mar 2022 13:38:46 +0000 (14:38 +0100)
committerJule Anger <janger@samba.org>
Mon, 8 Aug 2022 12:56:28 +0000 (12:56 +0000)
Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/utils/status.c
source3/utils/status_json.c [new file with mode: 0644]
source3/utils/status_json.h [new file with mode: 0644]
source3/utils/status_json_dummy.c [new file with mode: 0644]
source3/utils/wscript_build

index 765e57ea71a02320732460cc2e9f709c6b33001e..8381bc5c07f318d0eb1f8744e0da92aebc05434a 100644 (file)
@@ -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 (file)
index 0000000..b2ade6b
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+#include "smbprofile.h"
+#include "status_json.h"
+#include "../libcli/security/security.h"
+#include "status.h"
+
+#include <jansson.h>
+#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 (file)
index 0000000..bb42acd
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 (file)
index 0000000..0854eb7
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+#include "smbprofile.h"
+#include "../libcli/security/security.h"
+#include "librpc/gen_ndr/open_files.h"
+#include "status_json.h"
index a89a4db8b595d1bc4bf6f422d8314280139bf596..f5aa0af7eed9539d21f62d7808b2f1b3af7b0309 100644 (file)
@@ -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='''