From 33a932f23ceca077fb8c2dde86a485ac795e562f Mon Sep 17 00:00:00 2001 From: Lasse Karstensen Date: Mon, 7 Apr 2003 16:21:50 +0000 Subject: [PATCH] fisket escaping, tror jeg --- mysql-useradm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mysql-useradm.c b/mysql-useradm.c index 5228297..48b6cc4 100644 --- a/mysql-useradm.c +++ b/mysql-useradm.c @@ -1,5 +1,5 @@ /* - * @(#) $Header: /tmp/cvs/mysql-admutils/mysql-useradm.c,v 1.7 2003-04-03 22:37:26 lkarsten Exp $ + * @(#) $Header: /tmp/cvs/mysql-admutils/mysql-useradm.c,v 1.8 2003-04-07 16:21:50 lkarsten Exp $ * * mysql-useradm.c * @@ -181,6 +181,7 @@ list(MYSQL *pmysql) p = getpwuid(getuid()); sprintf(query, "select user from user where user='%s' or user like '%s\\_%%'", p->pw_name, p->pw_name); +// sprintf(query, "select user from user where user='myhr' or user like 'myhr\\_%%'"); numgroups = 0; @@ -192,7 +193,7 @@ list(MYSQL *pmysql) } #ifdef DEBUG - printf("about to run query: %s", query); + printf("about to run query: %s\n", query); #endif if (mysql_query(pmysql, query)) @@ -237,6 +238,12 @@ main(int argc, char *argv[]) if (strcmp(argv[i], "--version") == 0) return version(); +#ifdef DEBUG + printf("NB NB NB: denne versjonen av programmet er kompilert med -DDEBUG, og\n"); + printf("kan komme til å skrive ut ekstra informasjon. Dette er ikke farlig,\n"); + printf("og programmet bør virke som vanlig.\n"); +#endif + if (argc < 2) return wrong_use(NULL);