summaryrefslogtreecommitdiffstats
path: root/ldap/admin/src/ds_listdb.c
blob: 5d0c06adb4d2ceeaf7c98c208e65a7ffd3a82307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/** BEGIN COPYRIGHT BLOCK
 * Copyright 2001 Sun Microsystems, Inc.
 * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
 * All rights reserved.
 * END COPYRIGHT BLOCK **/
/* 
 * List the database backup directories.
 * No HTML - this is for DS 4.0.
 *
 * Rob Weltman
 */

#include <stdio.h>
#include <stdlib.h>
#include "dsalib.h"

int main(int argc, char *argv[], char *envp[])
{
    char **bak_dirs;

    ds_become_localuser (ds_get_config (DS_REAL_CONFIG));

	/* Tell the receiver we are about to start sending data */
	fprintf(stdout, "\n");
	bak_dirs = ds_get_bak_dirs();
	if ( bak_dirs != NULL )	/* no error */ {
		char **cur_file = bak_dirs;
		while ( *cur_file != NULL ) {
			fprintf(stdout, "%s\n", *cur_file);
			cur_file++;
		}
    }

    ds_become_original();

    return 0;
}