}
sudo_lbuf_append(lbuf, ") ");
+ /* Get the sudoNotBefore and sudoNotAfter Values from the entry */
+ bv = ldap_get_values_len(ld, entry, "sudoNotBefore");
+ if (bv != NULL) {
+ for (p = bv; *p != NULL; p++) {
+ sudo_lbuf_append(lbuf, "NOTBEFORE=%s ", (*p)->bv_val);
+ }
+ ldap_value_free_len(bv);
+ }
+ bv = ldap_get_values_len(ld, entry, "sudoNotAfter");
+ if (bv != NULL) {
+ for (p = bv; *p != NULL; p++) {
+ sudo_lbuf_append(lbuf, "NOTAFTER=%s ", (*p)->bv_val);
+ }
+ ldap_value_free_len(bv);
+ }
+
/* get the Option Values from the entry */
bv = ldap_get_values_len(ld, entry, "sudoOption");
if (bv != NULL) {
sudo_lbuf_append(lbuf, "\n");
}
+ /* Get the sudoNotBefore and sudoNotAfter Values from the entry */
+ bv = ldap_get_values_len(ld, entry, "sudoNotBefore");
+ if (bv != NULL) {
+ sudo_lbuf_append(lbuf, " NotBefore: ");
+ for (p = bv; *p != NULL; p++) {
+ sudo_lbuf_append(lbuf, "%s%s", p != bv ? ", " : "", (*p)->bv_val);
+ }
+ ldap_value_free_len(bv);
+ sudo_lbuf_append(lbuf, "\n");
+ }
+ bv = ldap_get_values_len(ld, entry, "sudoNotAfter");
+ if (bv != NULL) {
+ sudo_lbuf_append(lbuf, " NotAfter: ");
+ for (p = bv; *p != NULL; p++) {
+ sudo_lbuf_append(lbuf, "%s%s", p != bv ? ", " : "", (*p)->bv_val);
+ }
+ ldap_value_free_len(bv);
+ sudo_lbuf_append(lbuf, "\n");
+ }
+
/* get the Option Values from the entry */
bv = ldap_get_values_len(ld, entry, "sudoOption");
if (bv != NULL) {