util-lib: add new ifname_valid() call that validates interface names

Make use of this in nspawn at a couple of places. A later commit should port
more code over to this, including networkd.
This commit is contained in:
Lennart Poettering
2016-05-09 15:45:31 +02:00
parent 5e7423ff25
commit ef76dff225
5 changed files with 93 additions and 2 deletions
+2
View File
@@ -123,6 +123,8 @@ int fd_inc_rcvbuf(int fd, size_t n);
int ip_tos_to_string_alloc(int i, char **s);
int ip_tos_from_string(const char *s);
bool ifname_valid(const char *p);
int getpeercred(int fd, struct ucred *ucred);
int getpeersec(int fd, char **ret);