summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2005-06-09 17:29:18 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2005-06-09 17:29:18 +0000
commit0a7fe016a03184815b03fe92d50c58e67c8c05fc (patch)
treeb9c25dd0fbbb71e08b2826e046b763facdcff8df /examples
parentfa433b9e2fa1a00e13df36a8b709ffda9e3e715b (diff)
Relevant BUGIDs: none
Purpose of commit: cleanup Commit summary: --------------- Fix all occurrence of dereferencing type-punned pointer will break strict-aliasing rules warnings
Diffstat (limited to 'examples')
-rw-r--r--examples/xsh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/xsh.c b/examples/xsh.c
index f8fa1426..7ec5c7a2 100644
--- a/examples/xsh.c
+++ b/examples/xsh.c
@@ -39,7 +39,7 @@ static struct pam_conv conv = {
int main(int argc, char **argv)
{
pam_handle_t *pamh=NULL;
- const char *username=NULL;
+ const void *username=NULL;
const char *service="xsh";
int retcode;
@@ -137,10 +137,10 @@ int main(int argc, char **argv)
break;
}
- pam_get_item(pamh, PAM_USER, (const void **) &username);
+ pam_get_item(pamh, PAM_USER, &username);
fprintf(stderr,
"The user [%s] has been authenticated and `logged in'\n",
- username);
+ (const char *)username);
/* this is always a really bad thing for security! */
system("/bin/sh");