4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
25 */
26
27 /*
28 * Server Service RPC (SRVSVC) server-side interface definition.
29 * The server service provides a remote administration interface.
30 *
31 * This service uses NERR/Win32 error codes rather than NT status
32 * values.
33 */
34
35 #include <sys/errno.h>
36 #include <sys/tzfile.h>
37 #include <unistd.h>
38 #include <netdb.h>
39 #include <strings.h>
40 #include <time.h>
41 #include <thread.h>
42 #include <ctype.h>
43 #include <stdlib.h>
44 #include <string.h>
985 param->result.ru.info1004 = info1004;
986 break;
987
988 case 1005:
989 info1005 = &info->nsg_info1005;
990 info1005->shi1005_flags = srvsvc_get_share_flags(&si);
991 param->result.ru.info1005 = info1005;
992 break;
993
994 case 1006:
995 info1006 = &info->nsg_info1006;
996 info1006->shi1006_max_uses = SHI_USES_UNLIMITED;
997 param->result.ru.info1006 = info1006;
998 break;
999
1000 case 1501:
1001 info1501 = &info->nsg_info1501;
1002
1003 status = srvsvc_share_getsd(mxa, &si, &sd);
1004 if (status == ERROR_SUCCESS) {
1005 info503->shi503_reserved = sd.sd_size;
1006 info503->shi503_security_descriptor = sd.sd_buf;
1007 } else {
1008 info503->shi503_reserved = 0;
1009 info503->shi503_security_descriptor = NULL;
1010 }
1011
1012 param->result.ru.info1501 = info1501;
1013 break;
1014
1015 default:
1016 status = ERROR_ACCESS_DENIED;
1017 break;
1018 }
1019
1020 if (status != ERROR_SUCCESS)
1021 bzero(param, sizeof (struct mlsm_NetShareGetInfo));
1022 else
1023 param->result.switch_value = param->level;
1024
1025 param->status = status;
1026 return (NDR_DRC_OK);
1027 }
1028
1029 static uint32_t
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
25 */
26
27 /*
28 * Server Service RPC (SRVSVC) server-side interface definition.
29 * The server service provides a remote administration interface.
30 *
31 * This service uses NERR/Win32 error codes rather than NT status
32 * values.
33 */
34
35 #include <sys/errno.h>
36 #include <sys/tzfile.h>
37 #include <unistd.h>
38 #include <netdb.h>
39 #include <strings.h>
40 #include <time.h>
41 #include <thread.h>
42 #include <ctype.h>
43 #include <stdlib.h>
44 #include <string.h>
985 param->result.ru.info1004 = info1004;
986 break;
987
988 case 1005:
989 info1005 = &info->nsg_info1005;
990 info1005->shi1005_flags = srvsvc_get_share_flags(&si);
991 param->result.ru.info1005 = info1005;
992 break;
993
994 case 1006:
995 info1006 = &info->nsg_info1006;
996 info1006->shi1006_max_uses = SHI_USES_UNLIMITED;
997 param->result.ru.info1006 = info1006;
998 break;
999
1000 case 1501:
1001 info1501 = &info->nsg_info1501;
1002
1003 status = srvsvc_share_getsd(mxa, &si, &sd);
1004 if (status == ERROR_SUCCESS) {
1005 info1501->shi1501_reserved = sd.sd_size;
1006 info1501->shi1501_security_descriptor = sd.sd_buf;
1007 } else {
1008 info1501->shi1501_reserved = 0;
1009 info1501->shi1501_security_descriptor = NULL;
1010 }
1011
1012 param->result.ru.info1501 = info1501;
1013 break;
1014
1015 default:
1016 status = ERROR_ACCESS_DENIED;
1017 break;
1018 }
1019
1020 if (status != ERROR_SUCCESS)
1021 bzero(param, sizeof (struct mlsm_NetShareGetInfo));
1022 else
1023 param->result.switch_value = param->level;
1024
1025 param->status = status;
1026 return (NDR_DRC_OK);
1027 }
1028
1029 static uint32_t
|