Bug 726282 - DSGW can't change "userpassword" and "sambantpassword" fields synchronously
Summary: DSGW can't change "userpassword" and "sambantpassword" fields synchronously
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: 389
Classification: Retired
Component: UI - Gateway/Phonebook
Version: 1.1.0
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-28 04:32 UTC by Alexander Popov
Modified: 2015-11-13 20:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-13 20:12:19 UTC
Embargoed:


Attachments (Terms of Use)
Changed domodify.c (36.59 KB, text/x-csrc)
2011-07-28 04:32 UTC, Alexander Popov
no flags Details

Description Alexander Popov 2011-07-28 04:32:02 UTC
Created attachment 515623 [details]
Changed domodify.c

Description of actual problem:

When Samba uses ldapsam backend it may be necessary to change "userpassword" and "sambantpassword" fields synchronously. But password changing in DSGW changes only "userpassword" field in Directory Server.

To allow this feature I've changed 2 files in the source code of DSGW:
1. I've added this definition to dsgw.h:
      #define DSGW_ATTRTYPE_SAMBANTPASSWORD   "sambaNTPassword"
2. I've changed domodify.c. Please look at the attachment.

DSGW with these modifications was tested and worked fine for Red Hat Directory Server 8.1.0-1 and Samba 3.0.33.

If this way of solving the problem is acceptable, it might be better to build this new feature in DSGW with more flex (allow switch it off and on through the configuration file).

Additional info:
The modification of domodify.c is based on the code of mkntpwd tool (the work of Anton Roeckseisen anton) and also contains md4.c source from Samba source code.

Comment 2 Rich Megginson 2011-08-25 15:44:24 UTC
We use the following to build our code:

CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic" configure --with-openldap ...

The -Wall causes these warnings (on RHEL6.1):

../dsgw.git/domodify.c: In function ‘getnthash’:
../dsgw.git/domodify.c:810: warning: pointer targets in passing argument 2 of ‘mdfour’ differ in signedness
../dsgw.git/domodify.c:57: note: expected ‘unsigned char *’ but argument is of type ‘char *’
../dsgw.git/domodify.c:812: warning: pointer targets in passing argument 1 of ‘PutBinHash2Hex’ differ in signedness
../dsgw.git/domodify.c:42: note: expected ‘char *’ but argument is of type ‘unsigned char *’

Please fix these warnings and update the patch.  Thanks.

Comment 3 Martin Kosek 2012-01-04 13:22:27 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/37

Comment 5 Noriko Hosoi 2015-11-13 20:12:19 UTC
Closing this bug due to moving to the trac system.

https://fedorahosted.org/389/ticket/37


Note You need to log in before you can comment on or make changes to this bug.