#include <rpm/rpmlog.h>
#include "debug.h"
+#define UGIDMAX 1024
+
typedef char * ugstr_t;
-static uid_t uids[1024];
-static ugstr_t unames[1024];
+static uid_t uids[UGIDMAX];
+static ugstr_t unames[UGIDMAX];
static int uid_used = 0;
-static gid_t gids[1024];
-static ugstr_t gnames[1024];
+static gid_t gids[UGIDMAX];
+static ugstr_t gnames[UGIDMAX];
static int gid_used = 0;
void freeNames(void)
}
/* XXX - This is the other hard coded limit */
- if (x == 1024)
+ if (x == UGIDMAX)
rpmlog(RPMLOG_CRIT, _("getUname: too many uid's\n"));
if ((pw = getpwuid(uid)) == NULL)
}
/* XXX - This is the other hard coded limit */
- if (x == 1024)
+ if (x == UGIDMAX)
rpmlog(RPMLOG_CRIT, _("getUnameS: too many uid's\n"));
if ((pw = getpwnam(uname)) == NULL) {
}
/* XXX - This is the other hard coded limit */
- if (x == 1024)
+ if (x == UGIDMAX)
rpmlog(RPMLOG_CRIT, _("getUidS: too many uid's\n"));
if ((pw = getpwnam(uname)) == NULL) {
}
/* XXX - This is the other hard coded limit */
- if (x == 1024)
+ if (x == UGIDMAX)
rpmlog(RPMLOG_CRIT, _("getGname: too many gid's\n"));
if ((gr = getgrgid(gid)) == NULL)
}
/* XXX - This is the other hard coded limit */
- if (x == 1024)
+ if (x == UGIDMAX)
rpmlog(RPMLOG_CRIT, _("getGnameS: too many gid's\n"));
if ((gr = getgrnam(gname)) == NULL) {
}
/* XXX - This is the other hard coded limit */
- if (x == 1024)
+ if (x == UGIDMAX)
rpmlog(RPMLOG_CRIT, _("getGidS: too many gid's\n"));
if ((gr = getgrnam(gname)) == NULL) {