Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 149871 Details for
Bug 231905
migration: Migrate from 1.0.x to 1.1
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
diffs
cvsdiffs (text/plain), 5.38 KB, created by
Rich Megginson
on 2007-03-12 21:50:31 UTC
(
hide
)
Description:
diffs
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2007-03-12 21:50:31 UTC
Size:
5.38 KB
patch
obsolete
>Index: ldapserver/Makefile.am >=================================================================== >RCS file: /cvs/dirsec/ldapserver/Makefile.am,v >retrieving revision 1.32 >diff -u -8 -r1.32 Makefile.am >--- ldapserver/Makefile.am 3 Mar 2007 00:32:16 -0000 1.32 >+++ ldapserver/Makefile.am 12 Mar 2007 21:49:35 -0000 >@@ -16,17 +16,17 @@ > # value in the header file e.g. > # #define LOCALSTATEDIR "/var" > # without the quotes, it would be > # #define LOCALSTATEDIR /var > # which would be an error > PATH_DEFINES = -DLOCALSTATEDIR="\"$(localstatedir)\"" -DSYSCONFDIR="\"$(sysconfdir)\"" \ > -DLIBDIR="\"$(libdir)\"" -DBINDIR="\"$(bindir)\"" \ > -DDATADIR="\"$(datadir)\"" -DDOCDIR="\"$(docdir)\"" \ >- -DSBINDIR="\"$(sbindir)\"" >+ -DSBINDIR="\"$(sbindir)\"" -DPLUGINDIR="\"$(serverplugindir)\"" > > AM_CPPFLAGS = $(DEBUG_DEFINES) $(DS_DEFINES) $(DS_INCLUDES) $(PATH_DEFINES) > PLUGIN_CPPFLAGS = $(AM_CPPFLAGS) @ldapsdk_inc@ @nss_inc@ @nspr_inc@ > # We need to make sure that libpthread is linked before libc on HP-UX. > if HPUX > AM_LDFLAGS = -lpthread > endif > >@@ -150,20 +150,21 @@ > wrappers/ds_newinst \ > $(srcdir)/ldap/admin/src/ds_newinst.pl \ > wrappers/dsktune \ > wrappers/infadd \ > wrappers/ldap-agent \ > wrappers/ldclt \ > wrappers/ldif \ > $(srcdir)/ldap/admin/src/logconv.pl \ >+ $(srcdir)/ldap/admin/src/migrateTo11 > wrappers/migratecred \ > wrappers/mmldif \ > wrappers/pwdhash \ >- wrappers/rsearch >+ wrappers/rsearch \ > > task_SCRIPTS = ldap/admin/src/scripts/template-bak2db \ > ldap/admin/src/scripts/template-db2bak \ > ldap/admin/src/scripts/template-db2index \ > ldap/admin/src/scripts/template-db2ldif \ > ldap/admin/src/scripts/template-ldif2db \ > ldap/admin/src/scripts/template-ldif2ldap \ > ldap/admin/src/scripts/template-monitor \ >Index: ldapserver/ldap/servers/slapd/tools/migratecred.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/migratecred.c,v >retrieving revision 1.7 >diff -u -8 -r1.7 migratecred.c >--- ldapserver/ldap/servers/slapd/tools/migratecred.c 10 Nov 2006 23:45:51 -0000 1.7 >+++ ldapserver/ldap/servers/slapd/tools/migratecred.c 12 Mar 2007 21:49:38 -0000 >@@ -41,27 +41,31 @@ > #endif > > > #include <stdio.h> > #include <string.h> > #include <limits.h> > #include <stdarg.h> > #include <stdlib.h> >+#ifdef HAVE_UNISTD_H >+#include <unistd.h> >+#endif > > #ifndef _WIN32 > #include <sys/param.h> /* MAXPATHLEN */ > #endif > > #include "../plugins/rever/rever.h" > #include "getopt_ext.h" > > static void usage(char *name) > { >- fprintf(stderr, "usage: %s -o 5.0InstancePath -n 5.1InstancePath -c 5.0Credential\n", name); >+ fprintf(stderr, "usage: %s -o OldInstancePath -n NewInstancePath -c OldCredential [-p NewPluginPath]\n", name); >+ fprintf(stderr, "New plugin path defaults to [%s] if not given\n", PLUGINDIR); > exit(1); > } > > #ifdef _WIN32 > /* converts '\' chars to '/' */ > static void dostounixpath(char *szText) > { > if(szText) >@@ -71,45 +75,46 @@ > if( *szText == '\\' ) > *szText = '/'; > szText++; > } > } > } > #endif > >-/* Script used during 5.0 to 5.1 migration: replication and >+/* Script used during migration: replication and > chaining backend credentials must be converted. > > Assumption: the built-in des-plugin.so lib has been used >- in 5.0 and is used in 5.1 >+ in the old version and is used in the new version > > Usage: migrateCred >- -o <5.0 instance path> >- -n <5.1 instance path> >- -c <5.0 credential, with prefix> >+ -o <old instance path> >+ -n <new instance path> >+ -c <old credential, with prefix> > >- Return 5.1 credential with prefix >+ Return new credential with prefix > */ > > int > main( int argc, char **argv) > { > char *cmd = argv[0]; > char *oldpath = NULL; > char *newpath = NULL; >+ char *pluginpath = NULL; > char *prefixCred = NULL; > char *cred = NULL; > > char *newcred = NULL; > migrate_fn_type fct = NULL; > char libpath[MAXPATHLEN]; > char *shared_lib; > >- char *opts = "o:n:c:"; >+ char *opts = "o:n:c:p:"; > int i; > > while (( i = getopt( argc, argv, opts )) != EOF ) > { > switch (i) > { > case 'o': > oldpath = strdup(optarg); >@@ -139,16 +144,23 @@ > cred = prefixCred + namelen + 2; > } > else > { > fprintf(stderr, "Invalid -c argument: %s (wrong prefix?).\n", prefixCred); > } > } > break; >+ case 'p': >+ pluginpath = strdup(optarg); >+#ifdef _WIN32 >+ dostounixpath(pluginpath); >+#endif /* _WIN32 */ >+ >+ break; > default: > usage(cmd); > } > } > > if ( !oldpath || !newpath || !cred ) > { > usage(cmd); >@@ -172,23 +184,36 @@ > shared_lib = "_shr.a"; > #endif > #else > shared_lib = ".so"; > #endif > #endif > #endif > >- snprintf(libpath, sizeof(libpath), "%s/../lib/des-plugin%s", newpath, shared_lib); >- libpath[sizeof(libpath)-1] = 0; >+ if (!pluginpath) { >+ pluginpath = strdup(PLUGINDIR); >+#ifdef _WIN32 >+ dostounixpath(pluginpath); >+#endif /* _WIN32 */ >+ } >+ >+ if (access(pluginpath, R_OK)) { >+ snprintf(libpath, sizeof(libpath), "%s/../lib/des-plugin%s", newpath, shared_lib); >+ libpath[sizeof(libpath)-1] = 0; >+ } else { >+ snprintf(libpath, sizeof(libpath), "%s/libdes-plugin%s", pluginpath, shared_lib); >+ libpath[sizeof(libpath)-1] = 0; >+ } > > fct = (migrate_fn_type)sym_load(libpath, "migrateCredentials", > "DES Plugin", 1 /* report errors */ ); > if ( fct == NULL ) > { >+ usage(cmd); > return(1); > } > > newcred = (fct)(oldpath, newpath, cred); > > fprintf(stdout, "%s", newcred); > > return(0);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 231905
:
149871
|
149872
|
149873
|
150251
|
150252
|
150253
|
150282