Merge branch 'upstream'
[debian/pax] / cache.c
diff --git a/cache.c b/cache.c
index 44eda1f518a7c826521d208a4d313f9a1cbb20ac..4f80b7cc62cce5f7afd64f1cc6add66a92e4e167 100644 (file)
--- a/cache.c
+++ b/cache.c
@@ -200,7 +200,11 @@ name_uid(uid_t uid, int frc)
         * No entry for this uid, we will add it
         */
        if (!pwopn) {
+#ifdef DEBIAN
+               setpwent();
+#else
                setpassent(1);
+#endif
                ++pwopn;
        }
        if (ptr == NULL)
@@ -266,7 +270,11 @@ name_gid(gid_t gid, int frc)
         * No entry for this gid, we will add it
         */
        if (!gropn) {
+#ifdef DEBIAN
+               setgrent();
+#else
                setgroupent(1);
+#endif
                ++gropn;
        }
        if (ptr == NULL)
@@ -333,7 +341,11 @@ uid_name(char *name, uid_t *uid)
        }
 
        if (!pwopn) {
+#ifdef DEBIAN
+               setpwent();
+#else
                setpassent(1);
+#endif
                ++pwopn;
        }
 
@@ -396,7 +408,11 @@ gid_name(char *name, gid_t *gid)
        }
 
        if (!gropn) {
+#ifdef DEBIAN
+               setgrent();
+#else
                setgroupent(1);
+#endif
                ++gropn;
        }
        if (ptr == NULL)