smb_wksids.c revision 29bd28862cfb8abbd3a0f0a4b17e08bbc3652836
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * CDDL HEADER START
07dc1947c362e187fb955d283b692f8769dd5defRichard Lowe * The contents of this file are subject to the terms of the
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * Common Development and Distribution License (the "License").
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * You may not use this file except in compliance with the License.
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * See the License for the specific language governing permissions
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * and limitations under the License.
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * When distributing Covered Code, include this CDDL HEADER in each
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * If applicable, add the following below this CDDL HEADER, with the
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * fields enclosed by brackets "[]" replaced with your own identifying
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * information: Portions Copyright [yyyy] [name of copyright owner]
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * CDDL HEADER END
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
07dc1947c362e187fb955d283b692f8769dd5defRichard Lowe * Use is subject to license terms.
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowestatic int wk_init = 0;
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowestatic char *wka_nbdomain[] = {
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe "NT Pseudo Domain",
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe "NT Authority",
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe * Predefined well known accounts table
07dc1947c362e187fb955d283b692f8769dd5defRichard Lowe { 2, "S-1-5-9", "Enterprise Domain Controllers",
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe { 3, "S-1-5-32-544", "Administrators", SidTypeAlias,
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe "Members can fully administer the computer/domain", NULL },
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe { 3, "S-1-5-32-547", "Power Users", SidTypeAlias,
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe SMB_WKAFLG_LGRP_ENABLE, "Members can share directories", NULL },
07dc1947c362e187fb955d283b692f8769dd5defRichard Lowe { 3, "S-1-5-32-551", "Backup Operators", SidTypeAlias,
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe "Members can bypass file security to back up files", NULL },
49d3bc91e27cd871b950d56c01398fa2f2e12ab4Richard Lowe#define SMB_WKA_NUM (sizeof (wka_tbl)/sizeof (wka_tbl[0]))
for (i = 0; i < SMB_WKA_NUM; ++i) {
return (entry);
return (NULL);
return (sid);
for (i = 0; i < SMB_WKA_NUM; ++i) {
return (entry);
return (NULL);
return (NULL);
int total_cnt;
return (NT_STATUS_NO_MEMORY);
return (NT_STATUS_NO_MEMORY);
id++;
return (NT_STATUS_NO_MEMORY);
id++;
return (NT_STATUS_NO_MEMORY);
return (NT_STATUS_SUCCESS);
smb_wka_init(void)
if (wk_init) {
for (i = 0; i < SMB_WKA_NUM; ++i) {
smb_wka_fini();
smb_wka_fini(void)
if (wk_init == 0) {
for (i = 0; i < SMB_WKA_NUM; ++i) {
wk_init = 0;