Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cf-net/cf-net.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static const char *const HINTS[] =
"Enable basic information output",
"Minimum TLS version to use",
"TLS ciphers to use (comma-separated list)",
"Specify CFEngine protocol to use. Possible values: 'classic', 'tls', 'cookie', 'filestream', 'leech2', 'latest' (default)",
"Specify CFEngine protocol to use. Possible values: 'classic', 'tls', 'cookie', 'filestream', 'leech2', 'transfusion', 'latest' (default)",
"Print rsync performance statistics to stderr",
NULL
};
Expand Down
4 changes: 4 additions & 0 deletions libcfnet/protocol_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ ProtocolVersion ParseProtocolVersionPolicy(const char *const s)
{
return CF_PROTOCOL_LEECH2;
}
else if (StringEqual(s, "6") || StringEqual(s, "transfusion"))
{
return CF_PROTOCOL_TRANSFUSION;
}
else if (StringEqual(s, "latest"))
{
return CF_PROTOCOL_LATEST;
Expand Down
10 changes: 9 additions & 1 deletion libcfnet/protocol_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ typedef enum
CF_PROTOCOL_COOKIE = 3,
CF_PROTOCOL_FILESTREAM = 4,
CF_PROTOCOL_LEECH2 = 5,
CF_PROTOCOL_TRANSFUSION = 6,
} ProtocolVersion;

/* We use CF_PROTOCOL_LATEST as the default for new connections. */
#define CF_PROTOCOL_LATEST CF_PROTOCOL_LEECH2
#define CF_PROTOCOL_LATEST CF_PROTOCOL_TRANSFUSION

static inline const char *ProtocolVersionString(const ProtocolVersion p)
{
Expand All @@ -60,6 +61,8 @@ static inline const char *ProtocolVersionString(const ProtocolVersion p)
return "filestream";
case CF_PROTOCOL_LEECH2:
return "leech2";
case CF_PROTOCOL_TRANSFUSION:
return "transfusion";
default:
return "undefined";
}
Expand Down Expand Up @@ -100,6 +103,11 @@ static inline bool ProtocolSupportsLeech2(const ProtocolVersion p)
return (p >= CF_PROTOCOL_LEECH2);
}

static inline bool ProtocolSupportsTransfusion(const ProtocolVersion p)
{
return (p >= CF_PROTOCOL_TRANSFUSION);
}

static inline bool ProtocolTerminateCSV(const ProtocolVersion p)
{
return (p < CF_PROTOCOL_COOKIE);
Expand Down
2 changes: 1 addition & 1 deletion libpromises/mod_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ const ConstraintSyntax CFG_CONTROLBODY[COMMON_CONTROL_MAX + 1] =
ConstraintSyntaxNewBool("fips_mode", "Activate full FIPS mode restrictions. Default value: false", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewReal("bwlimit", CF_VALRANGE, "Limit outgoing protocol bandwidth in Bytes per second", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewBool("cache_system_functions", "Cache the result of system functions. Default value: true", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewOption("protocol_version", "1,classic,2,tls,3,cookie,4,filestream,5,leech2,latest", "CFEngine protocol version to use when connecting to the server. Default: \"latest\"", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewOption("protocol_version", "1,classic,2,tls,3,cookie,4,filestream,5,leech2,6,transfusion,latest", "CFEngine protocol version to use when connecting to the server. Default: \"latest\"", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewString("tls_ciphers", "", "List of acceptable ciphers in outgoing TLS connections, defaults to OpenSSL's default. For syntax help see man page for \"openssl ciphers\"", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewString("tls_min_version", "", "Minimum acceptable TLS version for outgoing connections, defaults to OpenSSL's default", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewStringList("package_inventory", ".*", "Name of the package manager used for software inventory management", SYNTAX_STATUS_NORMAL),
Expand Down
2 changes: 1 addition & 1 deletion libpromises/mod_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ static const ConstraintSyntax copy_from_constraints[] =
ConstraintSyntaxNewBool("trustkey", "true/false trust public keys from remote server if previously unknown. Default value: false", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewBool("type_check", "true/false compare file types before copying and require match", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewBool("verify", "true/false verify transferred file by hashing after copy (resource penalty). Default value: false", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewOption("protocol_version", "1,classic,2,tls,3,cookie,4,filestream,5,leech2,latest", "CFEngine protocol version to use when connecting to the server. Default: undefined", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewOption("protocol_version", "1,classic,2,tls,3,cookie,4,filestream,5,leech2,6,transfusion,latest", "CFEngine protocol version to use when connecting to the server. Default: undefined", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewBool("missing_ok", "true/false Do not treat missing file as an error. Default value: false", SYNTAX_STATUS_NORMAL),
ConstraintSyntaxNewNull()
};
Expand Down
Loading