blob: e3abac857a2fd56e6b4acecbcda0acf229fc25be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
$NetBSD: patch-ag,v 1.1 2008/11/23 21:21:43 hasso Exp $
--- src/polkit/polkit-config.c.orig 2008-11-23 22:37:33 +0200
+++ src/polkit/polkit-config.c 2008-11-23 22:44:41 +0200
@@ -556,6 +556,7 @@ config_node_match (ConfigNode *node,
str1 = kit_strdup_printf ("%d", uid);
{
+#ifndef __DragonFly__
struct passwd pd;
struct passwd* pwdptr=&pd;
struct passwd* tempPwdPtr;
@@ -565,6 +566,13 @@ config_node_match (ConfigNode *node,
if ((getpwuid_r (uid, pwdptr, pwdbuffer, pwdlinelen, &tempPwdPtr)) !=0 )
goto out;
str2 = kit_strdup (pd.pw_name);
+#else
+ struct passwd *pd;
+
+ pd = getpwuid (uid);
+ if (pd != NULL)
+ str2 = kit_strdup (pd->pw_name);
+#endif
}
break;
}
|