diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | bin/Makefile | 10 | ||||
-rw-r--r-- | bin/worker.c (renamed from udev/ykfde.c) | 0 | ||||
-rwxr-xr-x | dracut/module-setup.sh | 2 | ||||
-rw-r--r-- | mkinitcpio/ykfde | 2 | ||||
-rw-r--r-- | systemd/ykfde-worker.service | 2 | ||||
-rw-r--r-- | udev/20-ykfde.rules | 2 | ||||
-rw-r--r-- | udev/Makefile | 18 |
9 files changed, 17 insertions, 33 deletions
@@ -1,6 +1,6 @@ config.h bin/ykfde bin/ykfde-cpio -udev/ykfde +bin/worker version.h *.html @@ -10,7 +10,10 @@ VERSION := 0.6.4 .DELETE_ON_ERROR: -all: bin/ykfde bin/ykfde-cpio udev/ykfde README.html README-mkinitcpio.html README-dracut.html +all: bin/worker bin/ykfde bin/ykfde-cpio README.html README-mkinitcpio.html README-dracut.html + +bin/worker: bin/worker.c config.h + $(MAKE) -C bin worker bin/ykfde: bin/ykfde.c config.h version.h $(MAKE) -C bin ykfde @@ -18,9 +21,6 @@ bin/ykfde: bin/ykfde.c config.h version.h bin/ykfde-cpio: bin/ykfde-cpio.c config.h version.h $(MAKE) -C bin ykfde-cpio -udev/ykfde: udev/ykfde.c config.h - $(MAKE) -C udev ykfde - config.h: config.def.h $(CP) config.def.h config.h @@ -35,9 +35,8 @@ version.h: $(wildcard .git/HEAD .git/index .git/refs/tags/*) Makefile install: install-mkinitcpio -install-bin: bin/ykfde udev/ykfde +install-bin: bin/worker bin/ykfde bin/ykfde-cpio $(MAKE) -C bin install - $(MAKE) -C udev install $(INSTALL) -D -m0644 conf/ykfde.conf $(DESTDIR)/etc/ykfde.conf $(INSTALL) -D -m0755 grub/09_linux $(DESTDIR)/etc/grub.d/09_linux $(INSTALL) -D -m0644 systemd/ykfde.service $(DESTDIR)/usr/lib/systemd/system/ykfde.service @@ -65,7 +64,6 @@ install-dracut: install-bin install-doc clean: $(MAKE) -C bin clean - $(MAKE) -C udev clean $(RM) -f README.html README-mkinitcpio.html README-dracut.html version.h distclean: clean diff --git a/bin/Makefile b/bin/Makefile index 8cfb3a5..a7c1efe 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -6,7 +6,10 @@ RM := rm CFLAGS += -std=gnu11 -O2 -fPIC -Wall -Werror LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie -all: ykfde ykfde-cpio +all: worker ykfde ykfde-cpio + +worker: worker.c ../config.h + $(CC) $(CFLAGS) -liniparser -lkeyutils -lykpers-1 -lyubikey $(LDFLAGS) -o worker worker.c ykfde: ykfde.c ../config.h ../version.h $(CC) $(CFLAGS) -lcryptsetup -liniparser -lkeyutils -lykpers-1 -lyubikey $(LDFLAGS) -o ykfde ykfde.c @@ -14,9 +17,10 @@ ykfde: ykfde.c ../config.h ../version.h ykfde-cpio: ykfde-cpio.c ../config.h ../version.h $(CC) $(CFLAGS) -larchive $(LDFLAGS) -o ykfde-cpio ykfde-cpio.c -install: ykfde ykfde-cpio +install: worker ykfde ykfde-cpio + $(INSTALL) -D -m0755 worker $(DESTDIR)/usr/lib/ykfde/worker $(INSTALL) -D -m0755 ykfde $(DESTDIR)/usr/bin/ykfde $(INSTALL) -D -m0755 ykfde-cpio $(DESTDIR)/usr/bin/ykfde-cpio clean: - $(RM) -f ykfde ykfde-cpio + $(RM) -f worker ykfde ykfde-cpio diff --git a/udev/ykfde.c b/bin/worker.c index ef0cefc..ef0cefc 100644 --- a/udev/ykfde.c +++ b/bin/worker.c diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh index 3cab1c8..a791d44 100755 --- a/dracut/module-setup.sh +++ b/dracut/module-setup.sh @@ -14,7 +14,7 @@ install() { inst_rules "$moddir/20-ykfde.rules" inst_hook cmdline 30 "$moddir/parse-mod.sh" inst_simple "$moddir/ykfde.sh" /sbin/ykfde.sh - inst_simple /usr/lib/udev/ykfde + inst_simple /usr/lib/ykfde/worker inst_simple /etc/ykfde.conf # this is required for second factor diff --git a/mkinitcpio/ykfde b/mkinitcpio/ykfde index d30e331..dc4b8c1 100644 --- a/mkinitcpio/ykfde +++ b/mkinitcpio/ykfde @@ -2,7 +2,7 @@ build() { # install basic files to initramfs - add_binary /usr/lib/udev/ykfde + add_binary /usr/lib/ykfde/worker add_file /usr/lib/initcpio/udev/20-ykfde.rules /usr/lib/udev/rules.d/20-ykfde.rules add_file /etc/ykfde.conf diff --git a/systemd/ykfde-worker.service b/systemd/ykfde-worker.service index 6f5a18f..0d12514 100644 --- a/systemd/ykfde-worker.service +++ b/systemd/ykfde-worker.service @@ -13,4 +13,4 @@ After=ykfde-2f.service [Service] Type=oneshot -ExecStart=/usr/lib/udev/ykfde +ExecStart=/usr/lib/ykfde/worker diff --git a/udev/20-ykfde.rules b/udev/20-ykfde.rules index 2bd67e2..6973819 100644 --- a/udev/20-ykfde.rules +++ b/udev/20-ykfde.rules @@ -25,4 +25,4 @@ ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ ATTRS{idVendor}=="1050", \ ATTRS{idProduct}=="0010|0110|0111|0114|0116|0401|0403|0405|0407|0410", \ - RUN+="/usr/lib/udev/ykfde" + RUN+="/usr/lib/ykfde/worker" diff --git a/udev/Makefile b/udev/Makefile deleted file mode 100644 index 3a63ec4..0000000 --- a/udev/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# commands -CC := gcc -INSTALL := install -RM := rm -# flags -CFLAGS += -std=c11 -O2 -fPIC -Wall -Werror -LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie - -all: ykfde - -ykfde: ykfde.c ../config.h - $(CC) $(CFLAGS) -liniparser -lkeyutils -lykpers-1 -lyubikey $(LDFLAGS) -o ykfde ykfde.c - -install: ykfde - $(INSTALL) -D -m0755 ykfde $(DESTDIR)/usr/lib/udev/ykfde - -clean: - $(RM) -f ykfde |