fisket escaping, tror jeg
This commit is contained in:
parent
49241f6e03
commit
33a932f23c
|
@ -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
|
* mysql-useradm.c
|
||||||
*
|
*
|
||||||
|
@ -181,6 +181,7 @@ list(MYSQL *pmysql)
|
||||||
p = getpwuid(getuid());
|
p = getpwuid(getuid());
|
||||||
sprintf(query, "select user from user where user='%s' or user like '%s\\_%%'",
|
sprintf(query, "select user from user where user='%s' or user like '%s\\_%%'",
|
||||||
p->pw_name, p->pw_name);
|
p->pw_name, p->pw_name);
|
||||||
|
// sprintf(query, "select user from user where user='myhr' or user like 'myhr\\_%%'");
|
||||||
|
|
||||||
numgroups = 0;
|
numgroups = 0;
|
||||||
|
|
||||||
|
@ -192,7 +193,7 @@ list(MYSQL *pmysql)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("about to run query: %s", query);
|
printf("about to run query: %s\n", query);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mysql_query(pmysql, query))
|
if (mysql_query(pmysql, query))
|
||||||
|
@ -237,6 +238,12 @@ main(int argc, char *argv[])
|
||||||
if (strcmp(argv[i], "--version") == 0)
|
if (strcmp(argv[i], "--version") == 0)
|
||||||
return version();
|
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)
|
if (argc < 2)
|
||||||
return wrong_use(NULL);
|
return wrong_use(NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue