mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
Merge remote-tracking branch 'origin/topic/robin/631-deprecation-v2'
During merge I split the test for bro_init/bro_done/bro_script_loaded event errors into individual tests since the other testing of the zeek versions of those events seemed fine to otherwise keep. * origin/topic/robin/631-deprecation-v2: Update NEWS for naming changes. Small cleanup and updating submodules. Remove test for legacy plugin. Remove legancy symlinks in aux/. Add warnings when loading scripts ending in ".bro", or using legacy environment variables. Fix missing rename. No longer symlink local.zeek to local.bro. Update notice user agent. Remove old_comm_usage_is_ok. Remove bro-config.h.in and bro-path-dev.in. Change Bro wrapper script to now abort when old executable names are still used. Remove APIs that were explicitly deprecated to be removed in 3.1.
This commit is contained in:
commit
70b45d1aba
57 changed files with 164 additions and 568 deletions
|
@ -467,7 +467,7 @@ void DNS_Mgr::InitPostScript()
|
|||
|
||||
const char* cache_dir = dir ? dir : ".";
|
||||
cache_name = new char[strlen(cache_dir) + 64];
|
||||
sprintf(cache_name, "%s/%s", cache_dir, ".bro-dns-cache");
|
||||
sprintf(cache_name, "%s/%s", cache_dir, ".zeek-dns-cache");
|
||||
LoadCache(fopen(cache_name, "r"));
|
||||
}
|
||||
|
||||
|
|
26
src/List.h
26
src/List.h
|
@ -154,12 +154,6 @@ public:
|
|||
return max_entries;
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: Use std::sort instead")
|
||||
void sort(list_cmp_func cmp_func)
|
||||
{
|
||||
qsort(entries, num_entries, sizeof(T), cmp_func);
|
||||
}
|
||||
|
||||
int MemoryAllocation() const
|
||||
{ return padded_sizeof(*this) + pad_size(max_entries * sizeof(T)); }
|
||||
|
||||
|
@ -174,7 +168,7 @@ public:
|
|||
++num_entries;
|
||||
entries[0] = a;
|
||||
}
|
||||
|
||||
|
||||
void push_back(const T& a)
|
||||
{
|
||||
if ( num_entries == max_entries )
|
||||
|
@ -182,19 +176,13 @@ public:
|
|||
|
||||
entries[num_entries++] = a;
|
||||
}
|
||||
|
||||
|
||||
void pop_front() { remove_nth(0); }
|
||||
void pop_back() { remove_nth(num_entries-1); }
|
||||
|
||||
T& front() { return entries[0]; }
|
||||
T& back() { return entries[num_entries-1]; }
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: Use push_front instead")
|
||||
void insert(const T& a) // add at head of list
|
||||
{
|
||||
push_front(a);
|
||||
}
|
||||
|
||||
// The append method is maintained for historical/compatibility reasons.
|
||||
// (It's commonly used in the event generation API)
|
||||
void append(const T& a) // add to end of list
|
||||
|
@ -229,16 +217,6 @@ public:
|
|||
return old_ent;
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: Use back()/pop_back() instead")
|
||||
T get() // return and remove ent at end of list
|
||||
{
|
||||
assert(num_entries > 0);
|
||||
return entries[--num_entries];
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: Use back() instead")
|
||||
T& last() { return back(); }
|
||||
|
||||
// Return 0 if ent is not in the list, ent otherwise.
|
||||
bool is_member(const T& a) const
|
||||
{
|
||||
|
|
29
src/Val.cc
29
src/Val.cc
|
@ -719,16 +719,6 @@ void IntervalVal::ValDescribe(ODesc* d) const
|
|||
}
|
||||
}
|
||||
|
||||
PortVal* PortManager::Get(uint32_t port_num) const
|
||||
{
|
||||
return val_mgr->GetPort(port_num);
|
||||
}
|
||||
|
||||
PortVal* PortManager::Get(uint32_t port_num, TransportProto port_type) const
|
||||
{
|
||||
return val_mgr->GetPort(port_num, port_type);
|
||||
}
|
||||
|
||||
uint32_t PortVal::Mask(uint32_t port_num, TransportProto port_type)
|
||||
{
|
||||
// Note, for ICMP one-way connections:
|
||||
|
@ -760,25 +750,8 @@ uint32_t PortVal::Mask(uint32_t port_num, TransportProto port_type)
|
|||
return port_num;
|
||||
}
|
||||
|
||||
PortVal::PortVal(uint32_t p, TransportProto port_type) : Val(TYPE_PORT)
|
||||
{
|
||||
auto port_num = PortVal::Mask(p, port_type);
|
||||
val.uint_val = static_cast<bro_uint_t>(port_num);
|
||||
}
|
||||
|
||||
PortVal::PortVal(uint32_t p, bool unused) : Val(TYPE_PORT)
|
||||
{
|
||||
val.uint_val = static_cast<bro_uint_t>(p);
|
||||
}
|
||||
|
||||
PortVal::PortVal(uint32_t p) : Val(TYPE_PORT)
|
||||
{
|
||||
if ( p >= 65536 * NUM_PORT_SPACES )
|
||||
{
|
||||
InternalWarning("bad port number");
|
||||
p = 0;
|
||||
}
|
||||
|
||||
val.uint_val = static_cast<bro_uint_t>(p);
|
||||
}
|
||||
|
||||
|
@ -3220,7 +3193,7 @@ ValManager::ValManager()
|
|||
auto port_type = (TransportProto)i;
|
||||
|
||||
for ( auto j = 0u; j < arr.size(); ++j )
|
||||
arr[j] = new PortVal(PortVal::Mask(j, port_type), true);
|
||||
arr[j] = new PortVal(PortVal::Mask(j, port_type));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
84
src/Val.h
84
src/Val.h
|
@ -85,56 +85,6 @@ typedef union {
|
|||
|
||||
class Val : public BroObj {
|
||||
public:
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||
Val(bool b, TypeTag t)
|
||||
{
|
||||
val.int_val = b;
|
||||
type = base_type(t);
|
||||
#ifdef DEBUG
|
||||
bound_id = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||
Val(int32_t i, TypeTag t)
|
||||
{
|
||||
val.int_val = bro_int_t(i);
|
||||
type = base_type(t);
|
||||
#ifdef DEBUG
|
||||
bound_id = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||
Val(uint32_t u, TypeTag t)
|
||||
{
|
||||
val.uint_val = bro_uint_t(u);
|
||||
type = base_type(t);
|
||||
#ifdef DEBUG
|
||||
bound_id = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||
Val(int64_t i, TypeTag t)
|
||||
{
|
||||
val.int_val = i;
|
||||
type = base_type(t);
|
||||
#ifdef DEBUG
|
||||
bound_id = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use val_mgr->GetBool, GetFalse/GetTrue, GetInt, or GetCount instead")
|
||||
Val(uint64_t u, TypeTag t)
|
||||
{
|
||||
val.uint_val = u;
|
||||
type = base_type(t);
|
||||
#ifdef DEBUG
|
||||
bound_id = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
Val(double d, TypeTag t)
|
||||
{
|
||||
val.double_val = d;
|
||||
|
@ -429,23 +379,6 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
class PortManager {
|
||||
public:
|
||||
// Port number given in host order.
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use val_mgr->GetPort() instead")
|
||||
PortVal* Get(uint32_t port_num, TransportProto port_type) const;
|
||||
|
||||
// Host-order port number already masked with port space protocol mask.
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use val_mgr->GetPort() instead")
|
||||
PortVal* Get(uint32_t port_num) const;
|
||||
|
||||
// Returns a masked port number
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use PortVal::Mask() instead")
|
||||
uint32_t Mask(uint32_t port_num, TransportProto port_type) const;
|
||||
};
|
||||
|
||||
extern PortManager* port_mgr;
|
||||
|
||||
// Holds pre-allocated Val objects for those where it's more optimal to
|
||||
// re-use existing ones rather than allocate anew.
|
||||
class ValManager {
|
||||
|
@ -521,14 +454,6 @@ protected:
|
|||
|
||||
class PortVal : public Val {
|
||||
public:
|
||||
// Port number given in host order.
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use val_mgr->GetPort() instead")
|
||||
PortVal(uint32_t p, TransportProto port_type);
|
||||
|
||||
// Host-order port number already masked with port space protocol mask.
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use val_mgr->GetPort() instead")
|
||||
explicit PortVal(uint32_t p);
|
||||
|
||||
Val* SizeVal() const override { return val_mgr->GetInt(val.uint_val); }
|
||||
|
||||
// Returns the port number in host order (not including the mask).
|
||||
|
@ -559,7 +484,7 @@ protected:
|
|||
friend class Val;
|
||||
friend class ValManager;
|
||||
PortVal() {}
|
||||
PortVal(uint32_t p, bool unused);
|
||||
PortVal(uint32_t p);
|
||||
|
||||
void ValDescribe(ODesc* d) const override;
|
||||
Val* DoClone(CloneState* state) override;
|
||||
|
@ -1007,13 +932,6 @@ protected:
|
|||
|
||||
class EnumVal : public Val {
|
||||
public:
|
||||
|
||||
ZEEK_DEPRECATED("Remove in v3.1: use t->GetVal(i) instead")
|
||||
EnumVal(int i, EnumType* t) : Val(t)
|
||||
{
|
||||
val.int_val = i;
|
||||
}
|
||||
|
||||
Val* SizeVal() const override { return val_mgr->GetInt(val.int_val); }
|
||||
|
||||
protected:
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
## Generated for RFB event
|
||||
##
|
||||
## c: The connection record for the underlying transport-layer session/flow.
|
||||
event rfb_event%(c: connection%) &deprecated="Remove in v3.1: This event never served a real purpose and will be removed. Please use the other rfb events instead.";
|
||||
|
||||
## Generated for RFB event authentication mechanism selection
|
||||
##
|
||||
## c: The connection record for the underlying transport-layer session/flow.
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
refine flow RFB_Flow += {
|
||||
function proc_rfb_message(msg: RFB_PDU): bool
|
||||
%{
|
||||
if ( rfb_event )
|
||||
BifEvent::generate_rfb_event(connection()->bro_analyzer(), connection()->bro_analyzer()->Conn());
|
||||
return true;
|
||||
%}
|
||||
|
||||
function proc_rfb_version(client: bool, major: bytestring, minor: bytestring) : bool
|
||||
%{
|
||||
if (client)
|
||||
|
@ -371,7 +364,3 @@ refine connection RFB_Conn += {
|
|||
return true;
|
||||
%}
|
||||
};
|
||||
|
||||
refine typeattr RFB_PDU += &let {
|
||||
proc: bool = $context.flow.proc_rfb_message(this);
|
||||
};
|
||||
|
|
|
@ -48,9 +48,6 @@
|
|||
##
|
||||
event zeek_init%(%);
|
||||
|
||||
## Deprecated synonym for :zeek:see:`zeek_init`.
|
||||
event bro_init%(%) &deprecated="Remove in v3.1: use zeek_init";
|
||||
|
||||
## Generated at Zeek termination time. The event engine generates this event when
|
||||
## Zeek is about to terminate, either due to having exhausted reading its input
|
||||
## trace file(s), receiving a termination signal, or because Zeek was run without
|
||||
|
@ -64,9 +61,6 @@ event bro_init%(%) &deprecated="Remove in v3.1: use zeek_init";
|
|||
## is not generated.
|
||||
event zeek_done%(%);
|
||||
|
||||
## Deprecated synonym for :zeek:see:`zeek_done`.
|
||||
event bro_done%(%) &deprecated="Remove in v3.1: use zeek_done";
|
||||
|
||||
## Generated for every new connection. This event is raised with the first
|
||||
## packet of a previously unknown connection. Zeek uses a flow-based definition
|
||||
## of "connection" here that includes not only TCP sessions but also UDP and
|
||||
|
@ -666,9 +660,6 @@ event reporter_error%(t: time, msg: string, location: string%) &error_handler;
|
|||
## recursively for each ``@load``.
|
||||
event zeek_script_loaded%(path: string, level: count%);
|
||||
|
||||
## Deprecated synonym for :zeek:see:`zeek_script_loaded`.
|
||||
event bro_script_loaded%(path: string, level: count%) &deprecated="Remove in v3.1: use zeek_script_loaded";
|
||||
|
||||
## Generated each time Zeek's script interpreter opens a file. This event is
|
||||
## triggered only for files opened via :zeek:id:`open`, and in particular not for
|
||||
## normal log files as created by log writers.
|
||||
|
|
|
@ -83,7 +83,6 @@ int perftools_profile = 0;
|
|||
DNS_Mgr* dns_mgr;
|
||||
TimerMgr* timer_mgr;
|
||||
ValManager* val_mgr = 0;
|
||||
PortManager* port_mgr = 0;
|
||||
logging::Manager* log_mgr = 0;
|
||||
threading::Manager* thread_mgr = 0;
|
||||
input::Manager* input_mgr = 0;
|
||||
|
@ -304,7 +303,6 @@ void terminate_bro()
|
|||
delete reporter;
|
||||
delete plugin_mgr;
|
||||
delete val_mgr;
|
||||
delete port_mgr;
|
||||
|
||||
reporter = 0;
|
||||
}
|
||||
|
@ -489,7 +487,6 @@ int main(int argc, char** argv)
|
|||
bro_start_time = current_time(true);
|
||||
|
||||
val_mgr = new ValManager();
|
||||
port_mgr = new PortManager();
|
||||
reporter = new Reporter();
|
||||
thread_mgr = new threading::Manager();
|
||||
plugin_mgr = new plugin::Manager();
|
||||
|
|
14
src/parse.y
14
src/parse.y
|
@ -1164,14 +1164,12 @@ func_hdr:
|
|||
}
|
||||
| TOK_EVENT event_id func_params opt_attr
|
||||
{
|
||||
// Gracefully handle the deprecation of bro_init, bro_done,
|
||||
// and bro_script_loaded
|
||||
if ( streq("bro_init", $2->Name()) )
|
||||
$2 = global_scope()->Lookup("zeek_init");
|
||||
else if ( streq("bro_done", $2->Name()) )
|
||||
$2 = global_scope()->Lookup("zeek_done");
|
||||
else if ( streq("bro_script_loaded", $2->Name()) )
|
||||
$2 = global_scope()->Lookup("zeek_script_loaded");
|
||||
const char* name = $2->Name();
|
||||
if ( streq("bro_init", name) || streq("bro_done", name) || streq("bro_script_loaded", name) )
|
||||
{
|
||||
auto base = std::string(name).substr(4);
|
||||
reporter->Error(fmt("event %s() is no longer available, use zeek_%s() instead", name, base.c_str()));
|
||||
}
|
||||
|
||||
begin_func($2, current_module.c_str(),
|
||||
FUNC_FLAVOR_EVENT, 0, $3, $4);
|
||||
|
|
|
@ -189,6 +189,7 @@ bool Manager::ActivateDynamicPluginInternal(const std::string& name, bool ok_if_
|
|||
if ( is_file(init) )
|
||||
{
|
||||
DBG_LOG(DBG_PLUGINS, " Loading %s", init.c_str());
|
||||
warn_if_legacy_script(init);
|
||||
scripts_to_load.push_back(init);
|
||||
break;
|
||||
}
|
||||
|
@ -202,6 +203,7 @@ bool Manager::ActivateDynamicPluginInternal(const std::string& name, bool ok_if_
|
|||
if ( is_file(init) )
|
||||
{
|
||||
DBG_LOG(DBG_PLUGINS, " Loading %s", init.c_str());
|
||||
warn_if_legacy_script(init);
|
||||
scripts_to_load.push_back(init);
|
||||
break;
|
||||
}
|
||||
|
@ -214,6 +216,7 @@ bool Manager::ActivateDynamicPluginInternal(const std::string& name, bool ok_if_
|
|||
if ( is_file(init) )
|
||||
{
|
||||
DBG_LOG(DBG_PLUGINS, " Loading %s", init.c_str());
|
||||
warn_if_legacy_script(init);
|
||||
scripts_to_load.push_back(init);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -935,47 +935,6 @@ function safe_shell_quote%(source: string%): string
|
|||
return new StringVal(new BroString(1, dst, j));
|
||||
%}
|
||||
|
||||
## Takes a string and escapes characters that would allow execution of
|
||||
## commands at the shell level. Must be used before including strings in
|
||||
## :zeek:id:`system` or similar calls. This function is deprecated, use
|
||||
## :zeek:see:`safe_shell_quote` as a replacement. The difference is that
|
||||
## :zeek:see:`safe_shell_quote` automatically returns a value that is
|
||||
## wrapped in double-quotes, which is required to correctly and fully
|
||||
## escape any characters that might be interpreted by the shell.
|
||||
##
|
||||
## source: The string to escape.
|
||||
##
|
||||
## Returns: A shell-escaped version of *source*.
|
||||
##
|
||||
## .. zeek:see:: system safe_shell_quote
|
||||
function str_shell_escape%(source: string%): string &deprecated="Remove in v3.1: use safe_shell_quote"
|
||||
%{
|
||||
unsigned j = 0;
|
||||
const u_char* src = source->Bytes();
|
||||
unsigned n = source->Len();
|
||||
byte_vec dst = new u_char[n * 2 + 1];
|
||||
|
||||
for ( unsigned i = 0; i < n; ++i )
|
||||
{
|
||||
switch ( src[i] ) {
|
||||
case '`': case '"': case '\\': case '$':
|
||||
|
||||
// case '|': case '&': case ';': case '(': case ')': case '<':
|
||||
// case '>': case '\'': case '*': case '?': case '[': case ']':
|
||||
// case '!': case '#': case '{': case '}':
|
||||
dst[j++] = '\\';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
dst[j++] = src[i];
|
||||
}
|
||||
|
||||
dst[j] = '\0';
|
||||
return new StringVal(new BroString(1, dst, j));
|
||||
%}
|
||||
|
||||
## Finds all occurrences of a pattern in a string.
|
||||
##
|
||||
## str: The string to inspect.
|
||||
|
|
70
src/util.cc
70
src/util.cc
|
@ -62,6 +62,36 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
static bool starts_with(const std::string_view& s, const std::string& beginning)
|
||||
{
|
||||
if ( beginning.size() > s.size() )
|
||||
return false;
|
||||
|
||||
return std::equal(beginning.begin(), beginning.end(), s.begin());
|
||||
}
|
||||
|
||||
TEST_CASE("util starts_with")
|
||||
{
|
||||
CHECK(starts_with("abcde", "ab") == true);
|
||||
CHECK(starts_with("abcde", "de") == false);
|
||||
CHECK(starts_with("abcde", "abcedf") == false);
|
||||
}
|
||||
|
||||
static bool ends_with(const std::string_view& s, const std::string& ending)
|
||||
{
|
||||
if ( ending.size() > s.size() )
|
||||
return false;
|
||||
|
||||
return std::equal(ending.rbegin(), ending.rend(), s.rbegin());
|
||||
}
|
||||
|
||||
TEST_CASE("util ends_with")
|
||||
{
|
||||
CHECK(ends_with("abcde", "de") == true);
|
||||
CHECK(ends_with("abcde", "fg") == false);
|
||||
CHECK(ends_with("abcde", "abcedf") == false);
|
||||
}
|
||||
|
||||
TEST_CASE("util extract_ip")
|
||||
{
|
||||
CHECK(extract_ip("[1.2.3.4]") == "1.2.3.4");
|
||||
|
@ -1249,6 +1279,15 @@ TEST_CASE("util is_package_loader")
|
|||
|
||||
const array<string, 2> script_extensions = {".zeek", ".bro"};
|
||||
|
||||
void warn_if_legacy_script(const std::string_view& filename)
|
||||
{
|
||||
if ( ends_with(filename, ".bro") )
|
||||
{
|
||||
std::string x(filename);
|
||||
reporter->Warning("Loading script '%s' with legacy extension, support for '.bro' will be removed in Zeek v4.1", x.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
bool is_package_loader(const string& path)
|
||||
{
|
||||
string filename(std::move(SafeBasename(path).result));
|
||||
|
@ -1256,7 +1295,10 @@ bool is_package_loader(const string& path)
|
|||
for ( const string& ext : script_extensions )
|
||||
{
|
||||
if ( filename == "__load__" + ext )
|
||||
{
|
||||
warn_if_legacy_script(filename);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -1294,6 +1336,7 @@ FILE* open_package(string& path, const string& mode)
|
|||
string p = path + ext;
|
||||
if ( can_read(p) )
|
||||
{
|
||||
warn_if_legacy_script(path);
|
||||
path.append(ext);
|
||||
return open_file(path, mode);
|
||||
}
|
||||
|
@ -1648,21 +1691,6 @@ string find_file(const string& filename, const string& path_set,
|
|||
return string();
|
||||
}
|
||||
|
||||
static bool ends_with(const std::string& s, const std::string& ending)
|
||||
{
|
||||
if ( ending.size() > s.size() )
|
||||
return false;
|
||||
|
||||
return std::equal(ending.rbegin(), ending.rend(), s.rbegin());
|
||||
}
|
||||
|
||||
TEST_CASE("util ends_with")
|
||||
{
|
||||
CHECK(ends_with("abcde", "de") == true);
|
||||
CHECK(ends_with("abcde", "fg") == false);
|
||||
CHECK(ends_with("abcde", "abcedf") == false);
|
||||
}
|
||||
|
||||
string find_script_file(const string& filename, const string& path_set)
|
||||
{
|
||||
vector<string> paths;
|
||||
|
@ -1675,11 +1703,16 @@ string find_script_file(const string& filename, const string& path_set)
|
|||
string f = find_file_in_path(filename, paths[n], ext);
|
||||
|
||||
if ( ! f.empty() )
|
||||
{
|
||||
warn_if_legacy_script(f);
|
||||
return f;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ends_with(filename, ".bro") )
|
||||
{
|
||||
warn_if_legacy_script(filename);
|
||||
|
||||
// We were looking for a file explicitly ending in .bro and didn't
|
||||
// find it, so fall back to one ending in .zeek, if it exists.
|
||||
auto fallback = string(filename.data(), filename.size() - 4) + ".zeek";
|
||||
|
@ -2237,7 +2270,12 @@ char* zeekenv(const char* name)
|
|||
if ( it == legacy_vars.end() )
|
||||
return rval;
|
||||
|
||||
return getenv(it->second);
|
||||
auto val = getenv(it->second);
|
||||
|
||||
if ( val && starts_with(it->second, "BRO_") )
|
||||
reporter->Warning("Using legacy environment variable %s, support will be removed in Zeek v4.1; use %s instead", it->second, name);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static string json_escape_byte(char c)
|
||||
|
|
|
@ -274,6 +274,9 @@ extern std::string bro_prefixes();
|
|||
|
||||
extern const std::array<std::string, 2> script_extensions;
|
||||
|
||||
/** Prints a warning if the filename ends in .bro. */
|
||||
void warn_if_legacy_script(const std::string_view& filename);
|
||||
|
||||
bool is_package_loader(const std::string& path);
|
||||
|
||||
extern void add_to_bro_path(const std::string& dir);
|
||||
|
|
20
src/zeek.bif
20
src/zeek.bif
|
@ -1820,15 +1820,6 @@ function getpid%(%) : count
|
|||
extern const char* zeek_version();
|
||||
%%}
|
||||
|
||||
## Returns the Zeek version string. This function is deprecated, use
|
||||
## :zeek:see:`zeek_version` instead.
|
||||
##
|
||||
## Returns: Zeek's version, e.g., 2.0-beta-47-debug.
|
||||
function bro_version%(%): string &deprecated="Remove in v3.1: use zeek_version"
|
||||
%{
|
||||
return new StringVal(zeek_version());
|
||||
%}
|
||||
|
||||
## Returns the Zeek version string.
|
||||
##
|
||||
## Returns: Zeek's version, e.g., 2.0-beta-47-debug.
|
||||
|
@ -2130,17 +2121,6 @@ function dump_rule_stats%(f: file%): bool
|
|||
return val_mgr->GetBool(1);
|
||||
%}
|
||||
|
||||
## Checks if Zeek is terminating. This function is deprecated, use
|
||||
## :zeek:see:`zeek_is_terminating` instead.
|
||||
##
|
||||
## Returns: True if Zeek is in the process of shutting down.
|
||||
##
|
||||
## .. zeek:see:: terminate
|
||||
function bro_is_terminating%(%): bool &deprecated="Remove in v3.1: use zeek_is_terminating"
|
||||
%{
|
||||
return val_mgr->GetBool(terminating);
|
||||
%}
|
||||
|
||||
## Checks if Zeek is terminating.
|
||||
##
|
||||
## Returns: True if Zeek is in the process of shutting down.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue