MySQL 8.0.32
Source Code Documentation
named_pipe.h
Go to the documentation of this file.
1/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef NAMED_PIPE_INCLUDED
24#define NAMED_PIPE_INCLUDED
25
26#include <windows.h>
27
28const DWORD NAMED_PIPE_OWNER_PERMISSIONS = GENERIC_READ | GENERIC_WRITE;
30 FILE_READ_ATTRIBUTES | FILE_READ_DATA | FILE_WRITE_ATTRIBUTES |
31 FILE_WRITE_DATA | SYNCHRONIZE | READ_CONTROL;
33 GENERIC_READ | GENERIC_WRITE;
34
35HANDLE create_server_named_pipe(SECURITY_ATTRIBUTES **ppsec_attr,
36 DWORD buffer_size, const char *name,
37 char *name_buf, size_t buflen,
38 const char *full_access_group_name = nullptr);
39
40bool is_valid_named_pipe_full_access_group(const char *group_name);
41bool my_security_attr_add_rights_to_group(SECURITY_ATTRIBUTES *psa,
42 const char *group_name,
43 DWORD group_rights);
44#define DEFAULT_NAMED_PIPE_FULL_ACCESS_GROUP ""
45#define NAMED_PIPE_FULL_ACCESS_GROUP_EVERYONE "*everyone*"
46#endif /* NAMED_PIPE_INCLUDED */
const DWORD NAMED_PIPE_FULL_ACCESS_GROUP_PERMISSIONS
Definition: named_pipe.h:32
HANDLE create_server_named_pipe(SECURITY_ATTRIBUTES **ppsec_attr, DWORD buffer_size, const char *name, char *name_buf, size_t buflen, const char *full_access_group_name=nullptr)
Creates an instance of a named pipe and returns a handle.
Definition: named_pipe.cc:280
bool is_valid_named_pipe_full_access_group(const char *group_name)
Definition: named_pipe.cc:107
const DWORD NAMED_PIPE_OWNER_PERMISSIONS
Definition: named_pipe.h:28
const DWORD NAMED_PIPE_EVERYONE_PERMISSIONS
Definition: named_pipe.h:29
bool my_security_attr_add_rights_to_group(SECURITY_ATTRIBUTES *psa, const char *group_name, DWORD group_rights)
Definition: named_pipe.cc:125
size_t buffer_size(const ConstBufferSequence &buffers) noexcept
Definition: buffer.h:313
case opt name
Definition: sslopt-case.h:32
#define HANDLE
Definition: violite.h:158