winbind_nss_freebsd: fix const discard warning
authorUri Simchoni <uri@samba.org>
Mon, 20 Nov 2017 19:18:01 +0000 (21:18 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 24 Nov 2017 00:13:15 +0000 (01:13 +0100)
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
nsswitch/winbind_nss_freebsd.c

index 476349f..e283872 100644 (file)
@@ -129,8 +129,13 @@ __freebsd_getgroupmembership(void *retval, void *mdata, va_list ap)
        /* insert primary membership(possibly already there) */
        gr_addgid(group, groups, maxgrp, groupc);
        /* Don't limit number of groups, we want to know total size */
-       ret = _nss_winbind_initgroups_dyn(uname, group, &lcount, &lsize,
-               &tmpgroups, 0, &errnop);
+       ret = _nss_winbind_initgroups_dyn(discard_const(uname),
+                                         group,
+                                         &lcount,
+                                         &lsize,
+                                         &tmpgroups,
+                                         0,
+                                         &errnop);
        if (ret == NSS_STATUS_SUCCESS) {
                /* lcount potentially can be bigger than maxgrp, so would groupc */
                for (i = 0; i < lcount; i++)