Line 0
Link Here
|
|
|
1 |
--- configure.in.old 2010-09-20 20:18:27.000000000 +0200 |
2 |
+++ configure.in 2011-06-14 11:38:38.442321110 +0200 |
3 |
@@ -308,31 +308,10 @@ |
4 |
# new macro for finding group names |
5 |
AC_DEFUN([MM_FIND_GROUP_NAME], [ |
6 |
# $1 == variable name |
7 |
-# $2 == user id to check for |
8 |
+# $2 == user group name |
9 |
AC_SUBST($1) |
10 |
changequote(,) |
11 |
-if test -z "$$1" |
12 |
-then |
13 |
- cat > conftest.py <<EOF |
14 |
-import grp |
15 |
-gid = '' |
16 |
-for group in "$2".split(): |
17 |
- try: |
18 |
- try: |
19 |
- gname = grp.getgrgid(int(group))[0] |
20 |
- break |
21 |
- except ValueError: |
22 |
- gname = grp.getgrnam(group)[0] |
23 |
- break |
24 |
- except KeyError: |
25 |
- gname = '' |
26 |
-fp = open("conftest.out", "w") |
27 |
-fp.write("%s\n" % gname) |
28 |
-fp.close() |
29 |
-EOF |
30 |
- $PYTHON conftest.py |
31 |
- $1=`cat conftest.out` |
32 |
-fi |
33 |
+$1=$2 |
34 |
changequote([, ]) |
35 |
rm -f conftest.out conftest.py]) |
36 |
|
37 |
@@ -340,31 +319,10 @@ |
38 |
# new macro for finding UIDs |
39 |
AC_DEFUN([MM_FIND_USER_NAME], [ |
40 |
# $1 == variable name |
41 |
-# $2 == user id to check for |
42 |
+# $2 == user name |
43 |
AC_SUBST($1) |
44 |
changequote(,) |
45 |
-if test -z "$$1" |
46 |
-then |
47 |
- cat > conftest.py <<EOF |
48 |
-import pwd |
49 |
-uid = '' |
50 |
-for user in "$2".split(): |
51 |
- try: |
52 |
- try: |
53 |
- uname = pwd.getpwuid(int(user))[0] |
54 |
- break |
55 |
- except ValueError: |
56 |
- uname = pwd.getpwnam(user)[0] |
57 |
- break |
58 |
- except KeyError: |
59 |
- uname = '' |
60 |
-fp = open("conftest.out", "w") |
61 |
-fp.write("%s\n" % uname) |
62 |
-fp.close() |
63 |
-EOF |
64 |
- $PYTHON conftest.py |
65 |
- $1=`cat conftest.out` |
66 |
-fi |
67 |
+$1=$2 |
68 |
changequote([, ]) |
69 |
rm -f conftest.out conftest.py]) |
70 |
|