Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
nfs-utils.16460
0008-gssd-replace-non-thread-safe-strtok-with-s...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0008-gssd-replace-non-thread-safe-strtok-with-strsep.patch of Package nfs-utils.16460
From 5ae8be8b6af1a0fdf2fa26051a05d4c04d028849 Mon Sep 17 00:00:00 2001 From: Frank Sorenson <sorenson@redhat.com> Date: Wed, 15 Feb 2017 10:36:47 -0500 Subject: [PATCH] gssd: replace non-thread-safe strtok with strsep gssd uses the non-thread-safe strtok() function, which can lead to incorrect program behavior. Replace strtok() with the thread-safe strsep(). Signed-off-by: Frank Sorenson <sorenson@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com> --- utils/gssd/gssd_proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/utils/gssd/gssd_proc.c +++ b/utils/gssd/gssd_proc.c @@ -729,10 +729,11 @@ handle_gssd_upcall(struct clnt_upcall_in char *target = NULL; char *service = NULL; char *enctypes = NULL; + char *pbuf = info->lbuf; printerr(2, "\n%s: '%s' (%s)\n", __func__, info->lbuf, clp->relpath); - for (p = strtok(info->lbuf, " "); p; p = strtok(NULL, " ")) { + while ((p = strsep(&pbuf, " "))) { if (!strncmp(p, "mech=", strlen("mech="))) mech = p + strlen("mech="); else if (!strncmp(p, "uid=", strlen("uid=")))
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor