Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
850f53bb
Commit
850f53bb
authored
Aug 09, 2005
by
reggie@linux.site
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small corrections to the IM.
parent
633e62bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
server-tools/instance-manager/IMService.cpp
server-tools/instance-manager/IMService.cpp
+6
-6
server-tools/instance-manager/user_map.cc
server-tools/instance-manager/user_map.cc
+9
-8
No files found.
server-tools/instance-manager/IMService.cpp
View file @
850f53bb
...
...
@@ -44,24 +44,24 @@ int HandleServiceOptions(Options options)
if
(
options
.
install_as_service
)
{
if
(
winService
.
IsInstalled
())
log_info
(
"Service is already installed
\n
"
);
log_info
(
"Service is already installed"
);
else
if
(
winService
.
Install
())
log_info
(
"Service installed successfully
\n
"
);
log_info
(
"Service installed successfully"
);
else
{
log_info
(
"Service failed to install
\n
"
);
log_info
(
"Service failed to install"
);
ret_val
=
-
1
;
}
}
else
if
(
options
.
remove_service
)
{
if
(
!
winService
.
IsInstalled
())
log_info
(
"Service is not installed
\n
"
);
log_info
(
"Service is not installed"
);
else
if
(
winService
.
Remove
())
log_info
(
"Service removed successfully
\n
"
);
log_info
(
"Service removed successfully"
);
else
{
log_info
(
"Service failed to remove
\n
"
);
log_info
(
"Service failed to remove"
);
ret_val
=
-
1
;
}
}
...
...
server-tools/instance-manager/user_map.cc
View file @
850f53bb
...
...
@@ -25,12 +25,6 @@
#include "log.h"
#ifdef __WIN__
#define NEWLINE_LEN 2
#else
#define NEWLINE_LEN 1
#endif
struct
User
{
char
user
[
USERNAME_LENGTH
+
1
];
...
...
@@ -43,6 +37,7 @@ struct User
int
User
::
init
(
const
char
*
line
)
{
const
char
*
name_begin
,
*
name_end
,
*
password
;
int
line_ending_len
=
1
;
if
(
line
[
0
]
==
'\''
||
line
[
0
]
==
'"'
)
{
...
...
@@ -64,8 +59,14 @@ int User::init(const char *line)
if
(
user_length
>
USERNAME_LENGTH
)
goto
err
;
/* assume that newline characater is present */
if
(
strlen
(
password
)
!=
SCRAMBLED_PASSWORD_CHAR_LENGTH
+
NEWLINE_LEN
)
/*
assume that newline characater is present
we support reading password files that end in \n or \r\n on
either platform.
*/
if
(
password
[
strlen
(
password
)
-
2
]
==
'\r'
)
line_ending_len
=
2
;
if
(
strlen
(
password
)
!=
SCRAMBLED_PASSWORD_CHAR_LENGTH
+
line_ending_len
)
goto
err
;
memcpy
(
user
,
name_begin
,
user_length
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment