[Fedora-directory-commits] admservconsole build.properties,1.7,1.8
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/admservconsole
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31016/admservconsole
Modified Files:
build.properties
Log Message:
change version to 1.1.3
Index: build.properties
===================================================================
RCS file: /cvs/dirsec/admservconsole/build.properties,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- build.properties 15 Jul 2008 17:34:39 -0000 1.7
+++ build.properties 17 Dec 2008 16:04:08 -0000 1.8
@@ -21,7 +21,7 @@
lang=en
admservconsole.root=..
-admservconsole.version=1.1.2
+admservconsole.version=1.1.3
admservconsole.gen.version=1.1
brand=fedora
admservconsole.name=${brand}-admin-${admservconsole.version}
15 years, 3 months
[Fedora-directory-commits] directoryconsole build.properties, 1.9, 1.10
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/directoryconsole
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7635/directoryconsole
Modified Files:
build.properties
Log Message:
change version to 1.1.3
Index: build.properties
===================================================================
RCS file: /cvs/dirsec/directoryconsole/build.properties,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- build.properties 15 Jul 2008 17:49:02 -0000 1.9
+++ build.properties 17 Dec 2008 00:21:38 -0000 1.10
@@ -21,7 +21,7 @@
lang=en
ldapconsole.root=..
-ldapconsole.version=1.1.2
+ldapconsole.version=1.1.3
ldapconsole.gen.version=1.1
brand=fedora
ldapconsole.name=${brand}-ds-${ldapconsole.version}
15 years, 3 months
[Fedora-directory-commits] console build.properties,1.16,1.17
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/console
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2450/console
Modified Files:
build.properties
Log Message:
change version to 1.1.3
Index: build.properties
===================================================================
RCS file: /cvs/dirsec/console/build.properties,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- build.properties 15 Jul 2008 17:26:56 -0000 1.16
+++ build.properties 16 Dec 2008 23:38:28 -0000 1.17
@@ -23,7 +23,7 @@
console.root=.
console.version=11
-console.dotversion=1.1.2
+console.dotversion=1.1.3
console.dotgenversion=1.1
mcc.core=idm-console-mcc
15 years, 3 months
[Fedora-directory-commits] console/src/com/netscape/management/client/util ADUtil.java, NONE, 1.1
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/console/src/com/netscape/management/client/util
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1890/console/src/com/netscape/management/client/util
Added Files:
ADUtil.java
Log Message:
Resolves: bug 158334
Bug Description: WinSync Console: Handling of logonHours and
accountExpires incorrect.
Reviewed by: nhosoi (Thanks!)
Files: new file ADUtil.java
Fix Description: Added code to convert from Windows FILETIME to Java
time. Added special handling for the "Never Expires" value, which can
be the very large value or 0. The console now displays "Never Expires"
or the actual human readable value for the time.
As far as Logon Hours, it's just really messed up. I will open another
bug for that.
https://bugzilla.redhat.com/attachment.cgi?id=326573 - never expires
https://bugzilla.redhat.com/attachment.cgi?id=326574 - expires with date
Platforms tested: RHEL5
Flag Day: no
Doc impact: yes
--- NEW FILE ADUtil.java ---
/** BEGIN COPYRIGHT BLOCK
* Copyright (C) 2008 Red Hat, Inc.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version
* 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* END COPYRIGHT BLOCK **/
/**
* This class provides utility methods for dealing with Active Directory
* data.
*/
package com.netscape.management.client.util;
import java.util.Date;
public class ADUtil {
/**
* Some of the AD date/time attribute values are in Windows FILETIME
* format. This is a 64-bit value which is 100's of nanoseconds since 1/1/1601.
* Java uses 64-bit long - milliseconds since 1/1/1970
* AD_EPOCH is the difference in milliseconds between the FILETIME epoch and
* the java time epoch.
*/
static final long AD_EPOCH = 11644473600000L; /* millisecs */
static final long ACCOUNT_NEVER_EXPIRES = 9223372036854775807L;
static public Date convertToJavaDateTime(String adtimestr) {
if (adtimestr == null) {
return null;
}
Date dt = new Date();
long lts = 0;
try {
lts = Long.parseLong(adtimestr);
} catch (NumberFormatException nfe) {
Debug.print(0, "Invalid datetime from AD " + adtimestr);
return null;
}
if ((lts == 0) || (lts == ACCOUNT_NEVER_EXPIRES)) {
dt.setTime(-1L);
} else {
dt.setTime(lts/10000 - AD_EPOCH);
}
return dt;
}
static public String convertToFileTime(Date dt) {
String val;
if (dt == null) {
return null;
}
long lts = dt.getTime();
if (lts == -1L) {
val = Long.toString(ACCOUNT_NEVER_EXPIRES);
} else {
val = Long.toString((lts + AD_EPOCH)*10000);
}
return val;
}
static public boolean neverExpires(Date dt) {
if (dt == null) {
return true;
}
return dt.getTime() == -1L;
}
}
15 years, 3 months
[Fedora-directory-commits] console/src/com/netscape/management/client/ug PickerEditorResource.properties, 1.3, 1.4 ResEditorNTUser.java, 1.1.1.1, 1.2
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/console/src/com/netscape/management/client/ug
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1890/console/src/com/netscape/management/client/ug
Modified Files:
PickerEditorResource.properties ResEditorNTUser.java
Log Message:
Resolves: bug 158334
Bug Description: WinSync Console: Handling of logonHours and
accountExpires incorrect.
Reviewed by: nhosoi (Thanks!)
Files: new file ADUtil.java
Fix Description: Added code to convert from Windows FILETIME to Java
time. Added special handling for the "Never Expires" value, which can
be the very large value or 0. The console now displays "Never Expires"
or the actual human readable value for the time.
As far as Logon Hours, it's just really messed up. I will open another
bug for that.
https://bugzilla.redhat.com/attachment.cgi?id=326573 - never expires
https://bugzilla.redhat.com/attachment.cgi?id=326574 - expires with date
Platforms tested: RHEL5
Flag Day: no
Doc impact: yes
Index: PickerEditorResource.properties
===================================================================
RCS file: /cvs/dirsec/console/src/com/netscape/management/client/ug/PickerEditorResource.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PickerEditorResource.properties 10 Dec 2008 02:53:19 -0000 1.3
+++ PickerEditorResource.properties 16 Dec 2008 23:32:01 -0000 1.4
@@ -387,6 +387,7 @@
resourceEditor-errorText2=Assigning this value to a user will give this user privileged access.
resourceEditor-errorText3=Do you really want to use this value?
resourceEditor-errorTitle=Value Warning
+resourceEditor-NeverExpires=Never Expires
CALPage-displayName=Licenses
CALPage-ID=Licenses
CALPage-Title=To facilitate tracking of all Client Access Licenses (CAL), please indicate whether
Index: ResEditorNTUser.java
===================================================================
RCS file: /cvs/dirsec/console/src/com/netscape/management/client/ug/ResEditorNTUser.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ResEditorNTUser.java 18 Jul 2005 00:34:23 -0000 1.1.1.1
+++ ResEditorNTUser.java 16 Dec 2008 23:32:01 -0000 1.2
@@ -489,7 +489,14 @@
_tfWorkstationList.setText(_oldWorkstationList);
_oldExpiredDate = observable.get(_NT_USER_ACCT_EXPIRED,0);
- _lAccountExpired.setText(_oldExpiredDate);
+ Date dt = ADUtil.convertToJavaDateTime(_oldExpiredDate);
+ if (ADUtil.neverExpires(dt)) {
+ _lAccountExpired.setText(_resource.getString("resourceEditor", "NeverExpires"));
+ } else if (dt != null) {
+ _lAccountExpired.setText(dt.toString());
+ } else {
+ _lAccountExpired.setText("");
+ }
_newExpiredDate = _oldExpiredDate;
}
@@ -617,24 +624,19 @@
} else if (e.getSource()==_bExpiredDate)
{
// expire date
- String sFormat = "yyyyMMddHHmmss";
- SimpleDateFormat formatter = new SimpleDateFormat(sFormat);
- Date d = new Date();
- if (!_newExpiredDate.equals(""))
- {
- ParsePosition p = new ParsePosition(0);
- d = formatter.parse(_newExpiredDate,p);
- }
+ Date dt = ADUtil.convertToJavaDateTime(_newExpiredDate);
Calendar c = Calendar.getInstance();
- c.setTime(d);
+ if (!ADUtil.neverExpires(dt) && (dt != null)) {
+ c.setTime(dt);
+ }
DateTimePicker picker = new DateTimePicker(UtilConsoleGlobals.getActivatedFrame(),c);
picker.show();
if (!picker.isCancel())
{
c = picker.getCalendar();
- d = c.getTime();
- _newExpiredDate = formatter.format(d);
- _lAccountExpired.setText(_newExpiredDate);
+ dt = c.getTime();
+ _newExpiredDate = ADUtil.convertToFileTime(dt);
+ _lAccountExpired.setText(dt.toString());
}
}
}
15 years, 3 months
[Fedora-directory-commits] console/src/com/netscape/management/client/components Table.java, 1.1.1.1, 1.2 TableSorter.java, 1.1.1.1, 1.2
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/console/src/com/netscape/management/client/components
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22177/console/src/com/netscape/management/client/components
Modified Files:
Table.java TableSorter.java
Log Message:
Resolves: bug 198090
Bug Description: ACI editor table sort problem
Reviewed by: nkinder (Thanks!)
Fix Description: The main problem was that the Table Model code was not checking the type of the model change event, and was just unconditionally resetting/initializing the internal indexes array every time the checkbox was checked. This caused the table to revert back to the original order every time a checkbox was checked on or off. The only events which should cause the indexes to be reset/initialized are the INSERT and DELETE types, not the UPDATE type. There were also some problems with setting up the initial model, and I cleaned up some bogus code.
Platforms tested: RHEL5
Flag Day: no
Doc impact: no
Index: Table.java
===================================================================
RCS file: /cvs/dirsec/console/src/com/netscape/management/client/components/Table.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Table.java 18 Jul 2005 00:34:13 -0000 1.1.1.1
+++ Table.java 16 Dec 2008 22:16:09 -0000 1.2
@@ -96,7 +96,8 @@
*/
public Table(TableModel dm, boolean enableClientSideSorting)
{
- this((enableClientSideSorting ? new TableSorter(dm) : dm), null, null);
+ this(((enableClientSideSorting && !(dm instanceof ISortableTableModel)) ?
+ new TableSorter(dm) : dm), null, null);
this.enableClientSideSorting = enableClientSideSorting;
}
@@ -135,7 +136,6 @@
{
super(dm, cm, sm);
initialize();
- TableModel tm = getModel();
initializeColumnHeaders();
}
@@ -214,11 +214,16 @@
Enumeration e = tcm.getColumns();
int viewColumnIndex = 0;
TableModel tm = getModel();
+ // can't refer to this.enableClientSideSorting here because initializeColumnHeaders
+ // can be called from ctor, before this members are set - but the ctor will have
+ // wrapped tm in a sortable interface, so check the type of the model to see if it
+ // is sortable
+ boolean isSortable = (tm instanceof ISortableTableModel);
while (e.hasMoreElements())
{
int columnIndex = convertColumnIndexToModel(viewColumnIndex);
int alignment = getTableHeaderAlignmentByClass(tm.getColumnClass(columnIndex));
- TextHeaderRenderer headerRenderer = new TextHeaderRenderer(alignment, this.enableClientSideSorting);
+ TextHeaderRenderer headerRenderer = new TextHeaderRenderer(alignment, isSortable);
TableColumn column = (TableColumn)e.nextElement();
column.setHeaderRenderer(headerRenderer);
viewColumnIndex++;
@@ -318,29 +323,12 @@
*/
public void setModel(TableModel dataModel) throws IllegalArgumentException
{
-
- //tableModel = dataModel;
- if (this.enableClientSideSorting) {
- super.setModel(new TableSorter(dataModel));
- } else {
- super.setModel(dataModel);
- }
-
+ super.setModel(dataModel);
initializeColumnHeaders();
}
/**
- * Gets the data model for this table.
- *
- * @return TableModel the data source for this table
- * @see JTable#setModel()
- */
- public TableModel getModel() {
- return super.getModel();
- }
-
- /**
* Sets the column model for this table to newModel and registers
* for listener notifications from the new column model. Also sets
* the column model of the JTableHeader to columnModel.
Index: TableSorter.java
===================================================================
RCS file: /cvs/dirsec/console/src/com/netscape/management/client/components/TableSorter.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- TableSorter.java 18 Jul 2005 00:34:14 -0000 1.1.1.1
+++ TableSorter.java 16 Dec 2008 22:16:09 -0000 1.2
@@ -184,6 +184,10 @@
public void reallocateIndexes() {
int rowCount = model.getRowCount();
Debug.println(8, "TableSorter.reallocateIndexes: getRowCount=" + rowCount);
+ if ((indexes != null) && (rowCount == indexes.length)) {
+ Debug.println(8, "TableSorter.reallocateIndexes: the model row count is the same as our row count - no need to reallocate");
+ return;
+ }
// Set up a new array of indexes with the right number of elements
// for the new data model.
@@ -196,8 +200,13 @@
}
public void tableChanged(TableModelEvent e) {
- Debug.println(8, "TableSorter.tableChanged");
- reallocateIndexes();
+ Debug.println(8, "TableSorter.tableChanged");
+ if (e.getType() != TableModelEvent.UPDATE) {
+ Debug.println(8, "TableSorter.checkModel: table size was changed - need to reallocate indexes");
+ reallocateIndexes();
+ } else {
+ Debug.println(8, "TableSorter.checkModel: table size was not changed - no need to reallocate indexes");
+ }
super.tableChanged(e);
}
15 years, 3 months
[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/propedit DSEntryPanel.java, 1.2, 1.3
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/propedit
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20096/directoryconsole/src/com/netscape/admin/dirserv/propedit
Modified Files:
DSEntryPanel.java
Log Message:
Resolves: bug 179184
Bug Description: Advanced Properties window sorts by attribute name not "friendly name"
Reviewed by: nkinder (Thanks!)
Fix Description: Just call the showAllAttributes method at the end of the ctor. This method will sort the list in the correct order.
Platforms tested: RHEL5
Flag Day: no
Doc impact: no
Index: DSEntryPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/propedit/DSEntryPanel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DSEntryPanel.java 5 Dec 2008 23:46:25 -0000 1.2
+++ DSEntryPanel.java 16 Dec 2008 22:10:31 -0000 1.3
@@ -97,6 +97,8 @@
add("East", actionPane);
add( "Center", _centerPane );
+ // force redraw with correct sorting
+ showAllAttributes(_cbAllowedAttributes.isSelected());
}
private void createListOfForbiddenNamingAttributes() {
15 years, 3 months
[Fedora-directory-commits] console/src/com/netscape/management/client/security securityResource.properties, 1.2, 1.3
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/console/src/com/netscape/management/client/security
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19220/console/src/com/netscape/management/client/security
Modified Files:
securityResource.properties
Log Message:
fix spelling error
Index: securityResource.properties
===================================================================
RCS file: /cvs/dirsec/console/src/com/netscape/management/client/security/securityResource.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- securityResource.properties 15 Nov 2007 16:56:53 -0000 1.2
+++ securityResource.properties 16 Dec 2008 19:07:15 -0000 1.3
@@ -215,8 +215,8 @@
CertificateDetailDialog-country=Country
CertificateDetailDialog-email=E-mail
CertificateDetailDialog-locality=Locality
-CertificateDetailDialog-orgUnit=Origanization unit
-CertificateDetailDialog-org=Origanization
+CertificateDetailDialog-orgUnit=Organization unit
+CertificateDetailDialog-org=Organization
CertificateDetailDialog-state=State
CertificateDetailDialog-signature=Signature algorithm
CertificateDetailDialog-algorithm=Public key
15 years, 3 months
[Fedora-directory-commits] adminserver/admserv/cfgstuff stop-ds-admin.in, 1.1, 1.2
by Noriko Hosoi
Author: nhosoi
Update of /cvs/dirsec/adminserver/admserv/cfgstuff
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26076
Modified Files:
stop-ds-admin.in
Log Message:
Resolves: #191779
Summary: restart task confusion
Description: removing '-' from -PID not to send the signal to all the
processes belonging to the admin server process group.
Index: stop-ds-admin.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/stop-ds-admin.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- stop-ds-admin.in 11 May 2007 17:26:11 -0000 1.1
+++ stop-ds-admin.in 15 Dec 2008 21:39:30 -0000 1.2
@@ -23,7 +23,7 @@
PID_FILE=@piddir@/@pidfile@
if test -f $PID_FILE ; then
- kill -TERM -`cat $PID_FILE`
+ kill -TERM `cat $PID_FILE`
if test $? -ne 0 ; then
exit 1
fi
@@ -44,7 +44,7 @@
done
echo server not responding to exit command
echo killing process group
-kill -9 -`cat $PID_FILE`
+kill -9 `cat $PID_FILE`
rm $PID_FILE
exit 1
15 years, 3 months
[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/panel/replication ORCTask.java, 1.1.1.1, 1.2 ReplicationAgreement.java, 1.3, 1.4
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17612/directoryconsole/src/com/netscape/admin/dirserv/panel/replication
Modified Files:
ORCTask.java ReplicationAgreement.java
Log Message:
Resolves: bug 179193
Bug Description: Replication UI most of the time don't return consumer initialization error
Reviewed by: nkinder (Thanks!)
Fix Description: Just added a 3 second sleep after telling the server to perform the consumer init. This seems to give the server time enough to attempt the init, fail, and set an appropriate error code.
Platforms tested: RHEL5
Flag Day: no
Doc impact: no
Index: ORCTask.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/ORCTask.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ORCTask.java 18 Jul 2005 00:56:08 -0000 1.1.1.1
+++ ORCTask.java 15 Dec 2008 21:04:13 -0000 1.2
@@ -67,6 +67,8 @@
/* send start replication request */
m_agreement.updateEntry(mods);
+ /* sleep for a moment to let status accrue */
+ Thread.sleep(3000);
/* The consumer initialization attribute was correctly added.
We check until we have the first update result... */
m_firstUpdateStatus = 0;
@@ -112,6 +114,9 @@
m_status = me.getLDAPResultCode();
m_firstUpdateMessage = me.getLDAPErrorMessage();
m_dlg.stop ();
+ } catch (InterruptedException e) {
+ Debug.println ("Sleep interrupted: Exception occured during ORC: " + e);
+ m_status = -1;
}
m_dlg.stop ();
Index: ReplicationAgreement.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/ReplicationAgreement.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ReplicationAgreement.java 24 Nov 2008 16:09:23 -0000 1.3
+++ ReplicationAgreement.java 15 Dec 2008 21:04:13 -0000 1.4
@@ -1400,6 +1400,8 @@
return;
}
+ Debug.println(9, "ReplicationAgreement.updateReplicaStatus: status " +
+ "entry is " + entry.toString());
String val =
DSUtil.getAttrValue(entry,
ReplicationTool.REPLICA_LAST_UPDATE_STATUS_ATTR);
15 years, 3 months