Applying LDAP patches

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Applying LDAP patches

Wicus
Hi,

Can someone please confirm / amend on how to apply the following JIRA framework pacthes @ https://issues.apache.org/jira/browse/OFBIZ-811 correctly?...

1.) "LoginServices.java", not being a patch, is simply copied to "framework/common/src/org/ofbiz/common/Login/" as could be derived from the the "LoginServices.java.diff" patch.

2.) Am I correct in copying all the ".patch" and ".diff" files to the /ofbiz directory and editing "security.properties.diff" as follows:-

+ldap.host.name=myserver.dyndns.org                         <----------
+ldap.host.port=389
+ldap.baseDN=dc=ourcompany,dc=co,dc=us                 <----------
+ldap.protocol=3
+ldap.user=cn=xxx,ou=xxx,ou=xxx,dc=xxx,dc=xx            <---------- Not to sure here yet ???
+ldap.password=pass
+login.useLDAP=false

3.) Apply patches via:-

$patch -p0 < "pathfilename"


RESULTS:-

$patch -p0 < ldap_authentication.patch

(Stripping trailing CRs from patch.)
patching file framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java
(Stripping trailing CRs from patch.)
patching file framework/common/src/org/ofbiz/common/login/LoginServices.java
Hunk #1 succeeded at 39 (offset 4 lines).
Hunk #2 FAILED at 69.
1 out of 2 hunks FAILED -- saving rejects to file framework/common/src/org/ofbiz/common/login/LoginServices.java.rej
(Stripping trailing CRs from patch.)
patching file framework/security/config/jndiLdap.properties
(Stripping trailing CRs from patch.)
patching file framework/security/config/security.properties


$ patch -p0 < LoginServices.java.diff
(Stripping trailing CRs from patch.)
patching file framework/common/src/org/ofbiz/common/login/LoginServices.java
Hunk #1 FAILED at 144.
Hunk #2 FAILED at 791.
2 out of 2 hunks FAILED -- saving rejects to file framework/common/src/org/ofbiz/common/login/LoginServices.java.rej

$ patch -p0 < security.properties.diff
(Stripping trailing CRs from patch.)
patching file framework/security/config/security.properties
Hunk #1 FAILED at 54.
1 out of 1 hunk FAILED -- saving rejects to file framework/security/config/security.properties.rej


Once patched correctly,will these patches ALSO allow Windows 2000 Server (Active Directory) authentication ?

Thanks in advance.
 

Reply | Threaded
Open this post in threaded view
|

Re: Applying LDAP patches

Adrian Crum
I just updated the patch last night and it should work with the latest
SVN revision. I would recommend using the latest patch - it's an
improved implementation and it has been tested.

The patch should be applied to the ofbiz root folder. Use whatever tool
you are comfortable with. I'm on Windows, so I use Tortoise.

Once the patch is applied, it will authenticate a user in any LDAP
directory (including AD). It's not sophisticated - as the Jira comments
make clear.

-Adrian

Wicus wrote:

> Hi,
>
> Can someone please confirm / amend on how to apply the following JIRA
> framework pacthes @ https://issues.apache.org/jira/browse/OFBIZ-811
> correctly?...
>
> 1.) "LoginServices.java", not being a patch, is simply copied to
> "framework/common/src/org/ofbiz/common/Login/" as could be derived from the
> the "LoginServices.java.diff" patch.
>
> 2.) Am I correct in copying all the ".patch" and ".diff" files to the /ofbiz
> directory and editing "security.properties.diff" as follows:-
>
> +ldap.host.name=myserver.dyndns.org                         <----------
> +ldap.host.port=389
> +ldap.baseDN=dc=ourcompany,dc=co,dc=us                 <----------
> +ldap.protocol=3
> +ldap.user=cn=xxx,ou=xxx,ou=xxx,dc=xxx,dc=xx            <---------- Not to
> sure here yet ???
> +ldap.password=pass
> +login.useLDAP=false
>
> 3.) Apply patches via:-
>
> $patch -p0 < "pathfilename"
>
>
> RESULTS:-
>
> $patch -p0 < ldap_authentication.patch
>
> (Stripping trailing CRs from patch.)
> patching file
> framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java
> (Stripping trailing CRs from patch.)
> patching file framework/common/src/org/ofbiz/common/login/LoginServices.java
> Hunk #1 succeeded at 39 (offset 4 lines).
> Hunk #2 FAILED at 69.
> 1 out of 2 hunks FAILED -- saving rejects to file
> framework/common/src/org/ofbiz/common/login/LoginServices.java.rej
> (Stripping trailing CRs from patch.)
> patching file framework/security/config/jndiLdap.properties
> (Stripping trailing CRs from patch.)
> patching file framework/security/config/security.properties
>
>
> $ patch -p0 < LoginServices.java.diff
> (Stripping trailing CRs from patch.)
> patching file framework/common/src/org/ofbiz/common/login/LoginServices.java
> Hunk #1 FAILED at 144.
> Hunk #2 FAILED at 791.
> 2 out of 2 hunks FAILED -- saving rejects to file
> framework/common/src/org/ofbiz/common/login/LoginServices.java.rej
>
> $ patch -p0 < security.properties.diff
> (Stripping trailing CRs from patch.)
> patching file framework/security/config/security.properties
> Hunk #1 FAILED at 54.
> 1 out of 1 hunk FAILED -- saving rejects to file
> framework/security/config/security.properties.rej
>
>
> Once patched correctly,will these patches ALSO allow Windows 2000 Server
> (Active Directory) authentication ?
>
> Thanks in advance.
>  
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Applying LDAP patches

Wicus
Adrian,

Am I correct in thinking that I ONLY need to apply the "ldap_authentication.patch" patch....? (None of the others)

As I am using Fedora 8, this is applied via "$ patch -p0 < ldap_authentication.patch" from the /ofbiz root folder and all should be 100% without ANY other amendments.

P.S - Where does one specify the LDAP / AD server to use for authentication?...

Thanks

Wicus

Adrian Crum wrote
I just updated the patch last night and it should work with the latest
SVN revision. I would recommend using the latest patch - it's an
improved implementation and it has been tested.

The patch should be applied to the ofbiz root folder. Use whatever tool
you are comfortable with. I'm on Windows, so I use Tortoise.

Once the patch is applied, it will authenticate a user in any LDAP
directory (including AD). It's not sophisticated - as the Jira comments
make clear.

-Adrian

Wicus wrote:
> Hi,
>
> Can someone please confirm / amend on how to apply the following JIRA
> framework pacthes @ https://issues.apache.org/jira/browse/OFBIZ-811
> correctly?...
>
> 1.) "LoginServices.java", not being a patch, is simply copied to
> "framework/common/src/org/ofbiz/common/Login/" as could be derived from the
> the "LoginServices.java.diff" patch.
>
> 2.) Am I correct in copying all the ".patch" and ".diff" files to the /ofbiz
> directory and editing "security.properties.diff" as follows:-
>
> +ldap.host.name=myserver.dyndns.org                         <----------
> +ldap.host.port=389
> +ldap.baseDN=dc=ourcompany,dc=co,dc=us                 <----------
> +ldap.protocol=3
> +ldap.user=cn=xxx,ou=xxx,ou=xxx,dc=xxx,dc=xx            <---------- Not to
> sure here yet ???
> +ldap.password=pass
> +login.useLDAP=false
>
> 3.) Apply patches via:-
>
> $patch -p0 < "pathfilename"
>
>
> RESULTS:-
>
> $patch -p0 < ldap_authentication.patch
>
> (Stripping trailing CRs from patch.)
> patching file
> framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java
> (Stripping trailing CRs from patch.)
> patching file framework/common/src/org/ofbiz/common/login/LoginServices.java
> Hunk #1 succeeded at 39 (offset 4 lines).
> Hunk #2 FAILED at 69.
> 1 out of 2 hunks FAILED -- saving rejects to file
> framework/common/src/org/ofbiz/common/login/LoginServices.java.rej
> (Stripping trailing CRs from patch.)
> patching file framework/security/config/jndiLdap.properties
> (Stripping trailing CRs from patch.)
> patching file framework/security/config/security.properties
>
>
> $ patch -p0 < LoginServices.java.diff
> (Stripping trailing CRs from patch.)
> patching file framework/common/src/org/ofbiz/common/login/LoginServices.java
> Hunk #1 FAILED at 144.
> Hunk #2 FAILED at 791.
> 2 out of 2 hunks FAILED -- saving rejects to file
> framework/common/src/org/ofbiz/common/login/LoginServices.java.rej
>
> $ patch -p0 < security.properties.diff
> (Stripping trailing CRs from patch.)
> patching file framework/security/config/security.properties
> Hunk #1 FAILED at 54.
> 1 out of 1 hunk FAILED -- saving rejects to file
> framework/security/config/security.properties.rej
>
>
> Once patched correctly,will these patches ALSO allow Windows 2000 Server
> (Active Directory) authentication ?
>
> Thanks in advance.
>  
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Applying LDAP patches

Adrian Crum
In reply to this post by Adrian Crum
Wicus,

I think I understand your confusion now. Just apply the
ldap_authentication.patch file to your local copy and ignore the other
files in the Jira issue. You only need the one patch file.

-Adrian

Adrian Crum wrote:

> I just updated the patch last night and it should work with the latest
> SVN revision. I would recommend using the latest patch - it's an
> improved implementation and it has been tested.
>
> The patch should be applied to the ofbiz root folder. Use whatever tool
> you are comfortable with. I'm on Windows, so I use Tortoise.
>
> Once the patch is applied, it will authenticate a user in any LDAP
> directory (including AD). It's not sophisticated - as the Jira comments
> make clear.
>
> -Adrian
>
> Wicus wrote:
>> Hi,
>>
>> Can someone please confirm / amend on how to apply the following JIRA
>> framework pacthes @ https://issues.apache.org/jira/browse/OFBIZ-811
>> correctly?...
>>
>> 1.) "LoginServices.java", not being a patch, is simply copied to
>> "framework/common/src/org/ofbiz/common/Login/" as could be derived
>> from the
>> the "LoginServices.java.diff" patch.
>>
>> 2.) Am I correct in copying all the ".patch" and ".diff" files to the
>> /ofbiz
>> directory and editing "security.properties.diff" as follows:-
>> +ldap.host.name=myserver.dyndns.org                         <----------
>> +ldap.host.port=389
>> +ldap.baseDN=dc=ourcompany,dc=co,dc=us                 <----------
>> +ldap.protocol=3
>> +ldap.user=cn=xxx,ou=xxx,ou=xxx,dc=xxx,dc=xx            <----------
>> Not to
>> sure here yet ???
>> +ldap.password=pass
>> +login.useLDAP=false
>>
>> 3.) Apply patches via:-
>>
>> $patch -p0 < "pathfilename"
>>
>>
>> RESULTS:-
>>
>> $patch -p0 < ldap_authentication.patch
>>
>> (Stripping trailing CRs from patch.)
>> patching file
>> framework/common/src/org/ofbiz/common/login/LdapAuthenticationServices.java
>>
>> (Stripping trailing CRs from patch.)
>> patching file
>> framework/common/src/org/ofbiz/common/login/LoginServices.java
>> Hunk #1 succeeded at 39 (offset 4 lines).
>> Hunk #2 FAILED at 69.
>> 1 out of 2 hunks FAILED -- saving rejects to file
>> framework/common/src/org/ofbiz/common/login/LoginServices.java.rej
>> (Stripping trailing CRs from patch.)
>> patching file framework/security/config/jndiLdap.properties
>> (Stripping trailing CRs from patch.)
>> patching file framework/security/config/security.properties
>>
>>
>> $ patch -p0 < LoginServices.java.diff
>> (Stripping trailing CRs from patch.)
>> patching file
>> framework/common/src/org/ofbiz/common/login/LoginServices.java
>> Hunk #1 FAILED at 144.
>> Hunk #2 FAILED at 791.
>> 2 out of 2 hunks FAILED -- saving rejects to file
>> framework/common/src/org/ofbiz/common/login/LoginServices.java.rej
>>
>> $ patch -p0 < security.properties.diff
>> (Stripping trailing CRs from patch.)
>> patching file framework/security/config/security.properties
>> Hunk #1 FAILED at 54.
>> 1 out of 1 hunk FAILED -- saving rejects to file
>> framework/security/config/security.properties.rej
>>
>>
>> Once patched correctly,will these patches ALSO allow Windows 2000 Server
>> (Active Directory) authentication ?
>>
>> Thanks in advance.
>>  
>>
>>
>