Commit 2ec46c01 authored by kernc's avatar kernc

Replaced lkl and lklk scripts with llk and llkk setuid0 programs that run...

Replaced lkl and lklk scripts with llk and llkk setuid0 programs that run logkeys-start.sh and logkeys-kill.sh.

git-svn-id: https://logkeys.googlecode.com/svn/trunk@42 c501e62c-e7d1-11de-a198-37193048d1ed
parent 8359aa35
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
SUBDIRS = src man scripts SUBDIRS = src man scripts
EXTRA_DIST = src/keytables.cc build man/logkeys.8 scripts/lkl scripts/lklk EXTRA_DIST = src/keytables.cc build man/logkeys.8 scripts/llk scripts/kllk
\ No newline at end of file \ No newline at end of file
...@@ -191,7 +191,7 @@ top_builddir = @top_builddir@ ...@@ -191,7 +191,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
SUBDIRS = src man scripts SUBDIRS = src man scripts
EXTRA_DIST = src/keytables.cc build man/logkeys.8 scripts/lkl scripts/lklk EXTRA_DIST = src/keytables.cc build man/logkeys.8 scripts/llk scripts/kllk
all: config.h all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive $(MAKE) $(AM_MAKEFLAGS) all-recursive
......
...@@ -58,15 +58,18 @@ A copy of these instructions is in the accompanying INSTALL file. ...@@ -58,15 +58,18 @@ A copy of these instructions is in the accompanying INSTALL file.
=============================================================================== ===============================================================================
logkeys is simple. You can either invoke it directly, by typing full command logkeys is simple. You can either invoke it directly, by typing full command
line, or use the provided scripts. There are two scripts in this package: line, or use the provided scripts. There are two helper programs in this
package:
bin/lkl , which starts the logkeys daemon, and bin/llk , which is intended to start the logkeys daemon, and
bin/lklk , which kills it. bin/llkk , which is intended to kill it.
bin/llk runs etc/logkeys-start.sh, and bin/llkk rund etc/logkeys-kill.sh.
You can use these two scripts for starting and stopping the keylogger quickly You can use these two setuid root programs for starting and stopping the
and covertly. You can modify the scripts as you like. keylogger quickly and covertly. You can modify the .sh scripts as you like.
Note that logkeys is installed setuid, so the root password need not be As the programs are installed setuid, the root password need not be provided
provided at runtime. at runtime.
Default log file is /var/log/logkeys.log and is not readable by others. Default log file is /var/log/logkeys.log and is not readable by others.
...@@ -110,13 +113,13 @@ missing or incorrectly determined mappings. From then on, execute logkeys by ...@@ -110,13 +113,13 @@ missing or incorrectly determined mappings. From then on, execute logkeys by
$ logkeys --start --keymap my_lang.keymap $ logkeys --start --keymap my_lang.keymap
Again, see if it now works correctly (character keys appear correct when you Again, see if it now works correctly (character keys appear correct when you
are viewing the log file in editor), and opt to modify bin/lkl starter script. are viewing the log file in editor), and opt to modify bin/llk starter script.
logkeys acts as a daemon, and you stop the running logger process with logkeys acts as a daemon, and you stop the running logger process with
$ logkeys --kill $ logkeys --kill
(or bin/lklk provided script). (or bin/llkk provided script).
For more information about logkeys log file format, logkeys keymap format, and For more information about logkeys log file format, logkeys keymap format, and
command line arguments, read the application manual, command line arguments, read the application manual,
......
...@@ -22,8 +22,11 @@ and function keys, while also being fully aware of Shift and AltGr key modifiers ...@@ -22,8 +22,11 @@ and function keys, while also being fully aware of Shift and AltGr key modifiers
It tries to automatically determine the correct input device, and may in some cases It tries to automatically determine the correct input device, and may in some cases
also get the character keys mapping right. also get the character keys mapping right.
.PP .PP
It is installed setuid root and may be invoked by any user anytime, either directly Two helper \fBsetuid root\fR programs are shipped with logkeys. \fIllk\fR, which runs
or using the accompanying \fBlkl\fR and \fBlklk\fR scripts. \fIetc/logkeys-start.sh\fR script, and \fIllkk\fR, which runs \fIetc/logkeys-kill.sh\fR script.
Because llk and llkk are installed setuid root, you can edit the two .sh scripts
(mostly just logkeys-start.sh) to your preference, then issue logkeys via llk whenever
you have to run it covertly (e.g. when you don't want to su to root or type sudo password).
.SH OPTIONS .SH OPTIONS
Non-optional arguments are required for short options too. Non-optional arguments are required for short options too.
.TP .TP
...@@ -111,7 +114,7 @@ Using US keyboard layout, one example log file could look like: ...@@ -111,7 +114,7 @@ Using US keyboard layout, one example log file could look like:
.IP .IP
Logging started ... Logging started ...
.IP .IP
2009-12-11 09:58:17+0100 > lkl 2009-12-11 09:58:17+0100 > llk
.br .br
2009-12-11 09:58:20+0100 > sudo cp <RShift>~/foo.<Tab> /usr/bin 2009-12-11 09:58:20+0100 > sudo cp <RShift>~/foo.<Tab> /usr/bin
.br .br
...@@ -121,7 +124,7 @@ Logging started ... ...@@ -121,7 +124,7 @@ Logging started ...
.br .br
2009-12-11 09:58:44+0100 > c<#+53><BckSp><#+34><LCtrl>c 2009-12-11 09:58:44+0100 > c<#+53><BckSp><#+34><LCtrl>c
.br .br
2009-12-11 09:58:54+0100 > lklk 2009-12-11 09:58:54+0100 > llkk
.IP .IP
Logging stopped at 2009-12-11 09:58:54+0100 Logging stopped at 2009-12-11 09:58:54+0100
.PP .PP
...@@ -130,7 +133,7 @@ option, it would look like: ...@@ -130,7 +133,7 @@ option, it would look like:
.IP .IP
Logging started ... Logging started ...
.IP .IP
2009-12-11 09:58:17+0100 > lkl 2009-12-11 09:58:17+0100 > llk
.br .br
2009-12-11 09:58:20+0100 > sudo cp ~/foo. /usr/bin 2009-12-11 09:58:20+0100 > sudo cp ~/foo. /usr/bin
.br .br
...@@ -140,7 +143,7 @@ Logging started ... ...@@ -140,7 +143,7 @@ Logging started ...
.br .br
2009-12-11 09:58:44+0100 > c<#+53>c 2009-12-11 09:58:44+0100 > c<#+53>c
.br .br
2009-12-11 09:58:54+0100 > lklk 2009-12-11 09:58:54+0100 > llkk
.IP .IP
Logging stopped at 2009-12-11 09:58:54+0100 Logging stopped at 2009-12-11 09:58:54+0100
.PP .PP
...@@ -206,12 +209,18 @@ To start logging to default log file with a custom keymap: ...@@ -206,12 +209,18 @@ To start logging to default log file with a custom keymap:
.IP .IP
$ logkeys --start --keymap my_keymap $ logkeys --start --keymap my_keymap
.PP .PP
To use a custom event device (e.g. /dev/input/event4):
.IP
$ logkeys --start --device /dev/input/event4 # or just
.br
$ logkeys --start --device event4
.PP
To end running logkeys process: To end running logkeys process:
.IP .IP
$ logkeys --kill $ logkeys --kill
.PP .PP
After updated to one's liking, helper scripts \fI/usr/bin/lkl\fR (start) and After \fIetc/logkeys-start.sh\fR is updated to one's liking, helper programs \fIbin/llk\fR (start) and
\fI/usr/bin/lklk\fR (kill) can be used as well. \fIbin/llkk\fR (kill) can be used as well.
.SH BUGS .SH BUGS
logkeys relies on numeric output of \fIdumpkeys\fR(1), which \fIkeymaps\fR(5) logkeys relies on numeric output of \fIdumpkeys\fR(1), which \fIkeymaps\fR(5)
manual page specifically discourages as unportable. manual page specifically discourages as unportable.
......
bin_SCRIPTS = lkl lklk #myconfdir=$(prefix)/etc
\ No newline at end of file myconfdir=$(sysconfdir)
myconf_SCRIPTS = logkeys-start.sh logkeys-kill.sh
...@@ -63,8 +63,8 @@ am__nobase_list = $(am__nobase_strip_setup); \ ...@@ -63,8 +63,8 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(bindir)" am__installdirs = "$(DESTDIR)$(myconfdir)"
SCRIPTS = $(bin_SCRIPTS) SCRIPTS = $(myconf_SCRIPTS)
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
...@@ -158,7 +158,10 @@ target_alias = @target_alias@ ...@@ -158,7 +158,10 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
bin_SCRIPTS = lkl lklk
#myconfdir=$(prefix)/etc
myconfdir = $(sysconfdir)
myconf_SCRIPTS = logkeys-start.sh logkeys-kill.sh
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
...@@ -192,10 +195,10 @@ $(top_srcdir)/configure: $(am__configure_deps) ...@@ -192,10 +195,10 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
install-binSCRIPTS: $(bin_SCRIPTS) install-myconfSCRIPTS: $(myconf_SCRIPTS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" test -z "$(myconfdir)" || $(MKDIR_P) "$(DESTDIR)$(myconfdir)"
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @list='$(myconf_SCRIPTS)'; test -n "$(myconfdir)" || list=; \
for p in $$list; do \ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
...@@ -213,19 +216,19 @@ install-binSCRIPTS: $(bin_SCRIPTS) ...@@ -213,19 +216,19 @@ install-binSCRIPTS: $(bin_SCRIPTS)
while read type dir files; do \ while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \ test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(myconfdir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(myconfdir)$$dir" || exit $$?; \
} \ } \
; done ; done
uninstall-binSCRIPTS: uninstall-myconfSCRIPTS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ @list='$(myconf_SCRIPTS)'; test -n "$(myconfdir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \ files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \ sed -e 's,.*/,,;$(transform)'`; \
test -n "$$list" || exit 0; \ test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ echo " ( cd '$(DESTDIR)$(myconfdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files cd "$(DESTDIR)$(myconfdir)" && rm -f $$files
tags: TAGS tags: TAGS
TAGS: TAGS:
...@@ -267,7 +270,7 @@ check-am: all-am ...@@ -267,7 +270,7 @@ check-am: all-am
check: check-am check: check-am
all-am: Makefile $(SCRIPTS) all-am: Makefile $(SCRIPTS)
installdirs: installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \ for dir in "$(DESTDIR)$(myconfdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-am
...@@ -315,13 +318,13 @@ info: info-am ...@@ -315,13 +318,13 @@ info: info-am
info-am: info-am:
install-data-am: install-data-am: install-myconfSCRIPTS
install-dvi: install-dvi-am install-dvi: install-dvi-am
install-dvi-am: install-dvi-am:
install-exec-am: install-binSCRIPTS install-exec-am:
install-html: install-html-am install-html: install-html-am
...@@ -359,20 +362,20 @@ ps: ps-am ...@@ -359,20 +362,20 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-binSCRIPTS uninstall-am: uninstall-myconfSCRIPTS
.MAKE: install-am install-strip .MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \ .PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \ distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-binSCRIPTS install-data \ install install-am install-data install-data-am install-dvi \
install-data-am install-dvi install-dvi-am install-exec \ install-dvi-am install-exec install-exec-am install-html \
install-exec-am install-html install-html-am install-info \ install-html-am install-info install-info-am install-man \
install-info-am install-man install-pdf install-pdf-am \ install-myconfSCRIPTS install-pdf install-pdf-am install-ps \
install-ps install-ps-am install-strip installcheck \ install-ps-am install-strip installcheck installcheck-am \
installcheck-am installdirs maintainer-clean \ installdirs maintainer-clean maintainer-clean-generic \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
pdf-am ps ps-am uninstall uninstall-am uninstall-binSCRIPTS uninstall-am uninstall-myconfSCRIPTS
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
......
#!/bin/bash #!/bin/bash
logkeys --start logkeys --kill
\ No newline at end of file
#!/bin/bash #!/bin/bash
logkeys --kill logkeys --start
\ No newline at end of file
CXXFLAGS = -Wall -O3 CXXFLAGS = -Wall -O3 -DSYS_CONF_DIR=\"$(sysconfdir)\"
bin_PROGRAMS = logkeys bin_PROGRAMS = logkeys llk llkk
logkeys_SOURCES = logkeys.cc logkeys_SOURCES = logkeys.cc
llk_SOURCES = llk.cc
llkk_SOURCES = llkk.cc
install-exec-hook: install-exec-hook:
chown root $(bindir)/logkeys chown root\: $(bindir)/llk
chmod u+s $(bindir)/logkeys chmod u+s $(bindir)/llk
chown root\: $(bindir)/llkk
chmod u+s $(bindir)/llkk
\ No newline at end of file
...@@ -32,7 +32,7 @@ POST_INSTALL = : ...@@ -32,7 +32,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
bin_PROGRAMS = logkeys$(EXEEXT) bin_PROGRAMS = logkeys$(EXEEXT) llk$(EXEEXT) llkk$(EXEEXT)
subdir = src subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
...@@ -45,6 +45,12 @@ CONFIG_CLEAN_FILES = ...@@ -45,6 +45,12 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS) PROGRAMS = $(bin_PROGRAMS)
am_llk_OBJECTS = llk.$(OBJEXT)
llk_OBJECTS = $(am_llk_OBJECTS)
llk_LDADD = $(LDADD)
am_llkk_OBJECTS = llkk.$(OBJEXT)
llkk_OBJECTS = $(am_llkk_OBJECTS)
llkk_LDADD = $(LDADD)
am_logkeys_OBJECTS = logkeys.$(OBJEXT) am_logkeys_OBJECTS = logkeys.$(OBJEXT)
logkeys_OBJECTS = $(am_logkeys_OBJECTS) logkeys_OBJECTS = $(am_logkeys_OBJECTS)
logkeys_LDADD = $(LDADD) logkeys_LDADD = $(LDADD)
...@@ -57,8 +63,8 @@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ...@@ -57,8 +63,8 @@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
CXXLD = $(CXX) CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@ -o $@
SOURCES = $(logkeys_SOURCES) SOURCES = $(llk_SOURCES) $(llkk_SOURCES) $(logkeys_SOURCES)
DIST_SOURCES = $(logkeys_SOURCES) DIST_SOURCES = $(llk_SOURCES) $(llkk_SOURCES) $(logkeys_SOURCES)
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
...@@ -72,7 +78,7 @@ CPPFLAGS = @CPPFLAGS@ ...@@ -72,7 +78,7 @@ CPPFLAGS = @CPPFLAGS@
CXX = @CXX@ CXX = @CXX@
CXXCPP = @CXXCPP@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = -Wall -O3 CXXFLAGS = -Wall -O3 -DSYS_CONF_DIR=\"$(sysconfdir)\"
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
...@@ -153,6 +159,8 @@ top_build_prefix = @top_build_prefix@ ...@@ -153,6 +159,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
logkeys_SOURCES = logkeys.cc logkeys_SOURCES = logkeys.cc
llk_SOURCES = llk.cc
llkk_SOURCES = llkk.cc
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
...@@ -224,6 +232,12 @@ uninstall-binPROGRAMS: ...@@ -224,6 +232,12 @@ uninstall-binPROGRAMS:
clean-binPROGRAMS: clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
llk$(EXEEXT): $(llk_OBJECTS) $(llk_DEPENDENCIES)
@rm -f llk$(EXEEXT)
$(CXXLINK) $(llk_OBJECTS) $(llk_LDADD) $(LIBS)
llkk$(EXEEXT): $(llkk_OBJECTS) $(llkk_DEPENDENCIES)
@rm -f llkk$(EXEEXT)
$(CXXLINK) $(llkk_OBJECTS) $(llkk_LDADD) $(LIBS)
logkeys$(EXEEXT): $(logkeys_OBJECTS) $(logkeys_DEPENDENCIES) logkeys$(EXEEXT): $(logkeys_OBJECTS) $(logkeys_DEPENDENCIES)
@rm -f logkeys$(EXEEXT) @rm -f logkeys$(EXEEXT)
$(CXXLINK) $(logkeys_OBJECTS) $(logkeys_LDADD) $(LIBS) $(CXXLINK) $(logkeys_OBJECTS) $(logkeys_LDADD) $(LIBS)
...@@ -234,6 +248,8 @@ mostlyclean-compile: ...@@ -234,6 +248,8 @@ mostlyclean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llk.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llkk.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logkeys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logkeys.Po@am__quote@
.cc.o: .cc.o:
...@@ -451,8 +467,10 @@ uninstall-am: uninstall-binPROGRAMS ...@@ -451,8 +467,10 @@ uninstall-am: uninstall-binPROGRAMS
install-exec-hook: install-exec-hook:
chown root $(bindir)/logkeys chown root\: $(bindir)/llk
chmod u+s $(bindir)/logkeys chmod u+s $(bindir)/llk
chown root\: $(bindir)/llkk
chmod u+s $(bindir)/llkk
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
......
#include <cstdlib>
#include <unistd.h>
int main() {
setuid(0);
exit(system(SYS_CONF_DIR "/logkeys-start.sh")); // SYS_CONF_DIR defined in CXXFLAGS in Makefile.am
}
#include <cstdlib>
#include <unistd.h>
int main() {
setuid(0);
exit(system(SYS_CONF_DIR "/logkeys-kill.sh")); // SYS_CONF_DIR defined in CXXFLAGS in Makefile.am
}
...@@ -61,10 +61,10 @@ void usage() ...@@ -61,10 +61,10 @@ void usage()
"\n" "\n"
" -s, --start start logging keypresses\n" " -s, --start start logging keypresses\n"
" -m, --keymap=FILE use keymap FILE\n" " -m, --keymap=FILE use keymap FILE\n"
" -o, --output=FILE log output to FILE (" DEFAULT_LOG_FILE ")\n" " -o, --output=FILE log output to FILE [" DEFAULT_LOG_FILE "]\n"
" -u, --us-keymap use en_US keymap instead of configured default\n" " -u, --us-keymap use en_US keymap instead of configured default\n"
" -k, --kill kill running logkeys process\n" " -k, --kill kill running logkeys process\n"
" -d, --device=FILE input event device (eventX from " INPUT_EVENT_PATH ")\n" " -d, --device=FILE input event device [eventX from " INPUT_EVENT_PATH "]\n"
" -?, --help print this help screen\n" " -?, --help print this help screen\n"
" --export-keymap=FILE export configured keymap to FILE and exit\n" " --export-keymap=FILE export configured keymap to FILE and exit\n"
" --no-func-keys log only character keys\n" " --no-func-keys log only character keys\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment