885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose Unix SMB/CIFS implementation.
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose Winbind client API
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose Copyright (C) Gerald (Jerry) Carter 2007
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose This library is free software; you can redistribute it and/or
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose modify it under the terms of the GNU Lesser General Public
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose License as published by the Free Software Foundation; either
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose version 3 of the License, or (at your option) any later version.
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose This library is distributed in the hope that it will be useful,
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose but WITHOUT ANY WARRANTY; without even the implied warranty of
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose Library General Public License for more details.
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose You should have received a copy of the GNU Lesser General Public License
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose along with this program. If not, see <http://www.gnu.org/licenses/>.
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose/* Required Headers */
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose/* Convert a binary GUID to a character string */
885386b7e3f1c3e74b354576b98a092b0835d64eSumit BosewbcErr wbcGuidToString(const struct wbcGuid *guid,
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose/* @brief Convert a character string to a binary GUID */
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose if (11 == sscanf(str, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose &node[0], &node[1], &node[2], &node[3], &node[4], &node[5])) {
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose } else if (11 == sscanf(str, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose &node[0], &node[1], &node[2], &node[3], &node[4], &node[5])) {
885386b7e3f1c3e74b354576b98a092b0835d64eSumit Bose for (i=0;i<6;i++) {