[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#254180: [OSHURD] start-stop-daemon.c:pid_is_user has Linux code



Package: dpkg
Version: 1.10.22
Tags: sid, patch

It seems that some Linux code is copied into pid_is_user function by accident. Patch is applied.

Regards,
ogi
--- start-stop-daemon.c.orig	Sun Jun 13 17:02:02 2004
+++ start-stop-daemon.c	Sun Jun 13 17:02:14 2004
@@ -645,10 +645,6 @@ pid_is_user(pid_t pid, uid_t uid)
 	char buf[32];
 	struct proc_stat *pstat;
 
-	sprintf(buf, "/proc/%d", pid);
-	if (stat(buf, &sb) != 0)
-		return 0;
-	return (sb.st_uid == uid);
 	pstat = proc_stat_list_pid_proc_stat (procset, pid);
 	if (pstat)
 		proc_stat_set_flags (pstat, PSTAT_PID | PSTAT_OWNER_UID);

Reply to: