Merge lp:~hingo/drizzle/drizzle-rescue-drizzle_password_hash into lp:~drizzle-trunk/drizzle/development

Proposed by Henrik Ingo on 2012-01-13
Status: Merged
Approved by: Brian Aker on 2012-01-14
Approved revision: 2483
Merged at revision: 2495
Proposed branch: lp:~hingo/drizzle/drizzle-rescue-drizzle_password_hash
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 143 lines (+8/-79)
4 files modified
.bzrignore (+1/-2)
client/include.am (+6/-1)
libdrizzle-2.0/include.am (+1/-14)
libdrizzle-2.0/mysql_password_hash.cc (+0/-62)
To merge this branch: bzr merge lp:~hingo/drizzle/drizzle-rescue-drizzle_password_hash
Reviewer Review Type Date Requested Status
Drizzle Merge Team 2012-01-13 Pending
Review via email: mp+88475@code.launchpad.net

Description of the change

With the recent rehash of libdrizzle files, one binary called drizzle_password_hash dropped out of make install. This is referenced in the auth_ldap documentation and use for password management with ldap.

This fixes the problem by moving the source file to client/drizzle_password_hash.cc and adding to bin_PROGRAMS in client/include.am. The libdrizzle*/mysql_password_hash.cc files are deleted.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2011-12-27 16:09:18 +0000
3+++ .bzrignore 2012-01-13 10:33:24 +0000
4@@ -43,6 +43,7 @@
5 client/drizzleslap
6 client/drizzletest
7 client/mysqlslap
8+client/drizzle_password_hash
9 comp_creator.gcno
10 compile
11 config.guess
12@@ -166,8 +167,6 @@
13 item.gcno
14 key.gcno
15 key_map.gcno
16-libdrizzle-2.0/libdrizzle/mysql_password_hash
17-libdrizzle-2.0/libdrizzle/drizzle_password_hash
18 libmysql/Makefile.in
19 libserialutil_la-db.gcno
20 libserialutil_la-unireg.gcno
21
22=== renamed file 'libdrizzle/mysql_password_hash.cc' => 'client/drizzle_password_hash.cc'
23=== modified file 'client/include.am'
24--- client/include.am 2011-11-30 17:23:18 +0000
25+++ client/include.am 2012-01-13 10:33:24 +0000
26@@ -34,7 +34,8 @@
27 client/drizzle \
28 client/drizzledump \
29 client/drizzleimport \
30- client/drizzleslap
31+ client/drizzleslap \
32+ client/drizzle_password_hash
33
34 man_MANS+= \
35 client/drizzle.1 \
36@@ -88,3 +89,7 @@
37
38 client_drizzletest_SOURCES= client/drizzletest.cc
39 client_drizzletest_LDADD= ${CLIENT2_LDADD} ${BOOST_LIBS} ${LIBPCRE}
40+
41+
42+client_drizzle_password_hash_SOURCES= client/drizzle_password_hash.cc
43+client_drizzle_password_hash_LDADD= libdrizzle-2.0/libdrizzle-2.0.la
44
45=== modified file 'libdrizzle-2.0/include.am'
46--- libdrizzle-2.0/include.am 2011-12-23 20:13:32 +0000
47+++ libdrizzle-2.0/include.am 2012-01-13 10:33:24 +0000
48@@ -40,18 +40,6 @@
49 SQLITE_PROGS= examples/sqlite_server
50 endif
51
52-noinst_PROGRAMS+= libdrizzle-2.0/mysql_password_hash
53-libdrizzle_2_0_mysql_password_hash_LDADD= libdrizzle-2.0/libdrizzle-2.0.la
54-libdrizzle_2_0_mysql_password_hash_SOURCES= libdrizzle-2.0/mysql_password_hash.cc
55-
56-# For some reason this has originally been called mysql_password_hash. I'd prefer
57-# to call it drizzle_password_hash but to remain backward compatible I didn't
58-# change any sources, rather just build it twice and provide both.
59-# Only drizzle_password_hash is installed by make install though.
60-noinst_PROGRAMS+= libdrizzle-2.0/drizzle_password_hash
61-libdrizzle_2_0_drizzle_password_hash_LDADD= libdrizzle-2.0/libdrizzle-2.0.la
62-libdrizzle_2_0_drizzle_password_hash_SOURCES= libdrizzle-2.0/mysql_password_hash.cc
63-
64 noinst_PROGRAMS+= \
65 $(SQLITE_PROGS) \
66 examples/client \
67@@ -59,8 +47,7 @@
68 examples/proxy \
69 examples/server \
70 examples/simple \
71- examples/simple_multi \
72- libdrizzle-2.0/mysql_password_hash
73+ examples/simple_multi
74
75 libdrizzle_2_0_libdrizzle_2_0_la_CXXFLAGS= \
76 ${AM_CXXFLAGS} \
77
78=== removed file 'libdrizzle-2.0/mysql_password_hash.cc'
79--- libdrizzle-2.0/mysql_password_hash.cc 2011-11-04 21:06:16 +0000
80+++ libdrizzle-2.0/mysql_password_hash.cc 1970-01-01 00:00:00 +0000
81@@ -1,62 +0,0 @@
82-/*
83- * Drizzle Client & Protocol Library
84- *
85- * Copyright (C) 2008 Eric Day (eday@oddments.org)
86- * All rights reserved.
87- *
88- * Redistribution and use in source and binary forms, with or without
89- * modification, are permitted provided that the following conditions are
90- * met:
91- *
92- * * Redistributions of source code must retain the above copyright
93- * notice, this list of conditions and the following disclaimer.
94- *
95- * * Redistributions in binary form must reproduce the above
96- * copyright notice, this list of conditions and the following disclaimer
97- * in the documentation and/or other materials provided with the
98- * distribution.
99- *
100- * * The names of its contributors may not be used to endorse or
101- * promote products derived from this software without specific prior
102- * written permission.
103- *
104- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
105- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
106- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
107- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
108- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
109- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
110- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
111- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
112- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
113- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
114- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
115- *
116- */
117-
118-
119-#include <config.h>
120-
121-#include <cstring>
122-#include <iostream>
123-
124-#include <libdrizzle-2.0/drizzle_client.h>
125-
126-static const uint32_t BUFFER_CHUNK= 8192;
127-
128-int main(int argc, char *argv[])
129-{
130- char hashed_password[DRIZZLE_MYSQL_PASSWORD_HASH];
131-
132- if (argc != 2)
133- {
134- std::cerr << "Usage: " << argv[0] << " <password to hash>" << std::endl;
135- return 1;
136- }
137-
138- drizzle_mysql_password_hash(hashed_password, argv[1], strlen(argv[1]));
139-
140- std::cout << hashed_password << std::endl;
141-
142- return 0;
143-}