hostname-util: add new helper split_user_at_host()

Let's introduce a common helper for splitting user@host specifications
like we use them for --machine=.
This commit is contained in:
Lennart Poettering
2025-06-05 12:44:08 +02:00
parent 770489c1e0
commit 4295c0db5f
3 changed files with 62 additions and 0 deletions
+2
View File
@@ -38,3 +38,5 @@ static inline bool is_dns_proxy_stub_hostname(const char *hostname) {
}
int get_pretty_hostname(char **ret);
int split_user_at_host(const char *s, char **ret_user, char **ret_host);