aboutsummaryrefslogtreecommitdiffstats
path: root/udev
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-12-29 19:33:09 +0100
committerGravatar Christian Hesse <mail@eworm.de>2014-12-29 19:33:09 +0100
commit310b7a57bc03db660874eed67b049a910de369fd (patch)
tree39db1054602e0808b85f1336f1e4a377fa8e20f9 /udev
parentf567df1043b845749f9db83cbca43c46ff80fe61 (diff)
downloadmkinitcpio-ykfde-310b7a57bc03db660874eed67b049a910de369fd.tar.gz
mkinitcpio-ykfde-310b7a57bc03db660874eed67b049a910de369fd.tar.zst
introduce config.h
We now have configuration in just one place.
Diffstat (limited to 'udev')
-rw-r--r--udev/Makefile2
-rw-r--r--udev/ykfde.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/udev/Makefile b/udev/Makefile
index b8ddc84..7821b8e 100644
--- a/udev/Makefile
+++ b/udev/Makefile
@@ -7,7 +7,7 @@ CFLAGS += -std=c11 -O2 -fpic -pie -Wall -Werror
all: ykfde
-ykfde: ykfde.c
+ykfde: ykfde.c ../config.h
$(CC) $(CFLAGS) -lykpers-1 -lyubikey -liniparser $(LDFLAGS) -o ykfde ykfde.c
install: ykfde
diff --git a/udev/ykfde.c b/udev/ykfde.c
index 2adedbb..c96d84e 100644
--- a/udev/ykfde.c
+++ b/udev/ykfde.c
@@ -34,6 +34,8 @@
#include <iniparser.h>
+#include "../config.h"
+
#define EVENT_SIZE (sizeof (struct inotify_event))
#define EVENT_BUF_LEN (1024 * (EVENT_SIZE + 16))
@@ -44,11 +46,6 @@
#define ASK_PATH "/run/systemd/ask-password/"
#define ASK_MESSAGE "Please enter passphrase for disk"
-#define CONFIGFILE "/etc/ykfde.conf"
-#define CHALLENGEDIR "/etc/ykfde.d/"
-
-#define CONFYKSLOT "yk slot"
-
static int send_on_socket(int fd, const char *socket_name, const void *packet, size_t size) {
union {
struct sockaddr sa;