@@ -56,6 +56,19 @@ lazy_static! {
5656}
5757
5858// must be called prior to ddog_sidecar_connect
59+ //
60+ // shared_lib_path, socket_file_path and lock_file_path are accepted but currently
61+ // unused: libdatadog 7d138079e ("feat(sidecar)!: support appsec helper-rust
62+ // integration with sidecar") dropped the matching fields from
63+ // datadog_sidecar::config::AppSecConfig. The sidecar no longer loads the helper
64+ // shared library into the daemon nor calls appsec_helper_main(); a helper is now
65+ // expected to register an AppSecBackendFactory
66+ // (datadog_sidecar::appsec::register_backend_factory) in the daemon process, and
67+ // messages are relayed over the sidecar transport with
68+ // ddog_sidecar_send_appsec_message(). Until that wiring exists on our side
69+ // (DataDog/dd-trace-php#3725) the sidecar does not start the appsec helper at all.
70+ // The parameters are kept so that the ABI consumed by ddappsec
71+ // (dd_appsec_maybe_enable_helper) stays unchanged.
5972#[ no_mangle]
6073pub extern "C" fn ddog_sidecar_enable_appsec (
6174 shared_lib_path : CharSlice ,
@@ -64,32 +77,24 @@ pub extern "C" fn ddog_sidecar_enable_appsec(
6477 log_file_path : CharSlice ,
6578 log_level : CharSlice ,
6679) -> ( ) {
80+ _ = shared_lib_path;
81+ _ = socket_file_path;
82+ _ = lock_file_path;
83+
6784 let mut appsec_config_guard = APPSEC_CONFIG . lock ( ) . unwrap ( ) ;
68- let shared_lib_path_os: std:: ffi:: OsString ;
69- let socket_file_path_os: std:: ffi:: OsString ;
70- let lock_file_path_os: std:: ffi:: OsString ;
7185 let log_file_path_os: std:: ffi:: OsString ;
7286
7387 #[ cfg( unix) ]
7488 {
75- shared_lib_path_os = OsStr :: from_bytes ( shared_lib_path. as_bytes ( ) ) . to_owned ( ) ;
76- socket_file_path_os = OsStr :: from_bytes ( socket_file_path. as_bytes ( ) ) . to_owned ( ) ;
77- lock_file_path_os = OsStr :: from_bytes ( lock_file_path. as_bytes ( ) ) . to_owned ( ) ;
7889 log_file_path_os = OsStr :: from_bytes ( log_file_path. as_bytes ( ) ) . to_owned ( ) ;
7990 }
8091
8192 #[ cfg( windows) ]
8293 {
83- shared_lib_path_os = OsStr :: new ( & * shared_lib_path. to_utf8_lossy ( ) ) . to_owned ( ) ;
84- socket_file_path_os = OsStr :: new ( & * socket_file_path. to_utf8_lossy ( ) ) . to_owned ( ) ;
85- lock_file_path_os = OsStr :: new ( & * lock_file_path. to_utf8_lossy ( ) ) . to_owned ( ) ;
8694 log_file_path_os = OsStr :: new ( & * log_file_path. to_utf8_lossy ( ) ) . to_owned ( ) ;
8795 }
8896
8997 appsec_config_guard. deref_mut ( ) . replace ( AppSecConfig {
90- shared_lib_path : shared_lib_path_os,
91- socket_file_path : socket_file_path_os,
92- lock_file_path : lock_file_path_os,
9398 log_file_path : log_file_path_os,
9499 log_level : log_level. to_utf8_lossy ( ) . to_string ( ) ,
95100 } ) ;
0 commit comments