From 52973a3b876dfa4c72dd6ef1ac474f13f4c882de Mon Sep 17 00:00:00 2001 From: Eleni Maria Stea Date: Wed, 28 Oct 2020 11:52:31 +0200 Subject: [PATCH] Don't touch my screen! --- Makefile | 40 ++++++++++++ README.md | 11 ++++ data/dtms.mp3 | Bin 0 -> 26119 bytes src/main.c | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 244 insertions(+) create mode 100644 Makefile create mode 100644 README.md create mode 100644 data/dtms.mp3 create mode 100644 src/main.c diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..279de6f --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +# change the following line to install to a different prefix +PREFIX = /usr/local + +src = $(wildcard src/*.c) +obj = $(src:.c=.o) +dep = $(obj:.o=.d) +bin = dtms + +dbg = -g +opt = -O0 + +CFLAGS = -pedantic -Wall -std=gnu99 -DPREFIX=\"$(PREFIX)\" $(dbg) + +$(bin): $(obj) + $(CC) -o $@ $(obj) $(LDFLAGS) + +-include $(dep) + +%.d: %.c + @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ + +.PHONY: clean +clean: + rm -f $(obj) $(bin) $(dep) + +.PHONY: install +install: $(bin) + mkdir -p $(PREFIX)/bin $(PREFIX)/share/dtms + cp $(bin) $(PREFIX)/bin/$(bin) + chown root $(PREFIX)/bin/$(bin) + chmod +s $(PREFIX)/bin/$(bin) + cp data/dtms.mp3 $(PREFIX)/share/dtms/dtms.mp3 + +.PHONY: uninstall +uninstall: + rm -f $(PREFIX)/bin/$(bin) + rm -f $(PREFIX)/share/dtms/dtms.mp3 + rmdir $(PREFIX)/share/dtms + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..d8e9ce6 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +------------- +Options: +------------- +-h, for help +-d, path to the device file +-p, path to the mp3 player +-u. username of the user that runs the program +-------------- +Example usage: +-------------- +./dtms -d /dev/usb/hiddev0 -u eleni -p /usr/bin/mpv diff --git a/data/dtms.mp3 b/data/dtms.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..2450789454767b6e687ee3d514e64732f71a54bf GIT binary patch literal 26119 zcmdSAWl&oU7p|S)?(XjHQXn`%3c=moic_q(ySsaFij)>w+}*7dr$vfOi{yjnwD0%t z{6BkU!(_q?J6G;?FWGB@Wq9ELAOHZs{(PbVso;S=(vC=)y1Kg0uL++|jW^aF-ezuA z0A({TYkmO^J}wS!E^g?3n&tDG|JOs;&e`Vq4=|rkWdOix8i0t3frEojL`q6QO;69n z%E7_SFDxtul9rcORDnRW^b8G6Ev&8Wom^bpy?lKGg2N&sV-u2-(=u~&3yRCiD&N=D zHGXJo`_$Fl*EcjeF)=f@xVW;hwY7Wj^XJL=)z#f2^!b0ODNCxz@^T0ZyTNt*yFPv@ zI@qLm0C4l=I;P^`CI7wg|LSk({roe3;5Yzs0stUALq0140Ldl&1UqV9K9WS=^AA%R zu#V*xJwY+RtXDd`=Qi|bPj@#J5?RlgKN%bl&<{dFpclss-MkY*g2A|BpoE@5p%0XZ z-dHjGsVXEV!n`Zk~2a`%|lT6Ls=HQqJlB{}QvROlRU_rQm zUU#@jQO;TMj5?*^xSr8!DLs2F`{TFSc3y@E_?W^fcI}yh@AG@+YAZNDDCXNIdBCjf zWo$PV^g*&vkYk4F&oeTPzOt9oi-rPqA&aRT@oIW+DMqIs;o+*!GQixiYrQ0&GyIw# z)E$KVKMg1SZ?bjH z*dsjBuPCX*iu~4T?&h@Gby4l8o$??`U0hz?(KA?~ZPQZbcCt%ZHP~;>DWZtKB4x0N#ak+aX^1Z}JcD?=X-r?wYzlHP7 zc+0O3o^79>46J?cKNr69st#B@e#c%e0(Nd_a}L}nBsI4A`gn0YHzbpepK8iXSGHye zZc_wh(uE*=mi1&s!rJ0|3y(*~2S+XDR(22e&cvrf$B?KCxU$9K+4eLWcE^?K;gNE8 zY88fOt8Rt27q->?qrh;bJb;J00*|y>Z{l#D2!6+QKuc9-Fa6q6UtKw1zjCyX>j%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XNrh}RHmE8t0YCX#JM#>U^q_}e~7D`5z!w3K_hQ?S%5{cnG9;IbTXVjPD2hn>6sgkI{2ey^GO_tUsXVjA zaZU^FmBVZ)i~J;^Ox=cvp(4e7?*NQ^5zN9$LJq0SspsSl>MgV3DN()sBgBon(nv$+ zg6a$7oPg%@?pc+2v5QG32hU5;;OoYzrdxSF1YpOT>-oB{`rq>G0077^p(_7No~vPB z7VA;9h{CC~+O_lig-L_a^FM=co1UhAnS?v)51AD_(kR#7{Z;;={MYO*|1Pg+`h?HY znc)DW!$FH+h^QhwcVd>$#~?K$Fom--4U1YcV3aP6wjowu2hCHI>9~?Hh=c}Wi1ID9T%kCZryM03HmUIkgK~VV*vL$6FbgMHaxz~MhsI8DJgp#FENisE_p@i! zG%R1|sO1Z$2N`3iP|Z2^J{Le+j_9uNQL zwMyP*!m3axg^%b2p@F|lU?5L$OAE)SGOhvi-iuhnk+rf~qU>xkrr0>dw66y8pq{m) zUjSXMuc(&sQzN;oajqYvSvCxM_rVN)QRx3a{~>UjFaHcUt+vqfvt&dWsK4JAz)rCw R<%r}(ZSdcC=Km6_{{bRljTZm_ literal 0 HcmV?d00001 diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..6f8f719 --- /dev/null +++ b/src/main.c @@ -0,0 +1,193 @@ +/* + * DTMS Copyright (C) 2016 Eleni Maria Stea + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int parse_args(int argc, char **argv); +static void print_help(); +static int check_device(char *device_path); + +static int uid = -1; +static char *player_path; +static char *dev_path; + +#ifdef PREFIX +static const char* player_arg = PREFIX "/share/dtms/dtms.mp3"; +#else +static const char* player_arg = "data/dtms.mp3"; +#endif + +int main(int argc, char **argv) +{ + time_t last_touch_time = 0; + int fd; + + if(parse_args(argc, argv) == -1) + return 1; + + if(getuid() == 0 && uid == -1) { + fprintf(stderr, "It's a bad idea to run this program as root, either make it setuid-root, or use the -u option to specify an unprivileged user.\n"); + return 1; + } + + if(check_device(dev_path) == -1) + return 1; + + if((fd = open(dev_path, O_RDONLY | O_NONBLOCK)) == -1) { + fprintf(stderr, "Failed to open device: %s, error: %s\n", dev_path, strerror(errno)); + return 1; + } + + if(uid == -1) { + uid = getuid(); + } + + if(seteuid(uid) == -1) { + perror("Set uid failed"); + return 1; + } + + if(!uid) { + if(player_path[0] != '/') { + fprintf(stderr, "If you run this program as root you should pass the absolute path to a valid mp3 player.\n"); + return 1; + } + } + + char *cmd = malloc(strlen(player_path) + 1 + strlen(player_arg) + 1); + sprintf(cmd, "%s %s", player_path, player_arg); + + while(1) { + fd_set read_set; + FD_ZERO(&read_set); + FD_SET(fd, &read_set); + + int res; + while((res = select(fd + 1, &read_set, 0, 0, 0)) == -1 && errno == EINTR); + if(res < 0) { + perror("Select failed"); + break; + } + if(res == 0) //nothing to read + continue; + + if(FD_ISSET(fd, &read_set)) { + char buf[1024]; + time_t now = time(0); + while(read(fd, buf, sizeof buf) > 0); + if (now - last_touch_time > 2) { + system(cmd); + last_touch_time = now; + } + } + } + + free(cmd); + close(fd); + + return 0; +} + +static int parse_args(int argc, char **argv) +{ + for(int i=1; ipw_uid; + if(uid == 0) { + fprintf(stderr, "You should pass an unprivileged username.\n"); + return -1; + } + } + else { + fprintf(stderr, "Missing username.\n"); + return -1; + } + } + else if((strcmp(argv[i], "-d") == 0)) { + if(argv[++i]) { + dev_path = argv[i]; + } + else { + fprintf(stderr, "Invalid device file.\n"); + return -1; + } + } + else { + fprintf(stderr, "Unknown argument: %s\n", argv[i]); + return -1; + } + } + return 0; +} + +static void print_help() +{ + printf("Options:\n"); + printf("-h, prints this help\n"); + printf("-d, path to the device\n"); + printf("-p, path to the mp3 player\n"); + printf("-u. username of the user that runs the program\n"); + printf("--------\n"); + printf("Examples:\n"); + printf("--------\n"); + printf("./dtms -d /dev/usb/hiddev0 -u eleni -p /usr/bin/mpv\n"); +} + +static int check_device(char *device_path) +{ + struct stat sb; + if(stat(dev_path, &sb) == -1) { + perror("stat"); + return -1; + } + if(((sb.st_mode & S_IFMT) != S_IFBLK) && ((sb.st_mode & S_IFMT) != S_IFCHR)) { + fprintf(stderr, "%s is not a device file.\n", device_path); + return -1; + } + return 0; +} -- 1.7.10.4