minicom/minicom-2.2-drop-privs.patch
Miroslav Lichvar 0f0e704dc8 - update to 2.2
- handle filenames with spaces (#98655)
- add requires for lrzsz
- spec cleanup Resolves: #98655
2007-03-09 12:19:02 +00:00

21 lines
697 B
Diff

--- minicom-2.2/src/minicom.c.privs 2005-10-31 13:13:51.000000000 +0100
+++ minicom-2.2/src/minicom.c 2007-03-09 13:08:23.000000000 +0100
@@ -1124,6 +1124,8 @@
use_status = 1;
break;
case 'C': /* Capturing */
+ setegid(real_gid);
+ seteuid(real_uid);
capfp = sfopen(optarg, "a");
if (capfp == NULL) {
werror(_("Cannot open capture file"));
@@ -1131,6 +1133,8 @@
}
docap = 1;
vt_set(addlf, -1, capfp, docap, -1, -1, -1, -1);
+ seteuid(eff_uid);
+ setegid(eff_gid);
break;
case 'S': /* start Script */
strncpy(scr_name, optarg, 33);