Diff
81 commits, 115 files changed
+18235 -4046

Updating ES translation for 1.1.0
Héctor Daniel Cabrera • 14 years ago  
Update ES translation
Héctor Daniel Cabrera • 14 years ago  
Updating ES translation for 1.1.0
Héctor Daniel Cabrera • 14 years ago  
Updating ES translation
Héctor Daniel Cabrera • 14 years ago  
Fixed alignment problems in nss client/server
George McCollister • 14 years ago  
file modified
+3 -1
@@ -58,4 +58,6 @@

  	done

  

  docs:

- 	$(MAKE) -C src $@

+ 	for subdir in $(SUBDIRS); do \

+ 		$(MAKE) -C $$subdir $@; \

+ 	done

file modified
+6
@@ -1,5 +1,6 @@

  ACLOCAL_AMFLAGS = -I m4

  SUBDIRS = trace collection ini dhash path_utils refarray

+ DOCDIRS = collection ini

  

  dist_noinst_DATA = \

      m4
@@ -25,3 +26,8 @@

  	for subdir in $(SUBDIRS); do \

  		$(MAKE) -C $$subdir $@; \

  	done

+ 

+ docs:

+ 	for subdir in $(DOCDIRS); do \

+ 		$(MAKE) -C $$subdir $@; \

+ 	done

@@ -1,6 +1,8 @@

  #DEBUG_FLAGS=@DEBUG_VAR@

  TRACE_LEVEL=@TRACE_VAR@

  

+ DOXYGEN = @DOXYGEN@

+ 

  topdir=$(srcdir)/..

  

  AM_CFLAGS =
@@ -50,6 +52,22 @@

  collection_queue_ut_SOURCES = collection_queue_ut.c

  collection_queue_ut_LDADD = libcollection.la

  

+ if HAVE_DOXYGEN

+ docs:

+ # A temp way of building docs until we hook into the package build

+ 	rm -fR doc

+ 	mkdir -p doc

+ 	$(DOXYGEN) collection.cfg.doxy

+ else

+ docs:

+ 	@echo "Doxygen not installed, cannot generate documentation"

+ 	@exit 1

+ endif

+ 

+ 

  TESTS = collection_ut collection_stack_ut collection_queue_ut

  

  tests: all $(check_PROGRAMS)

+ 

+ clean-local:

+ 	rm -Rf doc

@@ -1,2 +0,0 @@

- Documentation for libcollection can be found in collection.h and

- collection_tools.h

The added file is too large to be shown here, see it at: common/collection/collection.cfg.doxy.in
file modified
+2917 -845
@@ -24,580 +24,2474 @@

  

  #include <stdint.h>

  

- #ifndef EOK

- #define EOK 0

- #endif

- 

- #define COL_TYPE_STRING          0x00000001 /* For elements of type string the

-                                                lenght includes the trailing 0 */

- #define COL_TYPE_BINARY          0x00000002

- #define COL_TYPE_INTEGER         0x00000004

- #define COL_TYPE_UNSIGNED        0x00000008

- #define COL_TYPE_LONG            0x00000010

- #define COL_TYPE_ULONG           0x00000020

- #define COL_TYPE_DOUBLE          0x00000040

- #define COL_TYPE_BOOL            0x00000080

- #define COL_TYPE_COLLECTION      0x00000100 /* The item of this type denotes

-                                                that starting element of a

-                                                collection */

- #define COL_TYPE_COLLECTIONREF   0x00000200 /* An item of this type is a pointer

-                                                to an existing external

-                                                collection */

- #define COL_TYPE_END             0x10000000 /* Special type that denotes the end

-                                                of the collection. Useful when

-                                                traversing collections */

- #define COL_TYPE_ANY             0x0FFFFFFF /* Special type that denotes any.

-                                                Useful when traversing

-                                                collections */

- 

- 

- /* Default class for a free form collection */

- #define COL_CLASS_DEFAULT      0

- 

- /* The modes that define how one collection can be added to another */

- 

- #define COL_ADD_MODE_REFERENCE 0    /* The collection will contain a pointer

-                                      * to another */

- #define COL_ADD_MODE_EMBED     1    /* The collection will become part of

-                                      * another collection.

-                                      * After this operation the handle should

-                                      * not be used or freed.

-                                      * Can't be done more than once.

-                                      * If the collection is referenced by

-                                      * another collection, the operation will

-                                      * fail. */

- #define COL_ADD_MODE_CLONE     2    /* Creates a deep copy of a collection with

-                                      * its sub collections */

- #define COL_ADD_MODE_FLAT      3    /* Creates a deep copy of a collection with

-                                      * its sub collections flattening and NOT

-                                      * resolving duplicates.

-                                      */

- #define COL_ADD_MODE_FLATDOT   4    /* Creates a deep copy of a collection with

-                                      * its sub collections flattening and NOT

-                                      * resolving duplicates. Names are contructed

-                                      * in dotted notation.

-                                      * For example the subcollection

-                                      * named "sub" containing "foo" and

-                                      * "bar" will be flattened as:

-                                      * "sub.foo", "sub.bar".

-                                      */

- 

- /* Modes how the collection is traversed */

- #define COL_TRAVERSE_DEFAULT  0x00000000  /* Traverse all items */

- #define COL_TRAVERSE_ONELEVEL 0x00000001  /* Flag to traverse only top level

-                                            * ignored if the IGNORE flag is

-                                            * specified */

- #define COL_TRAVERSE_END      0x00000002  /* Call the handler once more when the

-                                            * end of the collection is reached.

-                                            * Good for processing nested

-                                            * collections.

-                                            */

- #define COL_TRAVERSE_IGNORE   0x00000004  /* Ignore sub collections as if none

-                                            * is present */

- #define COL_TRAVERSE_FLAT     0x00000008  /* Flatten the collection. */

- 

- 

- /* Additional iterator flags

-  * NOTE: ignored by traverse functions */

- #define COL_TRAVERSE_SHOWSUB  0x00010000  /* Include headers of sub collections

-                                            * By default iterators return just

-                                            * references and skips headers.

-                                            * Ignored if the ONELEVEL flag is

-                                            * specified and not ignored.

-                                            * Ignored if the FLAT flag is

-                                            * specified. */

- #define COL_TRAVERSE_ONLYSUB  0x00020000  /* Show the header of the sub

-                                            * collection instead of reference.

-                                            * Ignored if the ONELEVEL flag is

-                                            * specified and not ignored.

-                                            * Ignored if the FLAT flag is

-                                            * specified. */

- 

- /* NOTE COL_TRAVERSE_FLAT, COL_TRAVERSE_SHOWSUB, COL_TRAVERSE_ONLYSUB

-  * are mutually exclusive flags. If combined together

-  * results will be unpredictable.

-  * DO NOT MIX THEM IN ONE ITERATOR.

-  */

- 

- 

- /* Modes accepted by copy collection function */

- #define COL_COPY_NORMAL         0    /* Deep copy. Referenced collections

-                                       * of the donor are copied as sub

-                                       * collections.

-                                       */

- #define COL_COPY_FLAT           1    /* Deep copy. Collection is flattend. */

- #define COL_COPY_FLATDOT        2    /* Deep copy. Collection is flattend.

-                                       * Names are concatenated with dot.

-                                       */

- #define COL_COPY_KEEPREF        3    /* Deep copy but leave references

-                                       * as references.

-                                       */

- #define COL_COPY_TOP            4    /* Copy only top level

-                                       */

- 

- /* Match values */

- #define COL_NOMATCH 0

- #define COL_MATCH   1

- 

- /* Deapth for iteraor depth allocation block */

- #define STACK_DEPTH_BLOCK   15

- 

- /* Public declaration of the private data */

- #ifndef COLLECTION_PRIV_H

- /* Structure that holds one property. */

- struct collection_item;

- 

- /* Your implementation can assume that following members

-  * will always be members of the collection_item.

-  * but you should use get_item_xxx functions to get them.

-  *   char *property;

-  *   int property_len;

-  *   int type;

-  *   int length;

-  *   void *data;

-  */

- 

- 

- /* Internal iterator structure */

- struct collection_iterator;

- #endif /* COLLECTION_PRIV_H */

- 

- /* IMPORTANT - the collection is a set of items of different type.

-  * There is always a header item in any collection that starts the collection.

-  * Most of the functions in the interface (unless explicitly stated otherwise)

-  * assume that the collection_item * argument points to the header element.

-  * Passing in elements extracted from the middle of a collection to functions

-  * that expect header elements is illegal. There might be not enough checking

-  * at the moment but this will be enforced in future versions of the library.

- 

-  * IMPORTANT - To better understand how collections work imagine travel bags.

+ /** @mainpage The COLLECTION interface

+  * The collection is a set of items of different types.

+  *

+  * To better understand how collections work imagine travel bags.

   * They usually come in different sizes and one can put a bag in a bag when

   * they put away to the shelf in a garage or closet. Collection is such bag

   * except that you can put other bags into each other even if they are not

-  * empty.

+  * empty.<br>

   * When you put items into a bag you do not see the contents of the bag.

   * You just hold the bag. How many other bags inside this bag you do not know.

   * But you might know that you put a "wallet" somewhere there.

   * You ask the bag you hold: "find my wallet and give it to me".

   * get_item function will return you the item that is your "wallet".

   * You can then change something or just get information about the item you

-  * retrieved. But in most cases you do not the wallet itself. You want to get

-  * something from the wallet or put something into it. IMO money would be an

-  * obvious choice. To do this you use update_xxx_property functions.

+  * retrieved. But in most cases you do not need the wallet itself. You want to

+  * get something from the wallet or put something into it. IMO money would

+  * be an obvious choice. To do this you use update_xxx_property functions.<br>

   * There might be a bag somewhere deep and you might want to add something to

   * it. add_xxx_property_xxx functions allow you to specify sub collection you

   * want the item to be added to. If this sub collection argument is NULL top

-  * level collection is assumed.

-  * The search in the collections users a "x!y!z" notation to refer to an item (or

+  * level collection is assumed.<br>

+  * The search in the collections uses a "x!y!z" notation to refer to an item (or

   * property). You can search for "wallet" and it will find any first instance of

   * the "wallet" in your luggage. But you might have two wallets. One is yours and

   * another is your significant other's. So you might say find "my!wallet".

-  * It will find wallet in your bad (collection) named "my". This collection can

+  * It will find wallet in your bag (collection) named "my". This collection can

   * be many levels deep inside other collections. You do not need to know the

   * full path to get to it. But if you have the full path you can use the fill

-  * path like this "luggage!newbags!my!wallet".

+  * path like this "luggage!newbags!my!wallet".<br>

   * It is useful to be able to put bags into bags as well as get them out of each

   * other. When the collection is created the header keeps a reference count on

   * how many copies of the collection are known to the world. So one can put a

-  * collection into collection and give up its access to it (embed) of still hold

+  * collection into collection and give up its access to it (embed) or still hold

   * to the reference. By embedding the collection the caller effectively gives

-  * up its responsibility to destroy the collection after it is used.

+  * up its responsibility to destroy the collection after it is used.<br>

   * By extracting reference from an internal collection the caller gains access

   * to the collection directly and thus has responsibility to destroy it after

   * use.

-  * Characters with codes less than space in ASCII table are illegal for property

-  * names.

-  * Character '!' also illegal in property name and reserved for "x!y!z" notation.

+  *

+  * Internally collection is implemented as a link list rather than a hash

+  * table.

+  * This makes it suitable for small (dozens of items) sets of data for which

+  * the order is important. Thus the collection properties and sub collections

+  * can be used to model objects like a book case. Imagine a book case that

+  * consists of multiple shelves. You can perform operations like "add a new

+  * shelf after second shelf" or "put a book on the 4th shelf right before

+  * the book with the red cover."

+  *

+  * A bit of terminology:

+  * - <b>collection</b> - an object implemented as a link list that holds

+  *                       properties (attributes).

+  * - <b>property</b>  - a named logical element of the collection.

+  * - <b>item</b>    - physical element of the collection, think about it

+  *                    as a node in the link list.

+  * - <b>value</b> - data associated with the property.

+  * - <b>type</b> - type of the data associated with a property.

+  * - <b>length</b> - length of the data associated with the property.

+  * - <b>sub collection</b> - collection embedded into another collection.

+  *                         It is a property with the value of a special

+  *                         type. The name of the property that denotes

+  *                         a sub collection can be different from the name

+  *                         of the collection it refers to.

+  * - <b>traverse</b> - call a function that will internally iterate

+  *                     through a collection and do something with its

+  *                     elements.

+  * - <b>iterate</b> - step through a collection yourselves.

+  *

+  * Characters with codes less than space in ASCII table are illegal for

+  * property names.

+  * Character '!' also illegal in a property or collection name and

+  * reserved for "x!y!z" notation.

+  *

+  * There is always a header item in any collection that starts the collection.

+  * Most of the functions in the interface (unless explicitly stated otherwise)

+  * assume that the collection_item * argument points to the header element.

+  * Passing in elements extracted from the middle of a collection to functions

+  * that expect header elements is illegal. There might be not enough checking

+  * at the moment but this will be enforced in future versions of the library.

+  *

+  */

+ 

+ #ifndef EOK

+ #define EOK 0

+ #endif

+ 

+ /**

+  * @defgroup collection COLLECTION interface

+  * @{

+  */

+ 

+ /**

+  * @brief Default class for a free form collection.

+  */

+ #define COL_CLASS_DEFAULT      0

+ 

+ /**

+  * @brief Value indicates that property is not found.

+  *

+  * Used in search functions.

+  */

+ #define COL_NOMATCH 0

+ /**

+  * @brief Value indicates that property is found.

+  *

+  * Used in search functions.

+  */

+ #define COL_MATCH   1

+ 

+ 

+ /**

+  * @defgroup coltypes Type definition constants

+  * @{

+  */

+ /**

+  * @brief Indicates that property is of type "string".

+  *

+  * For elements of type string the length includes the trailing 0.

+  */

+ #define COL_TYPE_STRING          0x00000001

+ /** @brief Indicates that property is of type "binary". */

+ #define COL_TYPE_BINARY          0x00000002

+ /** @brief Indicates that property is of type "integer". */

+ #define COL_TYPE_INTEGER         0x00000004

+ /** @brief Indicates that property is of type "unsigned". */

+ #define COL_TYPE_UNSIGNED        0x00000008

+ /** @brief Indicates that property is of type "long". */

+ #define COL_TYPE_LONG            0x00000010

+ /** @brief Indicates that property is of type "unsigned long". */

+ #define COL_TYPE_ULONG           0x00000020

+ /** @brief Indicates that property is of type "double". */

+ #define COL_TYPE_DOUBLE          0x00000040

+ /** @brief Indicates that property is of Boolean type. */

+ #define COL_TYPE_BOOL            0x00000080

+ /**

+  * @brief Indicates that property is of type "collection".

+  *

+  * The item of this type denotes that starting element of a

+  * collection.

+  */

+ #define COL_TYPE_COLLECTION      0x00000100

+ /**

+  * @brief Indicates that property is of type "sub collection".

+  *

+  * An item of this type is a pointer to an existing external

+  * collection.

+  */

+ #define COL_TYPE_COLLECTIONREF   0x00000200

+ /**

+  * @brief Special type that denotes the end of the collection.

+  *

+  * Useful when traversing collections.

+  */

+ #define COL_TYPE_END             0x10000000

+ /**

+  * @brief Special type that denotes any property in the collection.

+  *

+  * Useful when traversing collection and searching for a property

+  * of unknown type but known name.

+  */

+ #define COL_TYPE_ANY             0x0FFFFFFF

+ /**

+  * @}

+  */

+ 

+ 

+ /**

+  * @defgroup addmodes Constants defining add modes

+  *

+  * The following constants define how one collection can be added to another.

+  *

+  * @{

+  */

+ /** @brief Add a collection into a collection as a reference */

+ #define COL_ADD_MODE_REFERENCE 0

+ /**

+  * @brief Embed the collection into another collection.

+  *

+  * The collection will become part of another collection.

+  * After this operation the handle to the collection being added

+  * should not be used or freed.

+  * Embedding a collection can be done only once.

+  * If the collection is referenced by another collection,

+  * the operation will fail.

+  */

+ #define COL_ADD_MODE_EMBED     1

+ /**

+  * @brief Perform a deep copy.

+  *

+  * Perform a deep copy of a collection with

+  * all its sub collections */

+ #define COL_ADD_MODE_CLONE     2

+ /**

+  * @brief Create a flattened copy.

+  *

+  * Create a deep copy of a collection with

+  * its sub collections flattening and NOT

+  * resolving duplicates.

+  */

+ #define COL_ADD_MODE_FLAT      3

+ /**

+  * @brief Create a flattened copy with constructed names.

+  *

+  * Creates a deep copy of a collection with

+  * its sub collections flattening and NOT

+  * resolving duplicates. Names are constructed

+  * in dotted notation.

+  * For example the sub collection

+  * named "sub" containing "foo" and

+  * "bar" will be flattened as:

+  * "sub.foo", "sub.bar".

+  */

+ #define COL_ADD_MODE_FLATDOT   4

+ /**

+  * @}

+  */

+ 

+ 

+ /**

+  * @defgroup traverseconst Constants defining traverse modes

+  *

+  * The following constants define how a collection can be

+  * traversed or iterated.

+  *

+  * Flags defined below can generally be combined with each other.

+  *

+  * \ref COL_TRAVERSE_FLAT, \ref COL_TRAVERSE_SHOWSUB,

+  * \ref COL_TRAVERSE_ONLYSUB are mutually exclusive flags.

+  * If combined together results will be unpredictable.<br>

+  * <b>DO NOT MIX THEM IN ONE ITERATOR.</b>

+  *

+  *

+  * @{

+  */

+ /** @brief Traverse all items in the collection. */

+ #define COL_TRAVERSE_DEFAULT  0x00000000

+ /**

+  * @brief Traverse only the top level.

+  *

+  * Traverse only top level

+  * ignored if the IGNORE flag is

+  * specified

+  */

+ #define COL_TRAVERSE_ONELEVEL 0x00000001

+ /**

+  * @brief Insert end collection marker.

+  *

+  * Call the handler once more when the

+  * end of the collection is reached.

+  * Specifying this flag would cause a traversing

+  * function to call a callback once more passing

+  * in a virtual property of type \ref COL_TYPE_END.

+  * Good for processing nested collections.

+  */

+ #define COL_TRAVERSE_END      0x00000002

+ /** @brief Ignore sub collections as if none is present. */

+ #define COL_TRAVERSE_IGNORE   0x00000004

+ /**

+  * @brief Flatten the collection.

+  *

+  * Traversing this way would act as if

+  * all the properties of sub collection are properties

+  * of the root collection. The referencing properties or

+  * headers of the referenced collections are skipped.

+  *

+  * If we think of the book case example

+  * this is very useful when one wants to iterate through

+  * all the books skipping information about

+  * which shelf they are on.

+  */

+ #define COL_TRAVERSE_FLAT     0x00000008

+ /**

+  * @defgroup moreiterflag Additional iterator flags

+  *

+  * \note NOTE: These flags ignored by traverse functions and

+  *             can be used only in the iterator.

+  *

+  * @{

+  */

+ /**

+  * @brief Include headers of sub collections.

+  *

+  * When one collection is embedded or referenced by another collection

+  * there are two names we can be interested in. The name of the property

+  * that defines the reference and the name of the embedded collection.

+  * It is recommended that they be the same, however there may be cases

+  * when the name of the referencing property and referenced collection

+  * should be different. By default only the name of the referencing

+  * property is returned while iterating through the collection and

+  * its sub collections. Specifying this flag would cause the names

+  * of the collection (header elements) be included into the iteration

+  * process.

+  *

+  * Flag is ignored if the \ref COL_TRAVERSE_ONELEVEL flag is

+  * specified and not ignored.

+  * Flag is ignored is also ignored if the FLAT flag is specified. */

+ #define COL_TRAVERSE_SHOWSUB  0x00010000

+ /**

+  * @brief Show sub collections.

+  *

+  * Show the header of the sub collection instead of the reference.

+  * Flag is ignored if the \ref COL_TRAVERSE_ONELEVEL flag is

+  * specified and not ignored.

+  * Flag is ignored is also ignored if the FLAT flag is specified. */

+ #define COL_TRAVERSE_ONLYSUB  0x00020000

+ /**

+  * @}

+  */

+ 

+ /**

+  * @}

   */

  

- /* Function that creates a named collection */

+ /**

+  * @defgroup copyconst Constants defining copy modes

+  *

+  * The following constants define modes accepted by copy

+  * collection function(s).

+  *

+  * @{

+  */

+ /**

+  * @brief Perform a deep copy.

+  *

+  * Referenced collections of the donor are copied as sub

+  * collections.

+  */

+ #define COL_COPY_NORMAL         0

+ /**

+  * @brief Perform a deep flat copy.

+  *

+  * Collection is flattened. No name construction performed.

+  */

+ #define COL_COPY_FLAT           1

+ /**

+  * @brief Perform a deep flat copy constructing names.

+  *

+  * Collection is flattened. Names are concatenated with dot.

+  */

+ #define COL_COPY_FLATDOT        2

+ /** @brief Perform a deep copy but leave references as references. */

+ #define COL_COPY_KEEPREF        3

+ /** @brief Copy only top level collection. */

+ #define COL_COPY_TOP            4

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup sortconst Constants defining sort order

+  *

+  * All flags can be combined in OR operation.

+  * Flags \ref COL_SORT_ASC and \ref COL_SORT_DESC are

+  * mutually exclusive. If both specified the

+  * collection will be sorted in the descending order.

+  *

+  * @{

+  */

+ /** @brief Sort in ascending order. */

+ #define COL_SORT_ASC    0x00000000

+ /** @brief Sort in descending order. */

+ #define COL_SORT_DESC   0x00000001

+ /** @brief Sort all sub collections. */

+ #define COL_SORT_SUB    0x00000002

+ /**

+  * @brief Sort only embedded sub collections.

+  *

+  * Ignored if \ref COL_SORT_SUB is not specified.

+  */

+ #define COL_SORT_MYSUB  0x00000004

+ /**

+  * @}

+  */

+ 

+ 

+ /* Public declaration of the private data */

+ #ifndef COLLECTION_PRIV_H

+ /**

+  * @struct collection_item

+  * @brief Opaque structure that holds one property.

+  *

+  * Your implementation can assume that following members

+  * will always be members of the collection_item.

+  * but you should use get_item_xxx functions to get them

+  * and never access internal data directly.

+  *

+  *   - char *property;

+  *   - int property_len;

+  *   - int type;

+  *   - int length;

+  *   - void *data;

+  */

+ struct collection_item;

+ /**

+  * @struct collection_iterator

+  * @brief Opaque iterator structure.

+  *

+  * The iterator structure is used

+  * when one wants to traverse the collection

+  * going through its properties and optionally

+  * sub collections.

+  *

+  * Caller should never assume

+  * anything about internals of this structure.

+  */

+ struct collection_iterator;

+ 

+ #endif /* COLLECTION_PRIV_H */

+ 

+ 

+ /**

+  * @brief Create a collection

+  *

+  * The function will create a collection.

+  * Each collection should have name and class.

+  *

+  * @param[out] ci     Newly allocated collection object.

+  * @param[in]  name   The name is supposed to be a unique identifier of

+  *                    the collection. This is useful when the collections

+  *                    are stored within other collections or inside other

+  *                    aggregation objects. Caller is free to use any name.

+  *                    Name should consist of the ASCII characters with codes

+  *                    non less than space. Exclamation mark character is

+  *                    a special character and can't be used in name of

+  *                    collection or property.<br>

+  *                    Maximum allowed length is defined at compile time.

+  *                    The default value is 64k.

+  * @param[in]  cclass Class is used to relate the collection to a specific

+  *                    group of the collections of the same structure.

+  *                    This is very useful when you try to represent

+  *                    objects using collections and you want to check if

+  *                    the objects have same structure or not.

+  *                    There is no predefined name space for the collection

+  *                    classes. Defining classes is left to the application

+  *                    developers.<br>

+  *                    <b>NOTE:</b>

+  *                    If you decide to build an interface using collection

+  *                    library pick a range for the classes you are

+  *                    going to use and make sure that they do not collide

+  *                    with other interfaces built on top of the collection.

+  *

+  * @return 0          - Collection was created successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the collection name.

+  * @return EMSGSIZE   - Collection name is too long.

+  */

  int col_create_collection(struct collection_item **ci,

                            const char *name,

                            unsigned cclass);

  

- /* Function that destroys a collection */

+ /**

+  * @brief Destroy a collection

+  *

+  * The function will destroy a collection.

+  *

+  * @param[in] ci     Collection object.

+  *

+  */

  void col_destroy_collection(struct collection_item *ci);

  

- /* Family of functions that add properties to a collection */

- /* See details about subcollection argument above. */

- /* Family includes the following convinience functions: */

- /* Add a string property to collection. The length should include the

-  * terminating 0 */

+ /**

+  * @brief Copy item callback.

+  *

+  * Callback is used by the

+  * \ref col_copy_collection_with_cb "col_copy_collection_with_cb" function.

+  * Function is called after the new item is created but not yet

+  * inserted into the target collection.

+  * The implementer of the callback can alter the item data

+  * or indicate to the caller that the item should be skipped.

+  *

+  * @param[in] item      Newly allocated item that will be inserted

+  *                      into the new collection.

+  * @param[in] ext_data  Data the application might want to

+  *                      pass to the callback.

+  * @param[out] skip     Pointer to a variable that indicates if the

+  *                      item should be skipped or not.

+  *                      Set this variable to any nonzero value

+  *                      and the item will be skipped.

+  * @return 0 - Success

+  * @return Function can return any error code. This code

+  * will be propagated through the internal functions and

+  * returned to the application.

+  *

+  */

+ typedef int (*col_copy_cb)(struct collection_item *item,

+                            void *ext_data,

+                            int *skip);

+ 

+ /**

+  * @brief Copy collection with data modification.

+  *

+  * Function create a deep copy of the current collection.

+  * Calls caller provided callback before copying each item's data.

+  * This is useful if the data needs to be resolved in some way.

+  * The best use is when the template is copied and the values

+  * in the template are resolved to the actual values.

+  * The acceptable modes are defined \ref copyconst "here".

+  *

+  * @param[out] col_copy      Newly created collection object.

+  * @param[in]  col_to_copy   Collection object that will be copied.

+  * @param[in]  name_to_use   Name of the new collection.

+  * @param[in]  copy_mode     How to \ref copyconst "copy".

+  * @param[in]  copy_cb       Pointer to a callback \ref col_copy_cb.

+  *                           Can be NULL. In this case data is copied

+  *                           without modification.

+  * @param[in]  ext_data      Data the application might want to

+  *                           pass to the callback.

+  *

+  * @return 0          - Collection was copied successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return Any error code returned by the callback.

+  *

+  */

+ int col_copy_collection_with_cb(struct collection_item **col_copy,

+                                 struct collection_item *col_to_copy,

+                                 const char *name_to_use,

+                                 int copy_mode,

+                                 col_copy_cb copy_cb,

+                                 void *ext_data);

+ 

+ /**

+  * @brief Copy collection without data modification.

+  *

+  * Function creates a deep copy of the current collection.

+  * It wraps the \ref col_copy_collection_with_cb function.

+  * The acceptable modes are defined \ref copyconst "here".

+  *

+  * @param[out] col_copy      Newly created collection object.

+  * @param[in]  col_to_copy   Collection object that will be copied.

+  * @param[in]  name_to_use   Name of the new collection.

+  * @param[in]  copy_mode     How to \ref copyconst "copy".

+  *

+  * @return 0          - Collection was copied successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  *

+  */

+ int col_copy_collection(struct collection_item **col_copy,

+                         struct collection_item *col_to_copy,

+                         const char *name_to_use,

+                         int copy_mode);

+ 

+ /**

+  * @brief Add collection to collection.

+  *

+  * Function adds one collection into another

+  * depending upon a specified \ref addmodes "mode".

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add collection to. If NULL the collection

+  *                          is added to the root collection.

+  * @param[in] as_property   Name of the property that will constitute

+  *                          the reference. If NULL the name of

+  *                          the collection being added will be used.

+  *                          If specified the restrictions to

+  *                          the name characters and length apply.

+  *                          For more details about the name related

+  *                          restrictions see

+  *                          \ref addproperty "col_add_xxx_property"

+  *                          functions.

+  * @param[in] ci_to_add     Collection to add.

+  * @param[in] mode          Specifies \ref addmodes "how"

+  *                          the collection should be added.

+  *

+  * @return 0          - Collection was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  *                      The attempt to update a property which is

+  *                      a reference to a collection or a collection

+  *                      name.

+  * @return ENOENT     - Property to update is not found.

+ */

+ int col_add_collection_to_collection(struct collection_item *ci,

+                                      const char *subcollection,

+                                      const char *as_property,

+                                      struct collection_item *ci_to_add,

+                                      int mode);

+ /**

+  * @brief Search Callback

+  *

+  * Signature of the callback that needs to be used when

+  * traversing a collection or looking for a specific item.

+  *

+  * @param[in]  property      The name of the property will

+  *                           be passed in this parameter.

+  * @param[in]  property_len  Length of the property name

+  *                           will be passed in this parameter.

+  * @param[in]  type          Type of the data will be passed

+  *                           in this parameter.

+  * @param[in]  data          Pointer to the data will be passed

+  *                           in this parameter.

+  * @param[in]  length        Length of data will be passed in

+  *                           this parameter.

+  * @param[in]  custom_dat    Custom data will be passed in

+  *                           this parameter.

+  * @param[out] stop          Pointer to a variable where the handler

+  *                           can put nonzero to stop traversing

+  *                           of the collection.

+  * @return 0 - Success

+  * @return Function can return any error code. This code

+  * will be propagated through the internal functions and

+  * returned to the application.

+  */

+ typedef int (*col_item_fn)(const char *property,

+                            int property_len,

+                            int type,

+                            void *data,

+                            int length,

+                            void *custom_dat,

+                            int *stop);

+ 

+ 

+ /**

+  * @brief Traverse collection

+  *

+  * Function to traverse the entire collection

+  * including (optionally) sub collections.

+  *

+  * @param[in]  ci           Collection object to traverse.

+  * @param[in]  mode_flags   How to traverse.

+  *                          See details \ref traverseconst "here".

+  * @param[in]  item_handler Application supplied callback.

+  *                          It will be called for each item

+  *                          in the collection including headers.

+  * @param[in]  custom_data  Custom data that application

+  *                          might want to pass to the callback.

+  *

+  * @return 0          - Collection was traversed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return Any error code returned by the callback.

+  *

+  */

+ int col_traverse_collection(struct collection_item *ci,

+                             int mode_flags,

+                             col_item_fn item_handler,

+                             void *custom_data);

+ 

+ /**

+  * @brief Search and do function.

+  *

+  * Looks up an item in the collection based on the property and type.

+  * Actually it is a traverse function with special traversing logic.

+  * It traverses the whole collection but calls the supplied

+  * callback only for the items that match the search criteria.

+  * It is the responsibility of the caller to define how the callback

+  * is going to indicate that the item it was looking for is found.

+  * Function will not return error if the item is not found.

+  * It is the responsibility of the calling application to check

+  * the data passed in custom_data and see if the item was found and

+  * that the action was performed.

+  *

+  * @param[in]  ci               Collection object to traverse.

+  * @param[in]  property_to_find Name of the property to find.

+  *                              Parameter supports "x!y"

+  *                              notation.

+  * @param[in]  type             Type filter. Only properties

+  *                              of the given type will match.

+  *                              Can be 0 to indicate that all

+  *                              types should be evaluated.

+  * @param[in]  mode_flags       How to traverse the collection.

+  *                              See details \ref traverseconst "here".

+  * @param[in]  item_handler     Function to call when the item is found.

+  * @param[in]  custom_data      Custom data passed to the callback.

+  *

+  * @return 0          - Operation completed successfully.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOENT     - The search criteria is incorrect.

+  * @return ENOMEM     - No memory.

+  * @return Any error code returned by the callback.

+  *

+  */

+ int col_get_item_and_do(struct collection_item *ci,

+                         const char *property_to_find,

+                         int type,

+                         int mode_flags,

+                         col_item_fn item_handler,

+                         void *custom_data);

+ 

+ /**

+  * @brief Search function to get an item.

+  *

+  * Convenience function to get individual item.

+  * Caller should be aware that this is not a copy of the item

+  * but the pointer to actual item stored in the collection.

+  * The returned pointer should never be altered or freed by caller of the function.

+  * The caller should be sure that the collection does not go out of scope

+  * while the pointer to its data is in use.

+  * Working with the internals of the collection item structure directly

+  * may cause problems in future if the internal implementation changes.

+  * The caller needs to be aware that function does not return

+  * error if item is not found. The caller needs to check if

+  * item is not NULL to determine whether something was found.

+  * Internally function is a wrapper around the \ref col_get_item_and_do

+  * function.

+  *

+  * Use \ref getitem "item management" functions to work with the item.

+  *

+  * @param[in]  ci               Collection object to traverse.

+  * @param[in]  property_to_find Name of the property to find.

+  *                              Parameter supports "x!y"

+  *                              notation.

+  * @param[in]  type             Type filter. Only properties

+  *                              of the given type will match.

+  *                              Can be 0 to indicate that all

+  *                              types should be evaluated.

+  * @param[in]  mode_flags       How to traverse the collection.

+  *                              See details \ref traverseconst "here".

+  * @param[in]  item             Pointer to found item or NULL

+  *                              if item is not found.

+  *

+  * @return 0          - No internal errors during search.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOENT     - The search criteria is incorrect.

+  * @return ENOMEM     - No memory.

+  *

+  */

+ int col_get_item(struct collection_item *ci,

+                  const char *property_to_find,

+                  int type,

+                  int mode_flags,

+                  struct collection_item **item);

+ 

+ /**

+  * @brief Sort collection.

+  *

+  * If the sub collections are included in sorting

+  * each collection is sorted separately (this is not a global sort).

+  * It might be dangerous to sort sub collections if

+  * sub collection is not owned by the current collection.

+  * If it is a reference to an external collection

+  * there might be an issue. To skip the collections that

+  * externally referenced use \ref COL_SORT_MYSUB flag.

+  * Keep in mind that if a collection is referenced

+  * more than once by other collection and that collection

+  * is sorted with sub collections the referenced

+  * collection will be sorted more than once.

+  *

+  * NOTE: Current implementation of the sorting

+  * function is very simple and alternative

+  * implementations might be provided later.

+  *

+  * @param[in]  col         Collection to sort.

+  * @param[in]  cmp_flags   For more information see

+  *                         \ref compflags "comparison flags".

+  * @param[in]  sort_flags  For more information see

+  *                         \ref sortconst "sort flags".

+  *

+  * @return 0          - No internal errors during sorting.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  *

+  */

+ int col_sort_collection(struct collection_item *col,

+                         unsigned cmp_flags,

+                         unsigned sort_flags);

+ 

+ /**

+  * @brief Delete property.

+  *

+  * Delete property from the collection.

+  * It is recommended to use a more efficient function

+  * \ref col_remove_item for the same purpose if

+  * the property is unique or if the collection

+  * has a known structure.

+  * The col_delete_property function has some advantage only

+  * if it is not known where property

+  * resides and what is the structure of the collection.

+  * In this case "foo!bar!baz" notation can be used in

+  * the property_to_find argument to find and delete

+  * the property "baz" that is in a sub collection "bar"

+  * which is in turn a part of a collection "foo".

+  *

+  * @param[in]  ci                Collection to delete property from.

+  * @param[in]  property_to_find  Property to delete.

+  * @param[in]  type              Use type if names are not unique

+  *                               and you know the type of the value

+  *                               you want to delete. Otherwise set to 0.

+  * @param[in]  mode_flags        The flags define how the collection

+  *                               should be searched. For more information

+  *                               see \ref traverseconst "traverse constants".

+  *

+  * @return 0          - Property was deleted successfully.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOMEM     - No memory.

+  * @return ENOENT     - Property not found.

+  *

+  */

+ int col_delete_property(struct collection_item *ci,

+                         const char *property_to_find,

+                         int type,

+                         int mode_flags);

+ 

+ /**

+  * @brief Is property in the collection?

+  *

+  * Convenience function to check if the property

+  * is indeed in the collection.

+  *

+  * @param[in]  ci                Collection to search.

+  * @param[in]  property_to_find  Property to find.

+  * @param[in]  type              Use type if names are not unique

+  *                               and you know the type of the value

+  *                               you want to check. Otherwise set to 0.

+  * @param[in]  mode_flags        The flags define how the collection

+  *                               should be searched. For more information

+  *                               see \ref traverseconst "traverse constants".

+  * @param[out] found             The variable that will receive the result

+  *                               of the search.

+  *                               COL_NOMATCH - if not found

+  *                               COL_MATCH if found

+  *

+  * @return 0          - Search completed successfully.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOMEM     - No memory.

+  *

+  */

+ int col_is_item_in_collection(struct collection_item *ci,

+                               const char *property_to_find,

+                               int type,

+                               int mode_flags,

+                               int *found);

+ 

+ /**

+  * @brief Get a reference to a collection

+  *

+  * Get a pointer to a collection included into another collection.

+  * If the col_to_find is NULL function returns a reference

+  * to the top level collection.

+  * Delete extracted collection after use to decrease reference count.

+  *

+  * @param[in]  ci                Collection to search.

+  * @param[out] acceptor          Variable that accepts pointer to

+  *                               an extracted collection.

+  *                               Use \ref col_destroy_collection to

+  *                               free returned object reference after

+  *                               use.

+  * @param[in]  col_to_find       Collection to find.

+  *                               "foo!bar!baz" notation can be used.

+  *

+  * @return 0          - Success.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOMEM     - No memory.

+  */

+ int col_get_collection_reference(struct collection_item *ci,

+                                  struct collection_item **acceptor,

+                                  const char *col_to_find);

+ 

+ /**

+  * @brief Get a reference from the item

+  *

+  * Get a pointer to a collection from a current item

+  * if current item is a reference to the collection.

+  * If current item is not a reference to a collection an error

+  * will be returned.

+  * Delete extracted collection after use to decrease reference count.

+  *

+  * @param[in]  item              Item to extract the reference from.

+  * @param[out] acceptor          Variable that accepts pointer to

+  *                               an extracted collection.

+  *                               Use \ref col_destroy_collection to

+  *                               free returned object reference after

+  *                               use.

+  *

+  * @return 0          - Success.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  */

+ int col_get_reference_from_item(struct collection_item *item,

+                                 struct collection_item **acceptor);

+ 

+ 

+ 

+ /**

+  * @brief Get collection class.

+  *

+  * The classes of the collections can be used to convey information

+  * about the collection's internal structure.

+  * Some interfaces built on top of the collection might

+  * impose restrictions on the collection structure.

+  * For example the interface can decide that it is going

+  * to deal with the collections that do not have sub collections

+  * and elements of the collections are always only strings.

+  * So the interface will define a class of the collection

+  * and create a function that would take the strings and create

+  * such a collection. Then other functions of that interface

+  * would check if the provided collection is of the specified class.

+  * If not the interface would reject the collection right away.

+  * If the collection is of the valid class the interface might

+  * call the validation function to make sure that this is really

+  * the case however it needs to validate it only once and lower level

+  * functions can rely on the class value of the collection

+  * without performing duplicate validation.

+  *

+  * @param[in]   ci                 Collection object.

+  * @param[out]  cclass             Variable that will receive

+  *                                 the value of the class.

+  * @return 0          - Success.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  *

+  */

+ int col_get_collection_class(struct collection_item *ci,

+                              unsigned *cclass);

+ 

+ /**

+  * @brief Set collection class.

+  *

+  * Sometimes as a result of the collection modification

+  * the class of the collection can change.

+  *

+  * @param[in]   ci                 Collection object.

+  * @param[in]   cclass             New class value.

+  *

+  * @return 0          - Success.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  *

+  */

+ int col_set_collection_class(struct collection_item *ci,

+                              unsigned cclass);

+ 

+ /**

+  * @brief Get count of the elements.

+  *

+  * It is useful to know how many items are there in the collection.

+  *

+  * @param[in]   ci                 Collection object.

+  * @param[out]  count              Variable will receive the value

+  *                                 of the number of the items in

+  *                                 the collection. Collection

+  *                                 header or references to external

+  *                                 collections are counted as well.

+  *                                 This means that every collection

+  *                                 has at least one item - the header.

+  *

+  * @return 0          - Success.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  *

+  */

+ int col_get_collection_count(struct collection_item *ci,

+                              unsigned *count);

+ 

+ 

+ /**

+  * @brief Check the class of collection.

+  *

+  * Convenience function to check if the collection is of the specific class.

+  * In case of internal error assumes that collection is not of the right class.

+  *

+  * @param[in]   ci                 Collection object.

+  * @param[in]   cclass             Class value to compare to to.

+  *

+  * @return 0          - If any internal error or classes do not match.

+  * @return 1          - No error and classes do match.

+  *

+  */

+ int col_is_of_class(struct collection_item *ci,

+                     unsigned cclass);

+ 

+ 

+ /**

+  * @defgroup addproperty Add property functions

+  *

+  * Functions in this section add properties to a collection.

+  *

+  * All the functions in this section add a property of the specified

+  * type to the collection object.

+  * They are convenience wrappers around the col_insert_xxx_property

+  * functions.

+  * They always append property to the end of the collection.

+  *

+  * Common parameters for these functions are:

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  * @{

+  */

+ 

+ /**

+  * @brief Add a string property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] string Null terminated string to add.

+  * @param[in] length Length of the string. Should include the length

+  *                   of the terminating 0.

+  *                   If the length is shorter than the full string

+  *                   the string will be truncated. If the length is

+  *                   longer than the actual string there might be

+  *                   garbage at end of the actual string.

+  *                   Library will always properly NULL terminate

+  *                   the string at the given position dictated

+  *                   by length but in no way will inspect the validity

+  *                   of the passed in data. This is left to the calling

+  *                   application.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_str_property(struct collection_item *ci,

                           const char *subcollection,

                           const char *property,

                           const char *string,

                           int length);

- /* Add a binary property to collection.  */

+ 

+ /**

+  * @brief Add a binary property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] binary_data   Data to add.

+  * @param[in] length        Length of the data.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_binary_property(struct collection_item *ci,

                              const char *subcollection,

                              const char *property,

                              void *binary_data,

                              int length);

- /* Add an int property to collection. */

+ 

+ /**

+  * @brief Add an integer property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Integer value to add. Value is signed.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_int_property(struct collection_item *ci,

                           const char *subcollection,

                           const char *property,

-                          int number);

- /* Add an unsigned int property. */

+                          int32_t number);

+ 

+ /**

+  * @brief Add an unsigned integer property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Unsigned integer value to add.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_unsigned_property(struct collection_item *ci,

                                const char *subcollection,

                                const char *property,

-                               unsigned int number);

- /* Add a long property. */

+                               uint32_t number);

+ 

+ /**

+  * @brief Add an long property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Long integer value to add. Value is signed.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_long_property(struct collection_item *ci,

                            const char *subcollection,

                            const char *property,

-                           long number);

- /* Add an unsigned long property. */

+                           int64_t number);

+ 

+ /**

+  * @brief Add an unsigned long property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Unsigned long integer value to add.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_ulong_property(struct collection_item *ci,

                             const char *subcollection,

                             const char *property,

-                            unsigned long number);

- /* Add a double property. */

+                            uint64_t number);

+ 

+ /**

+  * @brief Add a property of type double to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Floating point value.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_double_property(struct collection_item *ci,

                              const char *subcollection,

                              const char *property,

                              double number);

- /* Add a bool property. */

+ /**

+  * @brief Add a Boolean property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] logical       Boolean value. 0 - false, nonzero - true.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_bool_property(struct collection_item *ci,

                            const char *subcollection,

                            const char *property,

                            unsigned char logical);

  

- /* Add any property */

- int col_add_any_property(struct collection_item *ci,    /* A collection of items */

-                          const char *subcollection,     /* Subcollection */

-                          const char *property,          /* Name */

-                          int type,                      /* Data type */

-                          void *data,                    /* Pointer to the data */

-                          int length);                   /* Length of the data. For

-                                                          * strings it includes the

-                                                          * trailing 0 */

- 

- /* The functions that add an item and immediately return you this item

-  * in the ret_ref parameter */

+ 

+ /**

+  * @brief Add a property of a specified type to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] type          See type definitions \ref coltypes "here".

+  * @param[in] data          Data to add.

+  * @param[in] length        Length of the data.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

+ int col_add_any_property(struct collection_item *ci,

+                          const char *subcollection,

+                          const char *property,

+                          int type,

+                          void *data,

+                          int length);

+ 

+ /**

+  * @defgroup addprop_withref Add properties with reference

+  *

+  * Family of functions that add properties to a collection

+  * and return reference to an item that holds

+  * a newly created property.

+  *

+  * All the functions in this section append a property of

+  * the specified type to the collection object.

+  *

+  * Parameters for the functions and return values are the same

+  * as for the \ref addproperty "col_add_xxx_property" functions.

+  * The only difference is that these functions have one additional

+  * argument:

+  *

+  * @param[out] ret_ref  Reference to the newly added item that

+  *                      holds the property.

+  *

+  * @{

+  */

+ 

+ /**

+  * @brief Add a string property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] string        Null terminated string to add.

+  * @param[in] length        Length of the string. Should include the length

+  *                          of the terminating 0.

+  *                          If the length is shorter than the full string

+  *                          the string will be truncated. If the length is

+  *                          longer than the actual string there might be

+  *                          garbage at end of the actual string.

+  *                          Library will always properly NULL terminate

+  *                          the string at the given position dictated

+  *                          by length but in no way will inspect the validity

+  *                          of the passed in data. This is left to the calling

+  *                          application.

+  * @param[out] ret_ref      Reference to the newly added item that

+  *                          holds the property.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_str_property_with_ref(struct collection_item *ci,

                                    const char *subcollection,

                                    const char *property,

                                    char *string, int length,

                                    struct collection_item **ret_ref);

+ 

+ /**

+  * @brief Add a binary property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] binary_data   Data to add.

+  * @param[in] length        Length of the data.

+  * @param[out] ret_ref      Reference to the newly added item that

+  *                          holds the property.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_binary_property_with_ref(struct collection_item *ci,

                                       const char *subcollection,

                                       const char *property,

                                       void *binary_data, int length,

                                       struct collection_item **ret_ref);

+ 

+ /**

+  * @brief Add an integer property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Integer value to add. Value is signed.

+  * @param[out] ret_ref      Reference to the newly added item that

+  *                          holds the property.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_int_property_with_ref(struct collection_item *ci,

                                    const char *subcollection,

-                                   const char *property, int number,

+                                   const char *property, int32_t number,

                                    struct collection_item **ret_ref);

+ 

+ /**

+  * @brief Add an unsigned integer property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Unsigned integer value to add.

+  * @param[out] ret_ref      Reference to the newly added item that

+  *                          holds the property.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_unsigned_property_with_ref(struct collection_item *ci,

                                         const char *subcollection,

-                                        const char *property, unsigned int number,

+                                        const char *property, uint32_t number,

                                         struct collection_item **ret_ref);

+ 

+ /**

+  * @brief Add an long property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Long integer value to add. Value is signed.

+  * @param[out] ret_ref      Reference to the newly added item that

+  *                          holds the property.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_long_property_with_ref(struct collection_item *ci,

                                     const char *subcollection,

-                                    const char *property, long number,

+                                    const char *property, int64_t number,

                                     struct collection_item **ret_ref);

+ 

+ /**

+  * @brief Add an unsigned long property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Unsigned long integer value to add.

+  * @param[out] ret_ref      Reference to the newly added item that

+  *                          holds the property.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_ulong_property_with_ref(struct collection_item *ci,

                                      const char *subcollection,

-                                     const char *property, unsigned long number,

+                                     const char *property, uint64_t number,

                                      struct collection_item **ret_ref);

+ 

+ /**

+  * @brief Add a property of type double to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] number        Floating point value.

+  * @param[out] ret_ref      Reference to the newly added item that

+  *                          holds the property.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_double_property_with_ref(struct collection_item *ci,

                                       const char *subcollection,

                                       const char *property, double number,

                                       struct collection_item **ret_ref);

+ 

+ /**

+  * @brief Add a Boolean property to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] logical       Boolean value. 0 - false, nonzero - true.

+  * @param[out] ret_ref      Reference to the newly added item that

+  *                          holds the property.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_bool_property_with_ref(struct collection_item *ci,

                                     const char *subcollection,

                                     const char *property, unsigned char logical,

                                     struct collection_item **ret_ref);

+ 

+ 

+ /**

+  * @brief Add a property of a specified type to a collection.

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  * @param[in] type          See type definitions \ref coltypes "here".

+  * @param[in] data          Data to add.

+  * @param[in] length        Length of the data.

+  * @param[out] ret_ref      Reference to the newly added item that

+  *                          holds the property.

+  *

+  * @return 0          - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection is not found.

+  *

+  */

  int col_add_any_property_with_ref(struct collection_item *ci,

                                    const char *subcollection,

                                    const char *property,

                                    int type, void *data, int length,

                                    struct collection_item **ret_ref);

  

- /* Update functions */

- /* All update functions search the property using the search algorithm

-  * described at the top of the header file.

+ /**

+  * @}

+  */

+ 

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup insertproperty Insert property functions

+  *

+  * Functions in this section insert properties into a collection

+  * at a specified position.

+  *

+  * Common parameters for these functions are:

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] subcollection Name of the inner collection to

+  *                          add property to. If NULL the property

+  *                          is added to the root collection.

+  * @param[in] disposition   Defines relation point.

+  *                          For more information see

+  *                          \ref dispvalues "disposition defines".

+  * @param[in] refprop       Property to relate to

+  * @param[in] idx           Index (see comments below).

+  * @param[in] flags         Flags that control naming issues.

+  * @param[in] property      Name of the property.<br>

+  *                          Name should consist of the ASCII characters

+  *                          with codes non less than space.

+  *                          Exclamation mark character is

+  *                          a special character and can't be used

+  *                          in name of collection or property.<br>

+  *                          Maximum allowed length is defined at compile time.

+  *                          The default value is 64k.

+  *

+  *

+  * Other arguments are the same as the arguments for the

+  * \ref addproperty "col_add_xxx_property" functions.

+  *

+  * @return 0          - Property was insterted successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  * @return ENOENT     - Sub collection or property to relate to is not found.

+  * @return EEXIST     - Property with given name already exists.

+  *                      This error is returned if collection

+  *                      should hold unique names.

+  *                      For more information see description of the

+  *                      "flags" argument.

+  * @return ENOSYS     - Flag or disposition value is not implemented.

+  * @{

+  */

+ /** @brief Insert a string property. */

+ int col_insert_str_property(struct collection_item *ci,

+                             const char *subcollection,

+                             int disposition,

+                             const char *refprop,

+                             int idx,

+                             unsigned flags,

+                             const char *property,

+                             const char *string,

+                             int length);

+ 

+ /** @brief Insert a binary property. */

+ int col_insert_binary_property(struct collection_item *ci,

+                                const char *subcollection,

+                                int disposition,

+                                const char *refprop,

+                                int idx,

+                                unsigned flags,

+                                const char *property,

+                                void *binary_data,

+                                int length);

+ 

+ /** @brief Insert an integer property. */

+ int col_insert_int_property(struct collection_item *ci,

+                             const char *subcollection,

+                             int disposition,

+                             const char *refprop,

+                             int idx,

+                             unsigned flags,

+                             const char *property,

+                             int32_t number);

+ 

+ /** @brief Insert an unsigned property. */

+ int col_insert_unsinged_property(struct collection_item *ci,

+                                  const char *subcollection,

+                                  int disposition,

+                                  const char *refprop,

+                                  int idx,

+                                  unsigned flags,

+                                  const char *property,

+                                  uint32_t number);

+ 

+ /** @brief Insert a long property. */

+ int col_insert_long_property(struct collection_item *ci,

+                              const char *subcollection,

+                              int disposition,

+                              const char *refprop,

+                              int idx,

+                              unsigned flags,

+                              const char *property,

+                              int64_t number);

+ 

+ /** @brief Insert an unsigned long property. */

+ int col_insert_ulong_property(struct collection_item *ci,

+                               const char *subcollection,

+                               int disposition,

+                               const char *refprop,

+                               int idx,

+                               unsigned flags,

+                               const char *property,

+                               uint64_t number);

+ 

+ /** @brief Insert a property with a floating point value. */

+ int col_insert_double_property(struct collection_item *ci,

+                                const char *subcollection,

+                                int disposition,

+                                const char *refprop,

+                                int idx,

+                                unsigned flags,

+                                const char *property,

+                                double number);

+ 

+ /** @brief Insert a property with a Boolean value. */

+ int col_insert_bool_property(struct collection_item *ci,

+                              const char *subcollection,

+                              int disposition,

+                              const char *refprop,

+                              int idx,

+                              unsigned flags,

+                              const char *property,

+                              unsigned char logical);

+ 

+ /** @brief Insert a string property and get back a reference. */

+ int col_insert_str_property_with_ref(struct collection_item *ci,

+                                      const char *subcollection,

+                                      int disposition,

+                                      const char *refprop,

+                                      int idx,

+                                      unsigned flags,

+                                      const char *property,

+                                      const char *string,

+                                      int length,

+                                      struct collection_item **ret_ref);

+ 

+ /** @brief Insert a binary property and get back a reference. */

+ int col_insert_binary_property_with_ref(struct collection_item *ci,

+                                         const char *subcollection,

+                                         int disposition,

+                                         const char *refprop,

+                                         int idx,

+                                         unsigned flags,

+                                         const char *property,

+                                         void *binary_data,

+                                         int length,

+                                         struct collection_item **ret_ref);

+ 

+ /** @brief Insert an integer property and get back a reference. */

+ int col_insert_int_property_with_ref(struct collection_item *ci,

+                                      const char *subcollection,

+                                      int disposition,

+                                      const char *refprop,

+                                      int idx,

+                                      unsigned flags,

+                                      const char *property,

+                                      int32_t number,

+                                      struct collection_item **ret_ref);

+ 

+ /** @brief Insert an unsigned property and get back a reference. */

+ int col_insert_unsinged_property_with_ref(struct collection_item *ci,

+                                           const char *subcollection,

+                                           int disposition,

+                                           const char *refprop,

+                                           int idx,

+                                           unsigned flags,

+                                           const char *property,

+                                           uint32_t number,

+                                           struct collection_item **ret_ref);

+ 

+ /** @brief Insert a long property and get back a reference. */

+ int col_insert_long_property_with_ref(struct collection_item *ci,

+                                       const char *subcollection,

+                                       int disposition,

+                                       const char *refprop,

+                                       int idx,

+                                       unsigned flags,

+                                       const char *property,

+                                       int64_t number,

+                                       struct collection_item **ret_ref);

+ 

+ /** @brief Insert an unsigned long property and get back a reference. */

+ int col_insert_ulong_property_with_ref(struct collection_item *ci,

+                                        const char *subcollection,

+                                        int disposition,

+                                        const char *refprop,

+                                        int idx,

+                                        unsigned flags,

+                                        const char *property,

+                                        uint64_t number,

+                                        struct collection_item **ret_ref);

+ 

+ /**

+  * @brief Insert a property with a floating

+  * point value and get back a reference.

+  */

+ int col_insert_double_property_with_ref(struct collection_item *ci,

+                                         const char *subcollection,

+                                         int disposition,

+                                         const char *refprop,

+                                         int idx,

+                                         unsigned flags,

+                                         const char *property,

+                                         double number,

+                                         struct collection_item **ret_ref);

+ 

+ /** @brief Insert a property with a Boolean value and get back a reference. */

+ int col_insert_bool_property_with_ref(struct collection_item *ci,

+                                       const char *subcollection,

+                                       int disposition,

+                                       const char *refprop,

+                                       int idx,

+                                       unsigned flags,

+                                       const char *property,

+                                       unsigned char logical,

+                                       struct collection_item **ret_ref);

+ 

+ /** @brief Insert property of any type and get back a reference. */

+ int col_insert_property_with_ref(struct collection_item *ci,

+                                  const char *subcollection,

+                                  int disposition,

+                                  const char *refprop,

+                                  int idx,

+                                  unsigned flags,

+                                  const char *property,

+                                  int type,

+                                  const void *data,

+                                  int length,

+                                  struct collection_item **ret_ref);

+ 

+ 

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup updateproperty Update property functions

+  *

+  * Functions in this section update properties in a collection.

+  *

+  * All update functions search the property using the

+  * internal traverse function.

   * Use same "x!y" notation to specify a property.

+  * For more details about the search logic see

+  * \ref col_get_item_and_do function.

+  *

+  * The existing value of the property is destroyed and lost.

+  *

+  * It is not possible to rename the property using these functions.

+  * To do more advanced modifications see \ref col_modify_item function

+  * and \ref modwrap "item modification wrappers" .

+  *

+  * Common parameters for these functions are:

+  *

+  * @param[in] ci            Root collection object.

+  * @param[in] property      Name of the property.

+  * @param[in] mode_flags    Specify how the collection

+  *                          should to be traversed.

+  *

+  * The rest of the arguments specify the new values for

+  * the property. For more details about these arguments see

+  * the description of the \ref addproperty "col_add_xxx_property"

+  * corresponding function.

+  *

+  *

+  * @return 0          - Property was updated successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  *                      The attempt to update a property which is

+  *                      a reference to a collection or a collection

+  *                      name.

+  * @return ENOENT     - Property to update is not found.

+  *

+  * @{

+  */

+ /**

+  * Update a property with a string value.

+  * Length should include the terminating 0.

   */

- /* Update a string property in the collection.

-  * Length should include the terminating 0  */

  int col_update_str_property(struct collection_item *ci,

                              const char *property,

                              int mode_flags,

                              char *string,

                              int length);

- /* Update a binary property in the collection.  */

+ /**

+  * Update a property with a binary value.

+  */

  int col_update_binary_property(struct collection_item *ci,

                                 const char *property,

                                 int mode_flags,

                                 void *binary_data,

                                 int length);

- /* Update an int property in the collection. */

+ /**

+  * Update a property with an integer value.

+  */

  int col_update_int_property(struct collection_item *ci,

                              const char *property,

                              int mode_flags,

-                             int number);

- /* Update an unsigned int property. */

+                             int32_t number);

+ /**

+  * Update a property with an unsigned value.

+  */

  int col_update_unsigned_property(struct collection_item *ci,

                                   const char *property,

                                   int mode_flags,

-                                  unsigned int number);

- /* Update a long property. */

+                                  uint32_t number);

+ /**

+  * Update a property with a long value.

+  */

  int col_update_long_property(struct collection_item *ci,

                               const char *property,

                               int mode_flags,

-                              long number);

- /* Update an unsigned long property. */

+                              int64_t number);

+ /**

+  * Update a property with an unsigned long value.

+  */

  int col_update_ulong_property(struct collection_item *ci,

                                const char *property,

                                int mode_flags,

-                               unsigned long number);

- /* Update a double property. */

+                               uint64_t number);

+ /**

+  * Update a property with a floating point value.

+  */

  int col_update_double_property(struct collection_item *ci,

                                 const char *property,

                                 int mode_flags,

                                 double number);

- /* Update a double property. */

+ /**

+  * Update a property with a Boolean value.

+  */

  int col_update_bool_property(struct collection_item *ci,

                               const char *property,

                               int mode_flags,

                               unsigned char logical);

  

- /* Update property in the collection */

- int col_update_property(struct collection_item *ci,   /* A collection of items */

-                         const char *property_to_find, /* Name to match */

-                         int type,                     /* Data type */

-                         void *new_data,               /* Pointer to the data */

-                         int length,                   /* Length of the data. For

-                                                        * strings, it includes the

-                                                        * trailing 0 */

-                         int mode_flags);              /* How to traverse the collection  */

- 

- 

- /* Add collection to collection */

- int col_add_collection_to_collection(struct collection_item *ci,            /* Collection handle to with we add

-                                                                              * another collection */

-                                  const char *sub_collection_name,           /* Name of the sub collection

-                                                                              * to which collection needs to be

-                                                                              * added as a property.

-                                                                              * If NULL high level collection is assumed. */

-                                  const char *as_property,                   /* Name of the collection property.

-                                                                              * If NULL, same property as the name of

-                                                                              * the collection being added will be used. */

-                                  struct collection_item *collection_to_add, /* Collection to add */

-                                  int mode);                                 /* How this collection needs to be added */

- 

- /* Create a deep copy of the current collection.

-  * Wraps the function below.

-  * The acceptable modes are defined at the top.

-  */

- int col_copy_collection(struct collection_item **collection_copy,

-                         struct collection_item *collection_to_copy,

-                         const char *name_to_use,

-                         int copy_mode);

+ /**

+  * Update a property with a value by specifying type

+  * and value. See definitions of the type constants

+  * \ref coltypes "here".

+  * All other col_update_xxx_property functions are wrappers

+  * around this one.

+  */

+ int col_update_property(struct collection_item *ci,

+                         const char *property,

+                         int type,

+                         void *new_data,

+                         int length,

+                         int mode_flags);

  

- /* Callback used in the next function */

- typedef int (*col_copy_cb)(struct collection_item *item,

-                            void *ext_data,

-                            int *skip);

  

- /* Create a deep copy of the current collection.

-  * Calls caller provided callback before

-  * copying each item's data.

-  * The acceptable modes are defined at the top.

+ /**

+  * @}

   */

- int col_copy_collection_with_cb(struct collection_item **collection_copy,

-                                 struct collection_item *collection_to_copy,

-                                 const char *name_to_use,

-                                 int copy_mode,

-                                 col_copy_cb copy_cb,

-                                 void *ext_data);

  

- /* Signature of the callback that needs to be used when

-    traversing a collection or looking for a specific item */

- typedef int (*col_item_fn)(const char *property,   /* The name of the property will be passed in this parameter. */

-                            int property_len, /* Length of the property name will be passed in this parameter. */

-                            int type,         /* Type of the data will be passed in this parameter */

-                            void *data,       /* Pointer to the data will be passed in this parameter */

-                            int length,       /* Length of data will be passed in this parameter */

-                            void *custom_dat, /* Custom data will be passed in this parameter */

-                            int *stop);       /* Pointer to variable where the handler can put non zero to stop processing */

- 

- /* Function to traverse the entire collection including optionally sub collections */

- int col_traverse_collection(struct collection_item *ci,    /* Collection to traverse */

-                             int mode_flags,                /* Flags defining how to traverse */

-                             col_item_fn item_handler,      /* Handler called for each item */

-                             void *custom_data);            /* Custom data passed around */

- 

- /* Search function. Looks up an item in the collection based on the property.

-  * Actually it is a traverse function with special traversing logic.

-  * It is the responsibility of the handler to set something in the custom data

-  * to indicate that the item was found.

-  * Function will not return error if the item is not found.

-  * It is the responsibility of the calling application to check

-  * the data passed in custom_data and see if the item was found and

-  * that the action was performed.

+ /**

+  * @defgroup getitem Item management

+  *

+  * Group of functions that allows retrieving individual elements

+  * of the \ref collection_item hiding the internal implementation.

+  *

+  * @{

   */

- int col_get_item_and_do(struct collection_item *ci,  /* A collection of items */

-                         const char *property_to_find,/* Name to match */

-                         int type,                    /* Type filter */

-                         int mode_flags,              /* How to traverse the collection */

-                         col_item_fn item_handler,    /* Function to call when the item is found */

-                         void *custom_data);          /* Custom data passed around */

  

- /* Convenience function to get individual item */

- /* Caller should be aware that this is not a copy of the item

-  * but the pointer to actual item stored in the collection.

-  * The returned pointer should never be altered or freed by caller of the function.

-  * The caller should be sure that the collection does not go out of scope

-  * while the pointer to its data is in use.

-  * Working with the internals of the collection item structure directly

-  * may cause problems in future if the internal implementation changes.

-  * The caller needs to be aware that function does not return

-  * error if item is not found. The caller needs to check if

-  * item is not NULL to determine whether something was found.

+ /**

+  * @defgroup compflags Comparison flags

+  *

+  * This section describes the flags used in item comparison.

+  *

+  * Flags:

+  * - \ref COL_CMPIN_PROP_EQU

+  * - \ref COL_CMPIN_PROP_BEG

+  * - \ref COL_CMPIN_PROP_MID

+  * - \ref COL_CMPIN_PROP_END

+  *

+  * are mutually exclusive.

+  *

+  * All other flags can be provided in any combination.

+  *

+  * @{

+  */

+ /** @brief Properties should be exactly equal */

+ #define COL_CMPIN_PROP_EQU    0x000000004

+ /** @brief Properties should start with the same substring. */

+ #define COL_CMPIN_PROP_BEG    0x000000005

+ /** @brief One property should be a substring of another. */

+ #define COL_CMPIN_PROP_MID    0x000000006

+ /** @brief Properties should have the same substring at the end. */

+ #define COL_CMPIN_PROP_END    0x000000007

+ 

+ /**

+  * @brief Make sure that there is a dot.

+  *

+  * Useful with _BEG, _MID and _END flags to check that the there is

+  * a dot (if present) in the right place (before, after or both).

+  * For example the first item is named "foo.bar" and the second

+  * is "bar". Using _END the "bar" will be found but if _DOT flag is

+  * used too the function will also check if there was a "." before the found

+  * string in this case.

+  * Ignored in case of _EQU.

+  */

+ #define COL_CMPIN_PROP_DOT     0x000000008

+ 

+ /** @brief Compare property lengths. */

+ #define COL_CMPIN_PROP_LEN     0x000000010

+ 

+ /** @brief Compare types. */

+ #define COL_CMPIN_TYPE         0x000000020

+ 

+ /** @brief Compare data lengths. */

+ #define COL_CMPIN_DATA_LEN     0x000000040

+ 

+ /**

+  * @brief Compare data.

+  *

+  * Compares data (up to the length of the second one)

+  * if type is the same. If type is different

+  * function will assume data is different

+  * without performing actual comparison.

+  */

+ #define COL_CMPIN_DATA         0x000000080

+ 

+ /**

+  * @}

+  */

+ 

+ 

+ /**

+  * @defgroup outflags Comparison results flags

+  *

+  * This section describes the flags set as a result of

+  * a comparison operation.

+  *

+  * @{

+  */

+ 

+ /**

+  * @brief Second item's property is greater.

+  *

+  * If _EQU was specified and the property of the second item

+  * is greater the following bit will be set

+  */

+ #define COL_CMPOUT_PROP_STR    0x00000001

+ 

+ /**

+  * @brief Second item's property is longer.

+  *

+  * If told to compare property lengths

+  * and the second is longer this bit will be set.

+  */

+ #define COL_CMPOUT_PROP_LEN    0x00000002

+ /**

+  * @brief Second item's data is longer.

+  *

+  * If told to compare data lengths

+  * and second is longer this bit will be set

+  */

+ #define COL_CMPOUT_DATA_LEN    0x00000004

+ /**

+  * @brief Second item's data is greater.

+  *

+  * If told to compare data

+  * and types are the same, then

+  * if the second one is greater this bit will

+  * be set. If data is binary flag is never set.

+  */

+ #define COL_CMPOUT_DATA    0x00000008

+ 

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup dispvalues Disposition constants

+  *

+  * Possible dispositions for insert, extract and delete function(s).

+  * Not all of these dispositions are implemented day one.

+  * If disposition is not implemented the function

+  * will return error ENOSYS.

+  *

+  * Other dispositions might be possible in future.

+  *

+  * @{

+  */

+ /**

+  * @brief Relate to the end of the collection

+  *

+  * For "insert":

+  * - Add property to the end of the collection.

+  *

+  * For "extract" or "delete":

+  * - Extract or delete the last property in the collection.

+  */

+ #define COL_DSP_END             0

+ /**

+  * @brief Relate to the beginning of the collection

+  *

+  * For "insert":

+  * - Add property to the beginning of the collection right after the header.

+  *

+  * For "extract" or "delete":

+  * - Extract or delete the first property in the collection.

+  *   This is the one right after the header.

+  */

+ #define COL_DSP_FRONT           1

+ /**

+  * @brief Before the given property

+  *

+  * For "insert":

+  * - Add property before the referenced property.

+  *

+  * For "extract" or "delete":

+  * - Extract or delete the property that stands

+  *   before the referenced property in the collection.

+  *   If given property is the first in the collection

+  *   ENOENT is returned.

+  */

+ #define COL_DSP_BEFORE          2

+ /**

+  * @brief After the given property

+  *

+  * For "insert":

+  * - Add property immediately the referenced property.

+  *

+  * For "extract" or "delete":

+  * - Extract or delete the property that stands

+  *   after the referenced property in the collection.

+  *   If given property is the last in the collection

+  *   ENOENT is returned.

+  */

+ #define COL_DSP_AFTER           3

+ /**

+  * @brief Use index

+  *

+  * For "insert":

+  * - The COL_DSP_INDEX adds the item as N-th item after header in the list.

+  *   Index is zero based.

+  *   If there are less than N items in the list the item is added to the end.

+  *   The index value of 0 means that the item will be added immediately

+  *   after the header. Index of 1 will mean that it is added after first data

+  *   item and so on.

+  *

+  * For "extract" or "delete":

+  * - In case of extraction or deletion the N-th item of the collection

+  *   will be extracted or deleted.

+  *   Index is zero based.

+  *   If there are less than N+1 items in the list the function will return ENOENT.

+  *

+  */

+ #define COL_DSP_INDEX           4

+ /**

+  * @brief Use first among duplicates

+  *

+  * This mode applies only to the list of duplicate

+  * properties that are going one after another.

+  *

+  * For "insert":

+  * - Add property as a first dup of the given property.

+  *   The property name is taken from the item

+  *   and the value refprop is ignored.

+  *

+  * For "extract" or "delete":

+  * - Delete or extract first duplicate property.

+  *   The property name is taken from the refprop.

+  *   The property will be extracted or deleted if found

+  *   regardless of whether there are any duplicates or not.

+  */

+ #define COL_DSP_FIRSTDUP        5

+ /**

+  * @brief Use last among duplicates

+  *

+  * This mode applies only to the list of duplicate

+  * properties that are going one after another.

+  *

+  * For "insert":

+  * - Add property as the last dup of the given property.

+  *   The property name is taken from the item

+  *   and the value refprop is ignored.

+  *

+  * For "extract" or "delete":

+  * - Delete or extract the last duplicate of the property.

+  *   The property name is taken from the refprop.

+  *   Extracts or deletes last duplicate property in the uninterrupted

+  *   sequence of properties with the same name.

+  *   The property will be extracted or deleted if found

+  *   regardless of whether there are any duplicates or not.

+  */

+ #define COL_DSP_LASTDUP         6

+ /**

+  * @brief Use N-th among duplicates

+  *

+  * This mode applies only to the list of duplicate

+  * properties that are going one after another.

+  *

+  * For "insert":

+  * - Add property as a N-th dup of the given property.

+  *   The property name is taken from the item

+  *   and the value refprop is ignored.

+  *   Index is zero based.

+  *   The COL_DSP_NDUP is used in case of the multi value property

+  *   to add a new property with the same name into specific place

+  *   in the list of properties with the same name.

+  *   The index of 0 will mean to add the property before the first

+  *   instance of the property with the same name.

+  *   If the property does not exist ENOENT will be returned.

+  *   If the index is greater than the last property with the same

+  *   name the item will be added immediately after last

+  *   property with the same name.

+  *

+  * For "extract" or "delete":

+  * - Delete or extract N-th duplicate property.

+  *   Index is zero based.

+  *   The property name is taken from the refprop.

+  *   If index is greater than number of duplicate

+  *   properties in the sequence ENOENT is returned.

+  *

+  */

+ #define COL_DSP_NDUP            7

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup insflags Flags used in insert item functions

+  *

+  * Flags that can be used with insert functions.

+  *

+  * In future can more flags might be added.

+  *

+  * <b>NOTE:</b> Use of the duplicate checking flags is costly

+  * since it requires a forward look up of the whole

+  * collection before the item is inserted.

+  * Do not use it until it is absolutely necessary.

+  *

+  * @{

+  */

+ /** @brief This is the default mode - no dup checks on insert */

+ #define COL_INSERT_NOCHECK      0

+ /**

+  * @brief Check for duplicate name and overwrite.

+  * Position arguments are ignored.

+  */

+ #define COL_INSERT_DUPOVER      1

+ /**

+  * @brief Check for duplicate name and type and overwrite.

+  * Position arguments are ignored.

+  */

+ #define COL_INSERT_DUPOVERT     2

+ /** @brief Return error EEXIST if the entry with the same name exists. */

+ #define COL_INSERT_DUPERROR     3

+ /**

+  * @brief Return error EEXIST if the entry

+  * with the same name and type exists.

+  */

+ #define COL_INSERT_DUPERRORT    4

+ /** @brief Check for duplicates, overwrite,

+  * extract and then move to the position requested.

+  */

+ #define COL_INSERT_DUPMOVE      5

+ /** @brief Check for duplicate name and type, overwrite,

+  * extract and then move to the position requested.

+  */

+ #define COL_INSERT_DUPMOVET     6

+ 

+ /**

+  * @}

   */

- int col_get_item(struct collection_item *ci,       /* Collection to find things in */

-                  const char *property_to_find,     /* Name to match */

-                  int type,                         /* Type filter */

-                  int mode_flags,                   /* How to traverse the collection */

-                  struct collection_item **item);   /* Found item */

  

- /* Group of functions that allows retrieving individual elements of the collection_item

-  * hiding the internal implementation.

+ 

+ 

+ /**

+  * @brief Get item property.

+  *

+  * Get name of the property from the item. If the item is a header

+  * the name of the property is the name of the collection.

+  * The element that denotes the collection header has

+  * type \ref COL_TYPE_COLLECTION.

+  * Optionally the property length can be retrieved too.

+  *

+  * @param[in]  ci               Item to get property from.

+  *                              If item is invalid the function

+  *                              will cause a segment violation.

+  * @param[out] property_len     If not NULL the variable

+  *                              will receive the length

+  *                              of the property not counting

+  *                              terminating 0.

+  *

+  * @return Property name.

+  *

+  */

+ const char *col_get_item_property(struct collection_item *ci,

+                                   int *property_len);

+ 

+ /**

+  * @brief Get item type.

+  *

+  * Get type from the item.

+  *

+  * @param[in]  ci               Item to get type from.

+  *                              If item is invalid the function

+  *                              will cause a segment violation.

+  *

+  * @return Item type.

+  *

   */

- const char *col_get_item_property(struct collection_item *ci, int *property_len);

  int col_get_item_type(struct collection_item *ci);

+ 

+ /**

+  * @brief Get value length from the item.

+  *

+  * Get value length from the item. For strings this includes

+  * NULL terminating zero.

+  *

+  * @param[in]  ci               Item to get value length from.

+  *                              If item is invalid the function

+  *                              will cause a segment violation.

+  *

+  * @return Value length.

+  *

+  */

  int col_get_item_length(struct collection_item *ci);

+ 

+ /**

+  * @brief Get property value from the item.

+  *

+  * Get property value from the item.

+  *

+  * @param[in]  ci               Item to get value from.

+  *                              If item is invalid the function

+  *                              will cause a segment violation.

+  *

+  * @return Property value.

+  *

+  */

  void *col_get_item_data(struct collection_item *ci);

+ 

+ /**

+  * @brief Get hash value from the item.

+  *

+  * Get hash value from the item. The hash value is

+  * 64-bit hash created from the property name.

+  * It is done to optimize the searches.

+  *

+  * This function is exposed for some corner cases

+  * that require low level operations, for example

+  * for custom search callbacks to take advantage

+  * of the internal hashes.

+  *

+  * @param[in]  ci               Item to get hash from.

+  *                              If item is invalid the function

+  *                              will cause a segment violation.

+  *

+  * @return Hash value.

+  *

+  */

  uint64_t col_get_item_hash(struct collection_item *ci);

  

- /* Calculates hash of the string using internal hashing

+ /**

+  * @brief Calculate hash value for a string.

+  *

+  * Calculates hash value of the string using internal hashing

   * algorithm. Populates "length" with length

   * of the string not counting 0.

-  * Length argument can be NULL.

-  * If sub_len is greater than zero

-  * this value is used to count how many characters

-  * from string should be included into hash

-  * calculation.

+  *

+  * This function is useful if you want to build a custom

+  * search or collection sorting function.

+  *

+  * @param[in]  string   String to hash. If NULL hash is 0.

+  * @param[in]  sub_len  If it is greater than zero

+  *                      it is used to count how many

+  *                      characters from string should

+  *                      be included into hash calculation.

+  *                      If 0 the actual length of the string

+  *                      is determined and used.

+  * @param[out]  length  Will receive the calculated length

+  *                      of the provided string.

+  *                      Length argument can be NULL.

+  *

+  * @return Hash value.

   */

  uint64_t col_make_hash(const char *string, int sub_len, int *length);

  

- /* Compare two items.

+ 

+ /**

+  * @brief Compare two items.

+  *

   * The second item is evaluated against the first.

   * Function returns 0 if two items are the same

   * and non-zero otherwise.

-  * The in_flags is a bit mask that defines

-  * how the items should be compared.

-  * See below the list of conbstants

-  * defined for this purpose.

-  * If items are different they might be orderable

-  * or not. For example one can order items by name

+  * The \ref compflags "in_flags" is a bit mask that

+  * defines how the items should be compared.

+  *

+  * If items are different they might be sorted following

+  * some order. For example one can order items by name

   * but not by type.

   * If the result of the function is non-zero

-  * the out_flags (if provided) will be

+  * the \ref outflags "out_flags" (if provided) will be

   * set to indicate if the second item is greater

   * then the first.

+  *

+  * @param[in]  first      First item to compare.

+  * @param[in]  second     Second item to compare.

+  * @param[in]  in_flags   See \ref compflags "comparison flags".

+  * @param[out] out_flags  See \ref outflags "output flags".

+  *

+  *

+  * @return 0 if items are the same and nonzero otherwise.

+ 

   */

  int col_compare_items(struct collection_item *first,

                        struct collection_item *second,

                        unsigned in_flags,

                        unsigned *out_flags);

  

- /********* Possible valies for input flags ********/

- /* How to compare properties?

-  * The following 4 flags are mutually exclusive

-  */

- #define COL_CMPIN_PROP_EQU    0x000000004 /* Properties should be same */

- #define COL_CMPIN_PROP_BEG    0x000000005 /* Properties start same */

- #define COL_CMPIN_PROP_MID    0x000000006 /* One is substring of another */

- #define COL_CMPIN_PROP_END    0x000000007 /* One property ends with another */

- 

- /* Make sure that there is a dot.

-  * Useful with _BEG, _MID and _END flags to check that the there is

-  * a dot (if present) in the right place (before, after or both).

-  * For example the first item is named "foo.bar" and the second

-  * is "bar". Using _END the "bar" will be found but if _DOT flag is

-  * used too the function will also check if there was a "." before the found

-  * string in this case.

-  * Ignored in case of _EQU.

-  */

- #define COL_CMPIN_PROP_DOT     0x000000008

- 

- /* Compare property lenghts */

- #define COL_CMPIN_PROP_LEN     0x000000010

- 

- /* Compare types */

- #define COL_CMPIN_TYPE         0x000000020

- 

- /* Compare data len */

- #define COL_CMPIN_DATA_LEN     0x000000040

- 

- /* Compare data (up to the length of the second one)

-  * if type is the same. If type is different

-  * function will assume data is different

-  * without performing actual comparison.

-  */

- #define COL_CMPIN_DATA         0x000000080

- 

- /********* Possible values for output flags *********/

- /* If _EQU was specified and the property of the second item

-  * is greater the following bit will be set

-  */

- #define COL_CMPOUT_PROP_STR    0x00000001

- /* If we were told to compare property lengths

-  * and second is longer this bit will be set

-  */

- #define COL_CMPOUT_PROP_LEN    0x00000002

- /* If we were told to compare data lengths

-  * and second is longer this bit will be set

-  */

- #define COL_CMPOUT_DATA_LEN    0x00000004

- /* If we were told to compare data

-  * and types are the same then

-  * if the second one is greater this bit will

-  * be set. If data is binary flag is never set

-  */

- #define COL_CMPOUT_DATA    0x00000008

- 

- 

- /* Sort collection.

-  * cmp_flags are the same as in_flags for the compare

-  * function. The sort_flags is an OR of the costants

-  * defined below.

-  * If the subcollections are included in sorting

-  * each collection is sorted separately (this is not a global sort).

-  * It might be dangerous to sort subcollections if

-  * subcollection is not owned by current collection.

-  * If it is a reference to an external collection

-  * there might be an issue. To skip the collections that

-  * externally referenced use MYSUB flag.

-  * Keep in mind that if the collection

-  * has two references to the same other

-  * collection it is impossible to detect

-  * this situation. If MYSUB is used in this

-  * case such collection will be ignored

-  * If MYSUB is not used the collection

-  * will be sorted more than once.

-  */

- int col_sort_collection(struct collection_item *col,

-                         unsigned cmp_flags,

-                         unsigned sort_flags);

  

- /* Sort flags */

- #define COL_SORT_ASC    0x00000000

- #define COL_SORT_DESC   0x00000001

- #define COL_SORT_SUB    0x00000002

- #define COL_SORT_MYSUB  0x00000004

  

- /* If you want to modify the item that you got as a result of iterating through collection

-  * or by calling col_get_item(). If you want to rename item provide a new name in the property

-  * argument. If you want the data to remain unchanged use 0 as length parameter.

-  * If item is a reference or collection the call will return error.

+ /**

+  * @brief Modify any item element.

+  *

+  * This function is useful if you want to modify the item that

+  * you got as a result of \ref iterfunc "iterating" through

+  * collection or by calling \ref col_get_item.

   * Previous type and data of the item is destroyed.

+  *

+  * If you want to rename an item provide a new name in the property

+  * argument otherwise keep it NULL.

+  *

+  * If you want the data to remain unchanged use 0 as a length parameter.

+  *

+  * If item is a reference or a collection the call will return an error.

+  *

+  * The are several convenience function that are wrappers

+  * around this function. For more information

+  * see \ref modwrap "item modification wrappers".

+  *

+  * @param[in] item       Item to modify.

+  * @param[in] property   Property name. Use NULL to leave the property

+  *                       unchanged.

+  * @param[in] type       See \ref coltypes "types" for more information.

+  * @param[in] data       New value.

+  * @param[in] length     New value. Use 0 to leave the value and its type

+  *                       unchanged.

+  *

+  * @return 0          - Item was successfully modified.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  *                      The attempt to modify an item which is

+  *                      a reference to a collection or a collection

+  *                      name.

   */

  int col_modify_item(struct collection_item *item,

                      const char *property,
@@ -605,106 +2499,577 @@

                      const void *data,

                      int length);

  

- /* Rename the item */

+ /**

+  * @defgroup modwrap Item modification wrappers

+  *

+  * The functions in this section are convenience wrappers

+  * around \ref col_modify_item.

+  * They return same error codes.

+  *

+  * @{

+  */

+ 

+ /**

+  * @brief Modify item property.

+  *

+  * This function is a convenience wrapper around \ref col_modify_item.

+  * It is equivalent to: col_modify_item(item, property, 0, NULL, 0);

+  *

+  */

  int col_modify_item_property(struct collection_item *item,

                               const char *property);

  

- /* Convenience functions that wrap modify_item().

-  * They always assign new value.

-  * To rename the property just use modify_item_property();

+ /**

+  * @brief Modify item value to be a string.

+  *

+  * This function is a convenience wrapper around \ref col_modify_item.

+  * It sets a value of the item to a provided string.

+  * If property is not NULL it also renames the property.

+  * If the length argument is not zero the string will be truncated to

+  * this length. If the length is 0 the length will be calculated based

+  * on the length of the actual string.

+  * Original value is always destroyed.

+  *

+  * @return - same error values as \ref col_modify_item.

   */

  int col_modify_str_item(struct collection_item *item,

                          const char *property,

                          const char *string,

                          int length);

+ /**

+  * @brief Modify item value to be a binary blob.

+  *

+  * This function is a convenience wrapper around \ref col_modify_item.

+  * It sets a value of the item to a provided binary buffer.

+  * If property is not NULL it also renames the property.

+  * Original value is always destroyed.

+  *

+  * @return - same error values as \ref col_modify_item.

+  */

  int col_modify_binary_item(struct collection_item *item,

                             const char *property,

                             void *binary_data,

                             int length);

+ /**

+  * @brief Modify item value to be a Boolean.

+  *

+  * This function is a convenience wrapper around \ref col_modify_item.

+  * It sets a value of the item to a provided logical value.

+  * If property is not NULL it also renames the property.

+  * Original value is always destroyed.

+  *

+  * @return - same error values as \ref col_modify_item.

+  */

  int col_modify_bool_item(struct collection_item *item,

                           const char *property,

                           unsigned char logical);

+ /**

+  * @brief Modify item value to be an integer.

+  *

+  * This function is a convenience wrapper around \ref col_modify_item.

+  * It sets a value of the item to a provided integer value.

+  * If property is not NULL it also renames the property.

+  * Original value is always destroyed.

+  *

+  * @return - same error values as \ref col_modify_item.

+  */

  int col_modify_int_item(struct collection_item *item,

                          const char *property,

-                         int number);

+                         int32_t number);

+ /**

+  * @brief Modify item value to be a long integer.

+  *

+  * This function is a convenience wrapper around \ref col_modify_item.

+  * It sets a value of the item to a provided long integer value.

+  * If property is not NULL it also renames the property.

+  * Original value is always destroyed.

+  *

+  * @return - same error values as \ref col_modify_item.

+  */

  int col_modify_long_item(struct collection_item *item,

                           const char *property,

-                          long number);

+                          int64_t number);

+ /**

+  * @brief Modify item value to be an unsigned long.

+  *

+  * This function is a convenience wrapper around \ref col_modify_item.

+  * It sets a value of the item to a provided unsigned long value.

+  * If property is not NULL it also renames the property.

+  * Original value is always destroyed.

+  *

+  * @return - same error values as \ref col_modify_item.

+  */

  int col_modify_ulong_item(struct collection_item *item,

                            const char *property,

-                           unsigned long number);

+                           uint64_t number);

+ /**

+  * @brief Modify item value to be an unsigned integer.

+  *

+  * This function is a convenience wrapper around \ref col_modify_item.

+  * It sets a value of the item to a provided unsigned integer value.

+  * If property is not NULL it also renames the property.

+  * Original value is always destroyed.

+  *

+  * @return - same error values as \ref col_modify_item.

+  */

  int col_modify_unsigned_item(struct collection_item *item,

                               const char *property,

-                              unsigned number);

+                              uint32_t number);

+ /**

+  * @brief Modify item value to be a floating point.

+  *

+  * This function is a convenience wrapper around \ref col_modify_item.

+  * It sets a value of the item to a provided floating point value.

+  * If property is not NULL it also renames the property.

+  * Original value is always destroyed.

+  *

+  * @return - same error values as \ref col_modify_item.

+  */

  int col_modify_double_item(struct collection_item *item,

                             const char *property,

                             double number);

  

- /* Delete property from the collection. */

- /* It is recomended to use a more efficient function

-  * col_remove_item() for the same purpose if

-  * the property is unique or if the collection

-  * has a known structure.

-  * This function has some advantage only

-  * if it is not known where propery

-  * resides and what is the structure of the collection.

-  * In this case "foo.bar.baz" notation

-  * can be used in the property_to_find argument to find

-  * and delete the property "baz" that is in sub collection "bar"

-  * which is in turn a part of collection "foo".

+ /**

+  * @}

+  */

+ 

+ /**

+  * @brief Extract item from the collection.

+  *

+  * Function to find and remove an item from the collection.

+  * Function does not destroy the item instead it returns a reference

+  * to the item so it can be used later and inserted back into this or

+  * other collection.

+  * The function assumes that the caller knows the collection

+  * the property is stored in.

+  * The header of the collection can't be extracted with this function

+  * but the reference to the collection can.

+  *

+  * Function allows specifying relative position of the item in the

+  * collection. One can specify that he wants to extract an item

+  * that is first in the collection or last, or after other item

+  * in the collection. For more details see parameter definitions.

+  *

+  * After extracting the item from the collection the caller has to

+  * either insert it back into some collection using \ref col_insert_item

+  * or delete it using \ref col_delete_item.

+  *

+  *

+  * @param[in]  ci              Collection object.

+  * @param[in]  subcollection   Name of the sub collection to extract

+  *                             item from. If NULL, the top level collection

+  *                             is used. One can use "foo!bar!baz"

+  *                             notation to identify the sub collection.

+  * @param[in]  disposition     Constant that controls how the relative

+  *                             position of the item to extract is determined.

+  *                             For more information see \ref dispvalues

+  *                             "disposition constants".

+  * @param[in]  refprop         Name of the property to relate to.

+  *                             This can be used to specify that function

+  *                             should extract next item after the item

+  *                             with this name. Leave NULL if the

+  *                             disposition you are using does not

+  *                             relate to an item in the collection.

+  * @param[in]  idx             Index of the property to extract.

+  *                             Useful for multi-value properties where

+  *                             several properties have same name in a row.

+  * @param[in]  type            Type filter. Only the item of the matching

+  *                             type will be used. It can be a bit mask of

+  *                             more than one type. Use 0 if you do not

+  *                             need to filter by type.

+  * @param[out] ret_ref         Variable will receive the value of the

+  *                             pointer to the extracted item.

+  *

+  * @return 0          - Item was successfully extracted.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOENT     - Sub collection is not found.

+  *                      The position can't be determined. For example

+  *                      extracting next item after item with name "foo"

+  *                      will cause this error if item "foo" is the last

+  *                      item in the collection. There are other cases

+  *                      when this error can be returned but the common

+  *                      theme is that something was not found.

+  * @return ENOSYS       Unknown disposition value.

+  */

+ int col_extract_item(struct collection_item *ci,

+                      const char *subcollection,

+                      int disposition,

+                      const char *refprop,

+                      int idx,

+                      int type,

+                      struct collection_item **ret_ref);

+ 

+ /**

+  * @brief Extract item from the current collection.

+  *

+  * Function is similar to the \ref col_extract_item.

+  * It acts exactly the same as \ref col_extract_item when the

+  * subcollection parameter of the \ref col_extract_item is set to NULL.

+  *

+  * @param[in]  ci              Collection object.

+  * @param[in]  disposition     Constant that controls how the relative

+  *                             position of the item to extract is determined.

+  *                             For more information see \ref dispvalues

+  *                             "disposition constants".

+  * @param[in]  refprop         Name of the property to relate to.

+  *                             This can be used to specify that function

+  *                             should extract next item after the item

+  *                             with this name. Leave NULL if the

+  *                             disposition you are using does not

+  *                             relate to an item in the collection.

+  * @param[in]  idx             Index of the property to extract.

+  *                             Useful for multi-value properties where

+  *                             several properties have same name in a row.

+  * @param[in]  type            Type filter. Only the item of the matching

+  *                             type will be used. It can be a bit mask of

+  *                             more than one type. Use 0 if you do not

+  *                             need to filter by type.

+  * @param[out] ret_ref         Variable will receive the value of the

+  *                             pointer to the extracted item.

+  *

+  * @return 0          - Item was successfully extracted.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOENT     - Sub collection is not found.

+  *                      The position can't be determined. For example

+  *                      extracting next item after item with name "foo"

+  *                      will cause this error if item "foo" is the last

+  *                      item in the collection. There are other cases

+  *                      when this error can be returned but the common

+  *                      theme is that something was not found.

+  * @return ENOSYS       Unknown disposition value.

   */

- int col_delete_property(struct collection_item *ci,    /* A collection of items */

-                         const char *property_to_find,  /* Name to match */

-                         int type,                      /* Type filter */

-                         int mode_flags);               /* How to traverse the collection  */

+ int col_extract_item_from_current(struct collection_item *ci,

+                                   int disposition,

+                                   const char *refprop,

+                                   int idx,

+                                   int type,

+                                   struct collection_item **ret_ref);

  

+ /**

+  * @brief Remove item from the collection.

+  *

+  * Function internally calls \ref col_extract_item and then

+  * \ref col_delete_item for the extracted item.

+  *

+  * Function is similar to \ref col_delete_property function

+  * but allows more specific information about what item (property)

+  * to remove.

+  *

+  * The header will not be considered for deletion.

+  *

+  * @param[in]  ci              Collection object.

+  * @param[in]  subcollection   Name of the sub collection to remove

+  *                             item from. If NULL, the top level collection

+  *                             is used. One can use "foo!bar!baz"

+  *                             notation to identify the sub collection.

+  * @param[in]  disposition     Constant that controls how the relative

+  *                             position of the item to remove is determined.

+  *                             For more information see \ref dispvalues

+  *                             "disposition constants".

+  * @param[in]  refprop         Name of the property to relate to.

+  *                             This can be used to specify that function

+  *                             should remove next item after the item

+  *                             with this name. Leave NULL if the

+  *                             disposition you are using does not

+  *                             relate to an item in the collection.

+  * @param[in]  idx             Index of the property to remove.

+  *                             Useful for multi-value properties where

+  *                             several properties have same name in a row.

+  * @param[in]  type            Type filter. Only the item of the matching

+  *                             type will be used. It can be a bit mask of

+  *                             more than one type. Use 0 if you do not

+  *                             need to filter by type.

+  *

+  * @return 0          - Item was successfully removed.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOENT     - Sub collection is not found.

+  *                      The position can't be determined. For example

+  *                      deleting next item after item with name "foo"

+  *                      will cause this error if item "foo" is the last

+  *                      item in the collection. There are other cases

+  *                      when this error can be returned but the common

+  *                      theme is that something was not found.

+  * @return ENOSYS       Unknown disposition value.

+  */

+ int col_remove_item(struct collection_item *ci,

+                     const char *subcollection,

+                     int disposition,

+                     const char *refprop,

+                     int idx,

+                     int type);

  

- /* Convenience function to check if the property is indeed in the collection */

- int col_is_item_in_collection(struct collection_item *ci,   /* Collection to find things in */

-                               const char *property_to_find, /* Name to match */

-                               int type,                     /* Type filter */

-                               int mode_flags,               /* How to traverse the collection */

-                               int *found);                  /* Boolean that turns to nonzero if the match is found */

  

+ /**

+  * @brief Remove item from the current collection.

+  *

+  * Function is similar to the \ref col_remove_item.

+  * It acts exactly the same as \ref col_remove_item when the

+  * subcollection parameter of the \ref col_remove_item is set to NULL.

+  *

+  * @param[in]  ci              Collection object.

+  * @param[in]  disposition     Constant that controls how the relative

+  *                             position of the item to remove is determined.

+  *                             For more information see \ref dispvalues

+  *                             "disposition constants".

+  * @param[in]  refprop         Name of the property to relate to.

+  *                             This can be used to specify that function

+  *                             should remove next item after the item

+  *                             with this name. Leave NULL if the

+  *                             disposition you are using does not

+  *                             relate to an item in the collection.

+  * @param[in]  idx             Index of the property to remove.

+  *                             Useful for multi-value properties where

+  *                             several properties have same name in a row.

+  * @param[in]  type            Type filter. Only the item of the matching

+  *                             type will be used. It can be a bit mask of

+  *                             more than one type. Use 0 if you do not

+  *                             need to filter by type.

+  *

+  * @return 0          - Item was successfully removed.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOENT     - Sub collection is not found.

+  *                      The position can't be determined. For example

+  *                      deleting next item after item with name "foo"

+  *                      will cause this error if item "foo" is the last

+  *                      item in the collection. There are other cases

+  *                      when this error can be returned but the common

+  *                      theme is that something was not found.

+  * @return ENOSYS       Unknown disposition value.

+  */

+ int col_remove_item_from_current(struct collection_item *ci,

+                                  int disposition,

+                                  const char *refprop,

+                                  int idx,

+                                  int type);

  

- /* Get collection - get a pointer to a collection included into another collection.

-  * If the collection_to_find is NULL function reterns a reference to the top level collection.

-  * Delete extracted collection after use to decrease reference count.

+ /**

+  * @brief Insert item to the collection.

+  *

+  * <b>WARNING:</b> Only use this function to insert items

+  * that were extracted using \ref col_extract_item or

+  * \ref col_extract_item_from_current.

+  * <b>NEVER</b> use it with items that were returned by:

+  *  - \ref col_get_item

+  *  - \ref addproperty "add property" functions

+  *  - \ref addprop_withref "add property with reference" functions

+  *  - \ref insertproperty "instert property" functions.

+  *

+  * The fundamental difference is that when you extracted item

+  * using col_extract_item() it stops to be managed by a collection.

+  * With such item you can:

+  *  - a) Insert this item into another (or same) collection

+  *  - b) Get item information using corresponding item management functions.

+  *  - c) Destroy item using col_delete_item().

+  *

+  * You are required to do either a) or c) with such item.

+  *

+  * @param[in]  ci              Collection object.

+  * @param[in]  subcollection   Name of the sub collection to insert

+  *                             item into. If NULL, the top level collection

+  *                             is used. One can use "foo!bar!baz"

+  *                             notation to identify the sub collection.

+  * @param[in]  item            Item to insert.

+  * @param[in]  disposition     Constant that controls where to insert

+  *                             the item.

+  *                             For more information see \ref dispvalues

+  *                             "disposition constants".

+  * @param[in]  refprop         Name of the property to relate to.

+  *                             This can be used to specify that function

+  *                             should insert the item after the item

+  *                             with this name. Leave NULL if the

+  *                             disposition you are using does not

+  *                             relate to an item in the collection.

+  * @param[in]  idx             Index of the property to insert.

+  *                             Useful for multi-value properties where

+  *                             several properties have same name in a row.

+  * @param[in]  flags           Flags that control naming issues.

+  *                             See \ref insflags "insert flags"

+  *                             for more details.

+  *

+  * @return 0          - Item was successfully extracted.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOENT     - Sub collection is not found.

+  *                      The position can't be determined. For example

+  *                      extracting next item after item with name "foo"

+  *                      will cause this error if item "foo" is the last

+  *                      item in the collection. There are other cases

+  *                      when this error can be returned but the common

+  *                      theme is that something was not found.

+  * @return ENOSYS       Unknown disposition value.

+  * @return EEXIST       If duplicate name/type checking is turned on

+  *                      and duplicate name/type is detected.

+  *

+  */

+ int col_insert_item(struct collection_item *ci,

+                     const char *subcollection,

+                     struct collection_item *item,

+                     int disposition,

+                     const char *refprop,

+                     int idx,

+                     unsigned flags);

+ 

+ /**

+  * @brief Insert item to the current collection.

+  *

+  * Function is equivalent to \ref col_insert_item with

+  * subcollection parameter equal NULL.

+  *

+  * @param[in]  ci              Collection object.

+  * @param[in]  item            Item to insert.

+  * @param[in]  disposition     Constant that controls where to insert

+  *                             the item.

+  *                             For more information see \ref dispvalues

+  *                             "disposition constants".

+  * @param[in]  refprop         Name of the property to relate to.

+  *                             This can be used to specify that function

+  *                             should insert the item after the item

+  *                             with this name. Leave NULL if the

+  *                             disposition you are using does not

+  *                             relate to an item in the collection.

+  * @param[in]  idx             Index of the property to insert.

+  *                             Useful for multi-value properties where

+  *                             several properties have same name in a row.

+  * @param[in]  flags           Flags that control naming issues.

+  *                             See \ref insflags "insert flags"

+  *                             for more details.

+  *

+  * @return 0          - Item was successfully extracted.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  * @return ENOENT     - Sub collection is not found.

+  *                      The position can't be determined. For example

+  *                      extracting next item after item with name "foo"

+  *                      will cause this error if item "foo" is the last

+  *                      item in the collection. There are other cases

+  *                      when this error can be returned but the common

+  *                      theme is that something was not found.

+  * @return ENOSYS       Unknown disposition value.

+  * @return EEXIST       If duplicate name/type checking is turned on

+  *                      and duplicate name/type is detected.

+  *

+  */

+ int col_insert_item_into_current(struct collection_item *ci,

+                                  struct collection_item *item,

+                                  int disposition,

+                                  const char *refprop,

+                                  int idx,

+                                  unsigned flags);

+ 

+ 

+ 

+ /**

+  * @brief Delete extracted item.

+  *

+  * <b>NEVER</b> use this function to delete an item

+  * that was not previously extracted from the collection.

+  *

+  * There is currently no function to create an item aside and

+  * then insert it into the collection so the col_delete_item

+  * has only one use. In future this may change.

+  *

+  * @param[in]  item            Item to delete.

+  *

+  */

+ void col_delete_item(struct collection_item *item);

+ 

+ /**

+  * @}

   */

- int col_get_collection_reference(struct collection_item *ci,          /* High level collection */

-                                  struct collection_item **acceptor,   /* The pointer that will accept extracted handle */

-                                  const char *collection_to_find);     /* Name to of the collection */

  

- /* Get collection - if current item is a reference get a real collection from it. */

- /* Delete extracted collection after use to decrease reference count. */

- int col_get_reference_from_item(struct collection_item *ci,          /* Reference element of the high level collection */

-                                 struct collection_item **acceptor);  /* The pointer that will accept extracted handle */

  

- /* Bind iterator to a collection */

- int col_bind_iterator(struct collection_iterator **iterator, /* The iterator to bind */

-                       struct collection_item *ci,            /* Collection to bind iterator to */

-                       int mode_flags);                       /* How the collection needs to be iterated */

+ /**

+  * @defgroup iterfunc Iterator interface

+  *

+  * The functions in this section allow iterating

+  * through a collection in a loop where the caller

+  * implements the loop. It is different from the search and

+  * traverse functions described in other sections because those

+  * functions implement the loop themselves and call provided

+  * callback in a specific situation.

+  *

+  * @{

+  */

+ 

+ /**

+  * @brief Bind iterator to a collection.

+  *

+  * This function creates an iterator object and binds it to the collection.

+  *

+  * @param[out] iterator   Newly created iterator object.

+  * @param[in]  ci         Collection to iterate.

+  * @param[in]  mode_flags Flags define how to traverse the collection.

+  *                        For more information see \ref traverseconst

+  *                        "constants defining traverse modes".

+  *

+  * @return 0          - Iterator was created successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  *

+  */

+ int col_bind_iterator(struct collection_iterator **iterator,

+                       struct collection_item *ci,

+                       int mode_flags);

  

- /* Unbind the iterator from the collection */

+ /**

+  * @brief Unbind the iterator from the collection.

+  *

+  * @param[in] iterator   Iterator object to free.

+  */

  void col_unbind_iterator(struct collection_iterator *iterator);

  

- /* Get items from the collection one by one following the tree */

+ /**

+  * @brief Iterate collection.

+  *

+  * Advance to next item in the collection. After the iterator is

+  * bound it does not point to any item in the collection.

+  * Use this function in the loop to step through all items

+  * in the collection. See unit test for code examples.

+  *

+  * @param[in]  iterator   Iterator object to use.

+  * @param[out] item       Pointer to the collection item.

+  *                        Do not destroy or alter this pointer

+  *                        in any ways. To access the internals

+  *                        of the item use \ref getitem "item management"

+  *                        functions.

+  *                        The value of the item will be set to NULL if

+  *                        the end of the collection is reached.

+  *

+  * @return 0          - Item was successfully retrieved.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  */

  int col_iterate_collection(struct collection_iterator *iterator,

                             struct collection_item **item);

  

- /* Stop processing this subcollection and move to the next item in the

-  * collection 'level' levels up.

-  * The 'Level' parameter indicates how many levels up you want to jump.

-  * If 0 - call is a no op.

-  * If the depth is less then requested level the iterator will

-  * get to the 0 level and next call to col_iterate_collection

-  * will return NULL item.

+ /**

+  * @brief Move up

+  *

+  * Stop processing this sub collection and move to the next item in the

+  * collection some levels up.

+  *

+  * @param[in]  iterator   Iterator object to use.

+  * @param[in]  level      Indicates how many levels up you want to jump.

+  *                        If 0 - call is a no op.

+  *                        If the depth is less then requested level

+  *                        the iterator will get to the 0 level and

+  *                        next call to \ref col_iterate_collection

+  *                        will return NULL item.

+  *

+  * @return 0          - Iterator was successfully repositioned.

+  * @return EINVAL     - The value of some of the arguments is invalid.

   */

  int col_iterate_up(struct collection_iterator *iterator, unsigned level);

  

- /* How deep are we relative to the top level.

-  * This function might report depth that might look misleading.

-  * The reason is that traverse flags affect the internal

+ /**

+  * @brief Get current depth

+  *

+  * How deep are we relative to the top level?

+  * This function will report depth that in some cases might look

+  * misleading. The reason is that traverse flags affect the internal

   * level we are on at each moment.

   * For example the default traverse behavior is to show

   * references to the sub collections.
@@ -714,404 +3079,111 @@

   * denote the level inside collection.

   * Now imagine that this collection is empty so the attempt to read

   * element will push you automatically one level up (in absence of the

-  * COL_TRAVERSE_END flag). If in this situation you encounter another

+  * \ref COL_TRAVERSE_END flag). If in this situation you encounter another

   * collection the reference will be returned and level automatically

   * adjusted to level inside the collection.

   * The point is that the level is reliable only after

   * a data item was returned.

-  * To avoid this ambiguity another function is introduced.

-  * See below.

- */

+  * To avoid this ambiguity another function \ref col_get_item_depth

+  * was introduced.

+  *

+  * @param[in]  iterator   Iterator object to use.

+  * @param[in]  depth      The variable will receive the depth

+  *                        the iterator is on. The value is 0

+  *                        if the iterator is on the top level.

+  *

+  * @return 0          - Success.

+  * @return EINVAL     - The value of some of the arguments is invalid.

+  */

  int col_get_iterator_depth(struct collection_iterator *iterator, int *depth);

  

- /* Returns item depth for the last read item.

-  * Returns 0 if no item has been read yet.

+ /**

+  * @brief Get depth of the last returned item.

+  *

+  * @param[in]  iterator   Iterator object to use.

+  * @param[in]  depth      The variable will receive the depth

+  *                        the iterator is on.

+  *                        Item from the top level will have

+  *                        depth equal to 0. The value of 0

+  *                        will also be returned if no item

+  *                        was read so far.

+  *

+  * @return 0          - Success.

+  * @return EINVAL     - The value of some of the arguments is invalid.

   */

  int col_get_item_depth(struct collection_iterator *iterator, int *depth);

  

- /* Pins down the iterator to loop around current point */

+ /**

+  * @brief Pin iterator

+  *

+  * Pins down the iterator to loop around current point.

+  *

+  * This feature allows some search optimization.

+  * The idea is to be able to put a 'pin'

+  * into a specific place while iterating

+  * the collection and make this place a new

+  * "wrap around" place for the collection.

+  * This means that next time you

+  * iterate this collection you will start

+  * iterating from the next item and

+  * the item you got before setting pin will be

+  * the last in your iteration cycle.

+  *

+  * Here is the example:

+  *

+  * Assume you have two collections that you need

+  * to compare and perform some action on collection

+  * 1 based on the presence of the item in collection 2.

+  *  - Collection1 = A, B, C, D, E, F

+  *  - Collection2 = A, C, F

+  *

+  * The usual approach is to try A from collection 1

+  * against A, B, C from collection 2. "A" will be found

+  *  right away. But to find "F" it has to be compared

+  * to "A" and "C" first. The fact that the collections

+  * are to some extent ordered can in some cases

+  * help to reduce the number of comparisons.

+  * If we found "C" in the list we can put a "pin"

+  * into the collection there causing the iterator

+  * to warp at this "pin" point. Since "D" and "E"

+  * are not in the second collection we will have

+  * to make same amount of comparisons in traditional

+  * or "pinned" case to not find them.

+  * To find "F" in pinned case there will be just one

+  * comparison.

+  *  - Traditional case = 1 + 3 + 2 + 3 + 3 + 3 = 15

+  *  - Pinned case = 1 + 3 + 1 + 3 + 3 + 1 = 12

+  *

+  * It is a 20% comparison reduction.

+  *

+  * @param[in]  iterator   Iterator object to use.

+  *

+  * @return 0          - Success.

+  * @return EINVAL     - The value of the argument is invalid.

+  */

  void col_pin_iterator(struct collection_iterator *iterator);

  

- /* Rewinds iterator to the beginning */

+ /**

+  * @brief Rewind iterator

+  *

+  * Rewinds iterator to the current pin point which is by

+  * default the beginning of the collection until changed by

+  * \ref col_pin_iterator function.

+  *

+  * @param[in]  iterator   Iterator object to use.

+  *

+  * @return 0          - Success.

+  * @return EINVAL     - The value of the argument is invalid.

+  */

  void col_rewind_iterator(struct collection_iterator *iterator);

  

- /* Set collection class */

- int col_set_collection_class(struct collection_item *item, /* Collection */

-                              unsigned cclass);             /* Collection class */

- 

- /* Get collection class */

- int col_get_collection_class(struct collection_item *item, /* Collection */

-                              unsigned *cclass);            /* Collection class */

- 

- 

- /* Get collection count */

- int col_get_collection_count(struct collection_item *item, /* Collection */

-                              unsigned *count);             /* Number of elements in

-                                                             * this collection.

-                                                             * Each subcollection is

-                                                             * counted as 1 element.

-                                                             * Header is also counted.

-                                                             */

- 

- /* Convenience function to check if the collection is of the specific class */

- /* In case of internal error assumes that collection is not of the right class */

- int col_is_of_class(struct collection_item *item,  /* Collection */

-                     unsigned cclass);              /* Class of the collection */

- 

- 

- /*

-  * Series of collection functions that allow using collection as a stack or a FIFO

-  */

- 

- 

- /* Extract the item from the collection */

- /* The header will not be considered for extraction. */

- int col_extract_item(struct collection_item *ci,        /* Top collection */

-                      const char *subcollection,         /* Sub collection */

-                      int disposition,                   /* Which to extract */

-                      const char *refprop,               /* Property to relate to */

-                      int idx,                           /* Index of the property to extract. See notes. */

-                      int type,                          /* Type filter */

-                      struct collection_item **ret_ref); /* Returns the reference back */

- 

- /* Similar extraction function as above just considers only one level. */

- int col_extract_item_from_current(struct collection_item *ci,        /* Top collection */

-                                   int disposition,                   /* Which to extract */

-                                   const char *refprop,               /* Property to relate to */

-                                   int idx,                           /* Index of the property to extract. See notes. */

-                                   int type,                          /* Type filter */

-                                   struct collection_item **ret_ref); /* Returns the reference back */

- 

- /* Remove item (property) from collection.

-  * It is similar to delete_property function but allows more specific

-  * information about what item (property) to remove.

-  * The header will not be considered for deletion.

-  */

- int col_remove_item(struct collection_item *ci,        /* Top collection */

-                     const char *subcollection,         /* Sub collection */

-                     int disposition,                   /* Which to remove */

-                     const char *refprop,               /* Property to relate to */

-                     int idx,                           /* Index of the property to remove. See notes. */

-                     int type);                         /* Type filter */

- 

- /* Similar function as above just considers only one level. */

- int col_remove_item_from_current(struct collection_item *ci,        /* Top collection */

-                                  int disposition,                   /* Which to remove */

-                                  const char *refprop,               /* Property to relate to */

-                                  int idx,                           /* Index of the property to remove. See notes. */

-                                  int type);                         /* Type filter */

- 

- 

- /* Insert item to the collection */

- /* WARNING: Only use this function to insert items

-  * that were extracted using extract_item().

-  * NEVER use it with items that were returned

-  * by col_get_item() or col_add_xxx_property_with_ref() or

-  * with col_insert_xxx_property_with_ref().

-  * The fundamental difference is that when you extracted item

-  * using col_extract_item() it stops to be managed by a collection.

-  * With such item you can:

-  * a) Insert this item into another (or same) collection

-  * b) Get item information using col_get_item_xxx() functions.

-  * c) Destroy item using col_delete_item().

-  * You are required to do either a) or c) with such item.

-  */

- int col_insert_item(struct collection_item *collection, /* Top collection */

-                     const char *subcollection,          /* Sub collection */

-                     struct collection_item *item,       /* Item to insert */

-                     int disposition,                    /* What should be the position of the item */

-                     const char *refprop,                /* Property to relate to */

-                     int idx,                            /* Index of the property to extract. See notes. */

-                     unsigned flags);                    /* Flags that control naming issues */

  

- /* Insert the item into the top level collection (similar to the function above)

-  * but does not provide access to the sub collection.

+ /**

+  * @}

   */

- int col_insert_item_into_current(struct collection_item *collection,

-                                  struct collection_item *item,

-                                  int disposition,

-                                  const char *refprop,

-                                  int idx,

-                                  unsigned flags);

- 

  

- 

- /* Function to delete the item */

- void col_delete_item(struct collection_item *item);

- 

- /* Possible dispositions for insert, extract and delete function(s).

-  * Not all of these dispositions are implemented day one.

-  * If disposition is not implemented the function

-  * will return error ENOSYS.

+ /**

+  * @}

   */

- #define COL_DSP_END             0 /* Add property to the end of the collection */

-                                   /* Extract or delete last property in collection */

- #define COL_DSP_FRONT           1 /* Add property to the top of the collection */

-                                   /* Extract or delete firat property in collection */

- #define COL_DSP_BEFORE          2 /* Add property before other named property */

-                                   /* Extract or delete property that is before given

-                                    * property. If the given property is first

-                                    * in the list ENOENT is returned.

-                                    */

- #define COL_DSP_AFTER           3 /* Add property immediately after other named property */

-                                   /* Delete or extract property immediately after given

-                                    * property. If the given property is last in the list

-                                    * ENOENT is returned.

-                                    */

- #define COL_DSP_INDEX           4 /* Add, extract or delete property using index.

-                                    * See notes below.

-                                    */

- /* NOTE ABOUT USING: COL_DSP_INDEX. */

- /* The COL_DSP_INDEX adds the item as N-th item after header in the list.

-  * Index is zero based.

-  * If there are less than N items in the list the item is added to the end.

-  * The index value of 0 means that the item will be added immediately

-  * after the header. Index of 1 will mean that it is added after first data item and so on.

-  *

-  * In case of extraction or deletion the N-th item of the collection

-  * will be extracted or deleted.

-  * Index is zero based.

-  * If there are less than N+1 items in the list the function will return ENOENT.

-  */

- 

- /* The following three dispositions operate only with list of duplicate

-  * properties that are going one after another.

-  * In case of addition the property name is taken from the item

-  * and the value refprop is ignored.

-  * In case of extraction or deletion the property name is taken

-  * from the refprop.

-  */

- #define COL_DSP_FIRSTDUP        5 /* Add property as a first dup of the given property */

-                                   /* In case of extraction or deletion extracts or deletes

-                                    * given property.

-                                    */

- #define COL_DSP_LASTDUP         6 /* Add property as a last dup of the given property */

-                                   /* In case of extraction or deletion extracts or deletes

-                                    * last duplicate property in the uninterrupted sequence of

-                                    * properties with the same name.

-                                    */

- #define COL_DSP_NDUP            7 /* Add property as a N-th dup (0- based) of the given property. */

-                                   /* In case of extraction or deletion extracts or deletes

-                                    * N-th (0-based) duplicate of the given property.

-                                    * If index is greater than number of duplicate

-                                    * properties in sequence ENOENT is returned.

-                                    * See more details below.

-                                    */

- 

- /* Other dispositions might be possible in future. */

- 

- /* The COL_DSP_NDUP is used in case of the multi value property

-  * to add a new property with the same name into specific place

-  * in the list of properties with the same name.

-  * The index of 0 will mean to add the property before the first instance of the property with the same name.

-  * If the property does not exist ENOENT will be returned.

-  * If the index is greater than the last property with the same name the item will be added

-  * immediately after last property with the same name.

-  */

- 

- /* Flags that can be used with insert functions */

- #define COL_INSERT_NOCHECK      0   /* This is the default mode - no dup checks on insert */

- #define COL_INSERT_DUPOVER      1   /* Check for dup name and overwrite - position ignored */

- #define COL_INSERT_DUPOVERT     2   /* Check for dup name and type and overwrite - position ignored */

- #define COL_INSERT_DUPERROR     3   /* Return error EEXIST if the entry with the same name exists */

- #define COL_INSERT_DUPERRORT    4   /* Return error EEXIST if the entry with the same name and type exists */

- #define COL_INSERT_DUPMOVE      5   /* Check for dups, overwrite, extracts and

-                                      * then move to the position requested */

- #define COL_INSERT_DUPMOVET     6   /* Check for dup name and type, overwrite, extracts

-                                      * and then move to the position requested */

- 

- /* In future can be made more complex */

- 

- /* NOTE ABOUT FLAGS: Use of the DUP checking flags is costly since it requires a forward look up of the whole

-  * collection before the item is inserted. Do not use it until it is absolutely necessary.

-  */

- 

- 

- 

- /* The attributes in the collection are always added to the end.

-  * The family of the insert_xxx(functions) provides

-  * much more flexibility than add_xxx_property_xxx() functions.

-  */

- 

- /* Insert property with reference */

- int col_insert_property_with_ref(struct collection_item *ci,        /* A collection of items */

-                                  const char *subcollection,         /* Sub collection */

-                                  int disposition,                   /* Where to insert */

-                                  const char *refprop,               /* Property to relate to */

-                                  int idx,                           /* Index of the property to add */

-                                  unsigned flags,                    /* Flags that control naming issues */

-                                  const char *property,              /* Name */

-                                  int type,                          /* Data type */

-                                  const void *data,                  /* Pointer to the data */

-                                  int length,                        /* Length of the data. For

-                                                                      * strings it includes the

-                                                                      * trailing 0

-                                                                      */

-                                  struct collection_item **ret_ref); /* Returns the reference back */

- 

- 

- int col_insert_str_property(struct collection_item *ci,        /* A collection of items */

-                             const char *subcollection,         /* Sub collection */

-                             int disposition,                   /* Where to insert */

-                             const char *refprop,               /* Property to relate to */

-                             int idx,                           /* Index of the property to add */

-                             unsigned flags,                    /* Flags that control naming issues */

-                             const char *property,              /* Name */

-                             const char *string,                /* String */

-                             int length);                       /* Length */

- 

- int col_insert_binary_property(struct collection_item *ci,        /* A collection of items */

-                                const char *subcollection,         /* Sub collection */

-                                int disposition,                   /* Where to insert */

-                                const char *refprop,               /* Property to relate to */

-                                int idx,                           /* Index of the property to add */

-                                unsigned flags,                    /* Flags that control naming issues */

-                                const char *property,              /* Name */

-                                void *binary_data,                 /* Binary data */

-                                int length);                       /* Length */

- 

- 

- int col_insert_int_property(struct collection_item *ci,        /* A collection of items */

-                             const char *subcollection,         /* Sub collection */

-                             int disposition,                   /* Where to insert */

-                             const char *refprop,               /* Property to relate to */

-                             int idx,                           /* Index of the property to add */

-                             unsigned flags,                    /* Flags that control naming issues */

-                             const char *property,              /* Name */

-                             int number);                       /* Integer */

- 

- 

- int col_insert_unsinged_property(struct collection_item *ci,        /* A collection of items */

-                                  const char *subcollection,         /* Sub collection */

-                                  int disposition,                   /* Where to insert */

-                                  const char *refprop,               /* Property to relate to */

-                                  int idx,                           /* Index of the property to add */

-                                  unsigned flags,                    /* Flags that control naming issues */

-                                  const char *property,              /* Name */

-                                  unsigned number);                  /* Unsigned */

- 

- 

- int col_insert_long_property(struct collection_item *ci,        /* A collection of items */

-                              const char *subcollection,         /* Sub collection */

-                              int disposition,                   /* Where to insert */

-                              const char *refprop,               /* Property to relate to */

-                              int idx,                           /* Index of the property to add */

-                              unsigned flags,                    /* Flags that control naming issues */

-                              const char *property,              /* Name */

-                              long number);                      /* Long */

- 

- int col_insert_ulong_property(struct collection_item *ci,        /* A collection of items */

-                               const char *subcollection,         /* Sub collection */

-                               int disposition,                   /* Where to insert */

-                               const char *refprop,               /* Property to relate to */

-                               int idx,                           /* Index of the property to add */

-                               unsigned flags,                    /* Flags that control naming issues */

-                               const char *property,              /* Name */

-                               unsigned long number);             /* Unsigned long */

- 

- int col_insert_double_property(struct collection_item *ci,        /* A collection of items */

-                                const char *subcollection,         /* Sub collection */

-                                int disposition,                   /* Where to insert */

-                                const char *refprop,               /* Property to relate to */

-                                int idx,                           /* Index of the property to add */

-                                unsigned flags,                    /* Flags that control naming issues */

-                                const char *property,              /* Name */

-                                double number);                    /* Double */

- 

- int col_insert_bool_property(struct collection_item *ci,        /* A collection of items */

-                              const char *subcollection,         /* Sub collection */

-                              int disposition,                   /* Where to insert */

-                              const char *refprop,               /* Property to relate to */

-                              int idx,                           /* Index of the property to add */

-                              unsigned flags,                    /* Flags that control naming issues */

-                              const char *property,              /* Name */

-                              unsigned char logical);            /* Bool */

- 

- 

- 

- int col_insert_str_property_with_ref(struct collection_item *ci,        /* A collection of items */

-                                      const char *subcollection,         /* Sub collection */

-                                      int disposition,                   /* Where to insert */

-                                      const char *refprop,               /* Property to relate to */

-                                      int idx,                           /* Index of the property to add */

-                                      unsigned flags,                    /* Flags that control naming issues */

-                                      const char *property,              /* Name */

-                                      char *string,                      /* String */

-                                      int length,                        /* Length */

-                                      struct collection_item **ret_ref); /* Returns the reference back */

- 

- int col_insert_binary_property_with_ref(struct collection_item *ci,        /* A collection of items */

-                                         const char *subcollection,         /* Sub collection */

-                                         int disposition,                   /* Where to insert */

-                                         const char *refprop,               /* Property to relate to */

-                                         int idx,                           /* Index of the property to add */

-                                         unsigned flags,                    /* Flags that control naming issues */

-                                         const char *property,              /* Name */

-                                         void *binary_data,                 /* Binary data */

-                                         int length,                        /* Length */

-                                         struct collection_item **ret_ref); /* Returns the reference back */

- 

- 

- int col_insert_int_property_with_ref(struct collection_item *ci,        /* A collection of items */

-                                      const char *subcollection,         /* Sub collection */

-                                      int disposition,                   /* Where to insert */

-                                      const char *refprop,               /* Property to relate to */

-                                      int idx,                           /* Index of the property to add */

-                                      unsigned flags,                    /* Flags that control naming issues */

-                                      const char *property,              /* Name */

-                                      int number,                        /* Integer */

-                                      struct collection_item **ret_ref); /* Returns the reference back */

- 

- 

- int col_insert_unsinged_property_with_ref(struct collection_item *ci,        /* A collection of items */

-                                           const char *subcollection,         /* Sub collection */

-                                           int disposition,                   /* Where to insert */

-                                           const char *refprop,               /* Property to relate to */

-                                           int idx,                           /* Index of the property to add */

-                                           unsigned flags,                    /* Flags that control naming issues */

-                                           const char *property,              /* Name */

-                                           unsigned number,                   /* Unsigned */

-                                           struct collection_item **ret_ref); /* Returns the reference back */

- 

- int col_insert_long_property_with_ref(struct collection_item *ci,        /* A collection of items */

-                                       const char *subcollection,         /* Sub collection */

-                                       int disposition,                   /* Where to insert */

-                                       const char *refprop,               /* Property to relate to */

-                                       int idx,                           /* Index of the property to add */

-                                       unsigned flags,                    /* Flags that control naming issues */

-                                       const char *property,              /* Name */

-                                       long number,                       /* Long */

-                                       struct collection_item **ret_ref); /* Returns the reference back */

- 

- int col_insert_ulong_property_with_ref(struct collection_item *ci,        /* A collection of items */

-                                        const char *subcollection,         /* Sub collection */

-                                        int disposition,                   /* Where to insert */

-                                        const char *refprop,               /* Property to relate to */

-                                        int idx,                           /* Index of the property to add */

-                                        unsigned flags,                    /* Flags that control naming issues */

-                                        const char *property,              /* Name */

-                                        unsigned long number,              /* Unsigned long */

-                                        struct collection_item **ret_ref); /* Returns the reference back */

- 

- int col_insert_double_property_with_ref(struct collection_item *ci,        /* A collection of items */

-                                         const char *subcollection,         /* Sub collection */

-                                         int disposition,                   /* Where to insert */

-                                         const char *refprop,               /* Property to relate to */

-                                         int idx,                           /* Index of the property to add */

-                                         unsigned flags,                    /* Flags that control naming issues */

-                                         const char *property,              /* Name */

-                                         double number,                     /* Double */

-                                         struct collection_item **ret_ref); /* Returns the reference back */

- 

- int col_insert_bool_property_with_ref(struct collection_item *ci,        /* A collection of items */

-                                       const char *subcollection,         /* Sub collection */

-                                       int disposition,                   /* Where to insert */

-                                       const char *refprop,               /* Property to relate to */

-                                       int idx,                           /* Index of the property to add */

-                                       unsigned flags,                    /* Flags that control naming issues */

-                                       const char *property,              /* Name */

-                                       unsigned char logical,             /* Bool */

-                                       struct collection_item **ret_ref); /* Returns the reference back */

- 

  

  #endif

@@ -107,7 +107,7 @@

                              int idx,

                              unsigned flags,

                              const char *property,

-                             int number)

+                             int32_t number)

  {

      int error = EOK;

  
@@ -122,7 +122,7 @@

                                           property,

                                           COL_TYPE_INTEGER,

                                           (void *)&number,

-                                          sizeof(int),

+                                          sizeof(int32_t),

                                           NULL);

  

      TRACE_FLOW_NUMBER("col_insert_int_property returning", error);
@@ -138,7 +138,7 @@

                                   int idx,

                                   unsigned flags,

                                   const char *property,

-                                  unsigned number)

+                                  uint32_t number)

  {

      int error = EOK;

  
@@ -153,7 +153,7 @@

                                           property,

                                           COL_TYPE_UNSIGNED,

                                           (void *)&number,

-                                          sizeof(unsigned),

+                                          sizeof(uint32_t),

                                           NULL);

  

      TRACE_FLOW_NUMBER("col_insert_unsigned_property returning", error);
@@ -169,7 +169,7 @@

                               int idx,

                               unsigned flags,

                               const char *property,

-                              long number)

+                              int64_t number)

  {

      int error = EOK;

  
@@ -184,7 +184,7 @@

                                           property,

                                           COL_TYPE_LONG,

                                           (void *)&number,

-                                          sizeof(long),

+                                          sizeof(int64_t),

                                           NULL);

  

      TRACE_FLOW_NUMBER("col_insert_long_property returning", error);
@@ -199,7 +199,7 @@

                                int idx,

                                unsigned flags,

                                const char *property,

-                               unsigned long number)

+                               uint64_t number)

  {

      int error = EOK;

  
@@ -214,7 +214,7 @@

                                           property,

                                           COL_TYPE_ULONG,

                                           (void *)&number,

-                                          sizeof(unsigned long),

+                                          sizeof(uint64_t),

                                           NULL);

  

      TRACE_FLOW_NUMBER("col_insert_ulong_property returning", error);
@@ -290,16 +290,20 @@

                                       int idx,

                                       unsigned flags,

                                       const char *property,

-                                      char *string,

+                                      const char *string,

                                       int length,

                                       struct collection_item **ret_ref)

  {

      int error = EOK;

+     void *ptr;

  

      TRACE_FLOW_STRING("col_insert_string_property_with_ref", "Entry.");

  

      if (length == 0) length = strlen(string) + 1;

  

+     /* Work around a compilation warning */

+     memcpy(&ptr, &string, sizeof(void *));

+ 

      error = col_insert_property_with_ref(ci,

                                           subcollection,

                                           disposition,
@@ -308,7 +312,7 @@

                                           flags,

                                           property,

                                           COL_TYPE_STRING,

-                                          (void *)string,

+                                          ptr,

                                           length,

                                           ret_ref);

  
@@ -356,7 +360,7 @@

                                       int idx,

                                       unsigned flags,

                                       const char *property,

-                                      int number,

+                                      int32_t number,

                                       struct collection_item **ret_ref)

  {

      int error = EOK;
@@ -372,7 +376,7 @@

                                           property,

                                           COL_TYPE_INTEGER,

                                           (void *)&number,

-                                          sizeof(int),

+                                          sizeof(int32_t),

                                           ret_ref);

  

      TRACE_FLOW_NUMBER("col_insert_int_property_with_ref returning", error);
@@ -388,7 +392,7 @@

                                            int idx,

                                            unsigned flags,

                                            const char *property,

-                                           unsigned number,

+                                           uint32_t number,

                                            struct collection_item **ret_ref)

  {

      int error = EOK;
@@ -404,7 +408,7 @@

                                           property,

                                           COL_TYPE_UNSIGNED,

                                           (void *)&number,

-                                          sizeof(unsigned),

+                                          sizeof(uint32_t),

                                           ret_ref);

  

      TRACE_FLOW_NUMBER("col_insert_unsigned_property_with_ref returning", error);
@@ -419,7 +423,7 @@

                                        int idx,

                                        unsigned flags,

                                        const char *property,

-                                       long number,

+                                       int64_t number,

                                        struct collection_item **ret_ref)

  {

      int error = EOK;
@@ -435,7 +439,7 @@

                                           property,

                                           COL_TYPE_LONG,

                                           (void *)&number,

-                                          sizeof(long),

+                                          sizeof(int64_t),

                                           ret_ref);

  

      TRACE_FLOW_NUMBER("col_insert_long_property_with_ref returning", error);
@@ -450,7 +454,7 @@

                                         int idx,

                                         unsigned flags,

                                         const char *property,

-                                        unsigned long number,

+                                        uint64_t number,

                                         struct collection_item **ret_ref)

  {

      int error = EOK;
@@ -466,7 +470,7 @@

                                           property,

                                           COL_TYPE_ULONG,

                                           (void *)&number,

-                                          sizeof(unsigned long),

+                                          sizeof(uint64_t),

                                           ret_ref);

  

      TRACE_FLOW_NUMBER("col_insert_ulong_property_with_ref returning", error);
@@ -590,7 +594,7 @@

  int col_add_int_property(struct collection_item *ci,

                           const char *subcollection,

                           const char *property,

-                          int number)

+                          int32_t number)

  {

      int error = EOK;

  
@@ -613,7 +617,7 @@

  int col_add_unsigned_property(struct collection_item *ci,

                                const char *subcollection,

                                const char *property,

-                               unsigned int number)

+                               uint32_t number)

  {

      int error = EOK;

  
@@ -636,7 +640,7 @@

  int col_add_long_property(struct collection_item *ci,

                            const char *subcollection,

                            const char *property,

-                           long number)

+                           int64_t number)

  {

      int error = EOK;

  
@@ -660,7 +664,7 @@

  int col_add_ulong_property(struct collection_item *ci,

                             const char *subcollection,

                             const char *property,

-                            unsigned long number)

+                            uint64_t number)

  {

      int error = EOK;

  
@@ -809,7 +813,7 @@

  int col_add_int_property_with_ref(struct collection_item *ci,

                                    const char *subcollection,

                                    const char *property,

-                                   int number,

+                                   int32_t number,

                                    struct collection_item **ref_ret)

  {

      int error = EOK;
@@ -834,7 +838,7 @@

  int col_add_unsigned_property_with_ref(struct collection_item *ci,

                                         const char *subcollection,

                                         const char *property,

-                                        unsigned int number,

+                                        uint32_t number,

                                         struct collection_item **ref_ret)

  {

      int error = EOK;
@@ -859,7 +863,7 @@

  int col_add_long_property_with_ref(struct collection_item *ci,

                                     const char *subcollection,

                                     const char *property,

-                                    long number,

+                                    int64_t number,

                                     struct collection_item **ref_ret)

  {

      int error = EOK;
@@ -884,7 +888,7 @@

  int col_add_ulong_property_with_ref(struct collection_item *ci,

                                      const char *subcollection,

                                      const char *property,

-                                     unsigned long number,

+                                     uint64_t number,

                                      struct collection_item **ref_ret)

  {

      int error = EOK;
@@ -1025,13 +1029,13 @@

  int col_update_int_property(struct collection_item *ci,

                              const char *property,

                              int mode_flags,

-                             int number)

+                             int32_t number)

  {

      int error = EOK;

      TRACE_FLOW_STRING("col_update_int_property", "Entry.");

  

      error = col_update_property(ci, property, COL_TYPE_INTEGER,

-                                 (void *)(&number), sizeof(int), mode_flags);

+                                 (void *)(&number), sizeof(int32_t), mode_flags);

  

      TRACE_FLOW_NUMBER("col_update_int_property Returning", error);

      return error;
@@ -1041,13 +1045,13 @@

  int col_update_unsigned_property(struct collection_item *ci,

                                   const char *property,

                                   int mode_flags,

-                                  unsigned int number)

+                                  uint32_t number)

  {

      int error = EOK;

      TRACE_FLOW_STRING("col_update_unsigned_property", "Entry.");

  

      error = col_update_property(ci, property, COL_TYPE_UNSIGNED,

-                                 (void *)(&number), sizeof(unsigned int),

+                                 (void *)(&number), sizeof(uint32_t),

                                  mode_flags);

  

      TRACE_FLOW_NUMBER("col_update_unsigned_property Returning", error);
@@ -1058,13 +1062,13 @@

  int col_update_long_property(struct collection_item *ci,

                               const char *property,

                               int mode_flags,

-                              long number)

+                              int64_t number)

  {

      int error = EOK;

      TRACE_FLOW_STRING("col_update_long_property", "Entry.");

  

      error = col_update_property(ci, property, COL_TYPE_LONG,

-                                 (void *)(&number), sizeof(long),

+                                 (void *)(&number), sizeof(int64_t),

                                  mode_flags);

  

      TRACE_FLOW_NUMBER("col_update_long_property Returning", error);
@@ -1076,13 +1080,13 @@

  int col_update_ulong_property(struct collection_item *ci,

                                const char *property,

                                int mode_flags,

-                               unsigned long number)

+                               uint64_t number)

  {

      int error = EOK;

      TRACE_FLOW_STRING("col_update_ulong_property", "Entry.");

  

      error = col_update_property(ci, property, COL_TYPE_ULONG,

-                                 (void *)(&number), sizeof(unsigned long),

+                                 (void *)(&number), sizeof(uint64_t),

                                  mode_flags);

  

      TRACE_FLOW_NUMBER("col_update_ulong_property Returning", error);
@@ -1193,14 +1197,14 @@

  /* Modify item data to be int */

  int col_modify_int_item(struct collection_item *item,

                          const char *property,

-                         int number)

+                         int32_t number)

  {

      int error;

  

      TRACE_FLOW_STRING("col_modify_int_item","Entry");

  

      error = col_modify_item(item, property, COL_TYPE_INTEGER,

-                             (void *)(&number), sizeof(int));

+                             (void *)(&number), sizeof(int32_t));

  

      TRACE_FLOW_STRING("col_modify_int_item", "Exit");

      return error;
@@ -1209,14 +1213,14 @@

  /* Modify item data to be long */

  int col_modify_long_item(struct collection_item *item,

                           const char *property,

-                          long number)

+                          int64_t number)

  {

      int error;

  

      TRACE_FLOW_STRING("col_modify_long_item", "Entry");

  

      error = col_modify_item(item, property, COL_TYPE_LONG,

-                             (void *)(&number), sizeof(long));

+                             (void *)(&number), sizeof(int64_t));

  

      TRACE_FLOW_STRING("col_modify_long_item", "Exit");

      return error;
@@ -1225,14 +1229,14 @@

  /* Modify item data to be unigned long */

  int col_modify_ulong_item(struct collection_item *item,

                            const char *property,

-                           unsigned long number)

+                           uint64_t number)

  {

      int error;

  

      TRACE_FLOW_STRING("col_modify_ulong_item", "Entry");

  

      error = col_modify_item(item, property, COL_TYPE_ULONG,

-                             (void *)(&number), sizeof(unsigned long));

+                             (void *)(&number), sizeof(uint64_t));

  

      TRACE_FLOW_STRING("col_modify_ulong_item", "Exit");

      return error;
@@ -1240,14 +1244,14 @@

  

  int col_modify_unsigned_item(struct collection_item *item,

                               const char *property,

-                              unsigned number)

+                              uint32_t number)

  {

      int error;

  

      TRACE_FLOW_STRING("col_modify_unsigned_item", "Entry");

  

      error = col_modify_item(item, property, COL_TYPE_UNSIGNED,

-                             (void *)(&number), sizeof(unsigned));

+                             (void *)(&number), sizeof(uint32_t));

  

      TRACE_FLOW_STRING("col_modify_unsigned_item", "Exit");

      return error;

@@ -32,7 +32,8 @@

  #include "collection_priv.h"

  #include "collection.h"

  

- 

+ /* Depth for iterator depth allocation block */

+ #define STACK_DEPTH_BLOCK   15

  

  /* Grow iteration stack */

  static int col_grow_stack(struct collection_iterator *iterator, unsigned desired)

@@ -24,66 +24,298 @@

  

  #include "collection.h"

  

+ /**

+  * @defgroup queue QUEUE interface

+  *

+  * Queue interface is a wrapper on top of the \ref collection

+  * interface. It implements a queue using a collection object.

+  *

+  * @{

+  */

  

+ /** @brief Class for the queue object */

  #define COL_CLASS_QUEUE 40000

+ /** @brief All queues use this name as the name of the collection */

  #define COL_NAME_QUEUE  "queue"

  

- /* Function that creates a queue object */

+ /**

+  * @brief Create queue.

+  *

+  * Function that creates a queue object.

+  *

+  * @param[out] queue             Newly created queue object.

+  *

+  * @return 0          - Queue was created successfully.

+  * @return ENOMEM     - No memory.

+  *

+  */

  int col_create_queue(struct collection_item **queue);

  

- /* Function that destroys a queue object */

+ /**

+  * @brief Destroy queue.

+  *

+  * Function that destroys a queue object.

+  *

+  * @param[in] queue              Queue object to destroy.

+  *

+  */

  void col_destroy_queue(struct collection_item *queue);

  

- /* Family of functions that add property to a queue */

- /* Put a string property to queue.  */

+ /**

+  * @brief Add string to the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] string      Null terminated string to add.

+  * @param[in] length      Length of the string. Should include the length

+  *                        of the terminating 0.

+  *                        If the length is shorter than the full string

+  *                        the string will be truncated. If the length is

+  *                        longer than the actual string there might be

+  *                        garbage at end of the actual string.

+  *                        Library will always properly NULL terminate

+  *                        the string at the given position dictated

+  *                        by length but in no way will inspect the validity

+  *                        of the passed in data. This is left to the calling

+  *                        application.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_enqueue_str_property(struct collection_item *queue,

                               const char *property,

                               const char *string,

                               int length);

- /* Put a binary property to queue.  */

+ /**

+  * @brief Add binary value to the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] binary_data Data to add.

+  * @param[in] length      Length of the binary data.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_enqueue_binary_property(struct collection_item *queue,

                                  const char *property,

                                  void *binary_data,

                                  int length);

- /* Put an int property to queue. */

+ /**

+  * @brief Add integer value to the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_enqueue_int_property(struct collection_item *queue,

                               const char *property,

                               int number);

- /* Put an unsigned int property to queue. */

+ /**

+  * @brief Add unsigned value to the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_enqueue_unsigned_property(struct collection_item *queue,

                                    const char *property,

                                    unsigned int number);

- /* Put a long property. */

+ /**

+  * @brief Add long integer value to the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_enqueue_long_property(struct collection_item *queue,

                                const char *property,

                                long number);

- /* Put an unsigned long property. */

+ /**

+  * @brief Add unsigned long value to the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_enqueue_ulong_property(struct collection_item *queue,

                                 const char *property,

                                 unsigned long number);

- /* Put a double property. */

+ /**

+  * @brief Add floating point value to the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_enqueue_double_property(struct collection_item *queue,

                                  const char *property,

                                  double number);

- /* Put a bool property. */

+ /**

+  * @brief Add Boolean value to the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] logical     Value to add.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_enqueue_bool_property(struct collection_item *queue,

                                const char *property,

                                unsigned char logical);

  

- /* Put any property */

- int col_enqueue_any_property(struct collection_item *queue, /* Queue */

-                              const char *property,          /* Name */

-                              int type,                      /* Data type */

-                              void *data,                    /* Pointer to the data */

-                              int length);                   /* Length of the data. For

-                                                              * strings it includes the

-                                                              * trailing 0 */

- /* Push item */

+ /**

+  * @brief Add value of any type to the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] type        Type to use.

+  * @param[in] data        Data to add.

+  * @param[in] length      Length of the data.

+  *

+  * @return 0 - Property was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

+ int col_enqueue_any_property(struct collection_item *queue,

+                              const char *property,

+                              int type,

+                              void *data,

+                              int length);

+ 

+ /**

+  * @brief Push item into the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[in] item        Item to push.

+  *

+  * @return 0          - Item was added successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  */

  int col_enqueue_item(struct collection_item *queue,

                       struct collection_item *item);

  

- 

- /* Get item from queue */

+ /**

+  * @brief Get item from the queue.

+  *

+  * @param[in] queue       Queue object.

+  * @param[out] item       Variable receives the value

+  *                        of the retrieved item.

+  *                        Will be set to NULL if there are

+  *                        no more items in the queue.

+  *

+  * @return 0          - No internal issues detected.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  */

  int col_dequeue_item(struct collection_item *queue,

                       struct collection_item **item);

  

@@ -24,66 +24,301 @@

  

  #include <collection.h>

  

+ /**

+  * @defgroup stack STACK interface

+  *

+  * Stack interface is a wrapper on top of the \ref collection

+  * interface. It implements a stack using a collection object.

+  *

+  * @{

+  */

  

+ /** @brief Class for the stack object */

  #define COL_CLASS_STACK 30000

+ /** @brief All stacks use this name as the name of the collection */

  #define COL_NAME_STACK  "stack"

  

- /* Function that creates a stack object */

+ /**

+  * @brief Create stack.

+  *

+  * Function that creates a stack object.

+  *

+  * @param[out] stack             Newly created stack object.

+  *

+  * @return 0          - Stack was created successfully.

+  * @return ENOMEM     - No memory.

+  *

+  */

  int col_create_stack(struct collection_item **stack);

  

- /* Function that destroys a stack object */

+ /**

+  * @brief Destroy stack.

+  *

+  * Function that destroys a stack object.

+  *

+  * @param[in] stack              Stack object to destroy.

+  *

+  */

+ 

  void col_destroy_stack(struct collection_item *stack);

  

- /* Family of functions that push property to stack */

- /* Push a string property to stack.  */

+ /**

+  * @brief Push string to the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] string      Null terminated string to add.

+  * @param[in] length      Length of the string. Should include the length

+  *                        of the terminating 0.

+  *                        If the length is shorter than the full string

+  *                        the string will be truncated. If the length is

+  *                        longer than the actual string there might be

+  *                        garbage at end of the actual string.

+  *                        Library will always properly NULL terminate

+  *                        the string at the given position dictated

+  *                        by length but in no way will inspect the validity

+  *                        of the passed in data. This is left to the calling

+  *                        application.

+  *

+  * @return 0 - Property was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_push_str_property(struct collection_item *stack,

                            const char *property,

                            const char *string,

                            int length);

- /* Push a binary property to stack.  */

+ /**

+  * @brief Push binary value to the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] binary_data Data to add.

+  * @param[in] length      Length of the binary data.

+  *

+  * @return 0 - Property was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_push_binary_property(struct collection_item *stack,

                               const char *property,

                               void *binary_data,

                               int length);

- /* Push an int property to stack. */

+ /**

+  * @brief Push integer value to the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_push_int_property(struct collection_item *stack,

                            const char *property,

                            int number);

- /* Push an unsigned int property to stack. */

+ /**

+  * @brief Push unsigned value to the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_push_unsigned_property(struct collection_item *stack,

                                 const char *property,

                                 unsigned int number);

- /* Push a long property. */

+ /**

+  * @brief Push long integer value to the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_push_long_property(struct collection_item *stack,

                             const char *property,

                             long number);

- /* Push an unsigned long property. */

+ /**

+  * @brief Push unsigned long value to the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_push_ulong_property(struct collection_item *stack,

                              const char *property,

                              unsigned long number);

- /* Push a double property. */

+ /**

+  * @brief Push floating point value to the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] number      Value to add.

+  *

+  * @return 0 - Property was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_push_double_property(struct collection_item *stack,

                               const char *property,

                               double number);

- /* Push a bool property. */

+ /**

+  * @brief Push Boolean value to the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] logical     Value to add.

+  *

+  * @return 0 - Property was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

  int col_push_bool_property(struct collection_item *stack,

                             const char *property,

                             unsigned char logical);

  

- /* Push any property */

- int col_push_any_property(struct collection_item *stack, /* Stack */

-                           const char *property,          /* Name */

-                           int type,                      /* Data type */

-                           void *data,                    /* Pointer to the data */

-                           int length);                   /* Length of the data. For

-                                                           * strings it includes the

-                                                           * trailing 0 */

- /* Push item */

+ /**

+  * @brief Push value of any type to the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] property    Name of the property.<br>

+  *                        Name should consist of the ASCII characters

+  *                        with codes non less than space.

+  *                        Exclamation mark character is

+  *                        a special character and can't be used

+  *                        in name of collection or property.<br>

+  *                        Maximum allowed length is defined at compile time.

+  *                        The default value is 64k.

+  * @param[in] type        Type to use.

+  * @param[in] data        Data to add.

+  * @param[in] length      Length of the data.

+  *

+  * @return 0 - Property was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid characters in the property name.

+  *                      Value argument is invalid in some way.

+  * @return EMSGSIZE   - Property name is too long.

+  *

+  */

+ int col_push_any_property(struct collection_item *stack,

+                           const char *property,

+                           int type,

+                           void *data,

+                           int length);

+ 

+ /**

+  * @brief Push item into the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[in] item        Item to push.

+  *

+  * @return 0          - Item was pushed successfully.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  */

+ 

  int col_push_item(struct collection_item *stack,

                    struct collection_item *item);

  

  

- /* Pop item */

+ /**

+  * @brief Pop item from the stack.

+  *

+  * @param[in] stack       Stack object.

+  * @param[out] item       Variable receives the value

+  *                        of the retrieved item.

+  *                        Will be set to NULL if there are

+  *                        no more items in the stack.

+  *

+  * @return 0          - No internal issues detected.

+  * @return ENOMEM     - No memory.

+  * @return EINVAL     - Invalid argument.

+  */

  int col_pop_item(struct collection_item *stack,

                   struct collection_item **item);

  

@@ -77,7 +77,7 @@

                 (nest_level -1) * 4, "",

                 property,

                 length,

-                *((int *)(data)),

+                *((int32_t *)(data)),

                 nest_level);

          break;

      case COL_TYPE_UNSIGNED:
@@ -85,23 +85,23 @@

                 (nest_level -1) * 4, "",

                 property,

                 length,

-                *((unsigned int *)(data)),

+                *((uint32_t *)(data)),

                 nest_level);

          break;

      case COL_TYPE_LONG:

-         printf(">%*s%s[%d] long: %ld (%d)\n",

+         printf(">%*s%s[%d] long: %lld (%d)\n",

                 (nest_level -1) * 4, "",

                 property,

                 length,

-                *((long *)(data)),

+                (long long int)(*((int64_t *)(data))),

                 nest_level);

          break;

      case COL_TYPE_ULONG:

-         printf(">%*s%s[%d] ulong: %lu (%d)\n",

+         printf(">%*s%s[%d] ulong: %llu (%d)\n",

                 (nest_level -1) * 4, "",

                 property,

                 length,

-                *((unsigned long *)(data)),

+                (long long unsigned)(*((uint64_t *)(data))),

                 nest_level);

          break;

      case COL_TYPE_DOUBLE:
@@ -242,6 +242,8 @@

      switch (type) {

      case COL_TYPE_INTEGER:

      case COL_TYPE_UNSIGNED:

+         len = 11;

+ 		break;

      case COL_TYPE_LONG:

      case COL_TYPE_ULONG:

          len = 20;
@@ -472,22 +474,24 @@

  

      case COL_TYPE_INTEGER:

          len = sprintf(&buf_data->buffer[buf_data->length],

-                       "%d", *((const int *)(data)));

+                       "%d", *((const int32_t *)(data)));

          break;

  

      case COL_TYPE_UNSIGNED:

          len = sprintf(&buf_data->buffer[buf_data->length],

-                       "%u", *((const unsigned int *)(data)));

+                       "%u", *((const uint32_t *)(data)));

          break;

  

      case COL_TYPE_LONG:

          len = sprintf(&buf_data->buffer[buf_data->length],

-                       "%ld", *((const long *)(data)));

+                       "%lld",

+                       (long long int)(*((const int64_t *)(data))));

          break;

  

      case COL_TYPE_ULONG:

          len = sprintf(&buf_data->buffer[buf_data->length],

-                       "%lu", *((const unsigned long *)(data)));

+                       "%llu",

+                       (long long unsigned)(*((const uint64_t *)(data))));

          break;

  

      case COL_TYPE_DOUBLE:

@@ -25,27 +25,59 @@

  

  #include "collection.h"

  

+ /**

+  * @defgroup tools TOOLS interface

+  *

+  * Additional functions retaed to tracing,

+  * printing, debugging and serializaing collections.

+  *

+  * Functions in this module are more a sample implementation

+  * than a part of the interface. There is a chance they will

+  * change over time.

+  *

+  * @{

+  */

+ 

  #ifdef  HAVE_TRACE

  #define COL_DEBUG_COLLECTION(collection) col_debug_collection(collection,COL_TRAVERSE_DEFAULT);

  #else

  #define COL_DEBUG_COLLECTION(collection) ;

  #endif

  

+ /** @brief Name used for string type. */

  #define COL_TYPE_NAME_STRING     "string"

+ /** @brief Name used for binary type. */

  #define COL_TYPE_NAME_BINARY     "bin"

+ /** @brief Name used for integer type. */

  #define COL_TYPE_NAME_INTEGER    "int"

+ /** @brief Name used for unsigned integer type. */

  #define COL_TYPE_NAME_UNSIGNED   "uint"

+ /** @brief Name used for long type. */

  #define COL_TYPE_NAME_LONG       "long"

+ /** @brief Name used for unsigned long type. */

  #define COL_TYPE_NAME_ULONG      "ulong"

+ /** @brief Name used for floating point type. */

  #define COL_TYPE_NAME_DOUBLE     "double"

+ /** @brief Name used for boolean type. */

  #define COL_TYPE_NAME_BOOL       "bool"

+ /** @brief Name used for unknown type. */

  #define COL_TYPE_NAME_UNKNOWN    "unknown"

  

+ /** @brief Literal used in the default serialization. */

  #define TEXT_COLLECTION "SET"

+ /** @brief Length of the \ref TEXT_COLLECTION literal. */

  #define TEXT_COLLEN 3

  

+ /**

+  * @brief The data will be allocated in BLOCK_SIZE

+  * blocks during serialization.

+  */

  #define BLOCK_SIZE 1024

  

+ /**

+  * @struct col_serial_data

+  * @brief Structure is used to incrementaly serialize collection.

+  */

  struct col_serial_data {

      char *buffer;

      int size;
@@ -54,16 +86,58 @@

  };

  

  

- /* Calculate the potential size of the item */

+ /**

+  * @brief Calculate the potential size of the item.

+  *

+  * @param[in] type        Type of the value.

+  * @param[in] length      Length of the value.

+  *

+  * @return Maximum length the value would occupy when serialized.

+  */

  int col_get_data_len(int type, int length);

  

- /* Grow buffer to accomodate more space */

+ /**

+  * @brief Grow serialization buffer.

+  *

+  * @param[in] buf_data    Serialization object.

+  * @param[in] len         For how much the serialization storage

+  *                        should be incrementally increased.

+  *

+  * @return 0      - Success.

+  * @return ENOMEM - No memory.

+  */

  int col_grow_buffer(struct col_serial_data *buf_data, int len);

  

- /* Specail function to add different formatting symbols to the output */

- int col_put_marker(struct col_serial_data *buf_data, const void *data, int len);

+ /**

+  * @brief Add special data to the serialization output.

+  *

+  * @param[in] buf_data    Serialization object.

+  * @param[in] data        Pointer to special data.

+  * @param[in] len         Length of the data to insert.

+  *

+  * @return 0      - Success.

+  * @return ENOMEM - No memory.

+  */

+ int col_put_marker(struct col_serial_data *buf_data,

+                    const void *data, int len);

  

- /* Serialization of data user handler */

+ /**

+  * @brief Serialization of data callback.

+  *

+  * @param[in] property_in     Property to serialize.

+  * @param[in] property_len_in Length of the property to serialize.

+  * @param[in] type            Type of the value.

+  * @param[in] data_in         Value to serialize.

+  * @param[in] length_in       Length of the value.

+  * @param[in] custom_data     State data passed to callback.

+  *                            It is actually a serialization object.

+  * @param[in] dummy           Not used. It is here because

+  *                            the callback needs to comply

+  *                            to the functions signature.

+  *

+  * @return 0      - Success.

+  * @return ENOMEM - No memory.

+  */

  int col_serialize(const char *property_in,

                    int property_len_in,

                    int type,
@@ -72,7 +146,22 @@

                    void *custom_data,

                    int *dummy);

  

- /* Debug handle */

+ /**

+  * @brief Debug property callback.

+  *

+  * @param[in] property        Property to debug.

+  * @param[in] property_len    Length of the property to debug.

+  * @param[in] type            Type of the value.

+  * @param[in] data            Value to serialize.

+  * @param[in] length          Length of the value.

+  * @param[in] custom_data     State data passed to the callback.

+  * @param[in] dummy           Not used. It is here because

+  *                            the callback needs to comply

+  *                            to the functions signature.

+  *

+  * @return 0      - Success.

+  * @return ENOMEM - No memory.

+  */

  int col_debug_handle(const char *property,

                       int property_len,

                       int type,
@@ -81,26 +170,99 @@

                       void *custom_data,

                       int *dummy);

  

- /* Convenience function to debug an item */

+ /**

+  * @brief Convenience function to debug an item.

+  *

+  * Prints item internals.

+  *

+  * @param[in] item            Item to print.

+  *

+  * @return 0      - Success.

+  * @return ENOMEM - No memory.

+  */

  int col_debug_item(struct collection_item *item);

  

- /* Print collection for debugging purposes */

- int col_debug_collection(struct collection_item *handle,int flag);

+ /**

+  * @brief Print collection for debugging purposes.

+  *

+  * Prints collection internals.

+  *

+  * @param[in] handle            Collection to debug.

+  * @param[in] flag              See traverse flags.

+  *

+  * @return 0      - Success.

+  * @return ENOMEM - No memory.

+  */

+ int col_debug_collection(struct collection_item *handle,

+                          int flag);

  

- /* Print the collection using default serialization */

+ /**

+  * @brief Print collection data.

+  *

+  * Prints collection data.

+  * Uses traverse function to iterate through

+  * the collection.

+  *

+  * @param[in] handle            Collection to print.

+  *

+  * @return 0      - Success.

+  * @return ENOMEM - No memory.

+  */

  int col_print_collection(struct collection_item *handle);

  

- /* Print the collection using iterator */

+ /**

+  * @brief Print collection data.

+  *

+  * Prints collection data.

+  * Uses iterator to process the collection.

+  *

+  * @param[in] handle            Collection to print.

+  *

+  * @return 0      - Success.

+  * @return ENOMEM - No memory.

+  */

  int col_print_collection2(struct collection_item *handle);

  

- 

- /* Find and print one item using default serialization */

+ /**

+  * @brief Find and print one property.

+  *

+  * Prints item data.

+  *

+  * @param[in] handle            Collection to search.

+  * @param[in] name              Item to find and print.

+  *

+  * @return 0      - Success.

+  * @return ENOMEM - No memory.

+  */

  int col_print_item(struct collection_item *handle, const char *name);

  

- /* Convert collection to list of properties */

- char **col_collection_to_list(struct collection_item *handle, int *size, int *error);

+ /**

+  * @brief Convert collection to the array of properties.

+  *

+  * @param[in] handle            Collection to convert.

+  * @param[in] size              Will receive the number of

+  *                              the strings in the array.

+  *                              Can be NULL if caller is not interested

+  *                              in the size of the array.

+  * @param[in] error             Will receive error value if any.

+  *                              Can be NULL if the caller does

+  *                              not care about error codes.

+  *                              - 0      - Success.

+  *                              - ENOMEM - No memory.

+  *

+  * @return List of strings that constitute

+  *         the properties in the collection.

+  *         Collection name is not included.

+  */

+ char **col_collection_to_list(struct collection_item *handle,

+                               int *size,

+                               int *error);

  

- /* Function to free the list of properties. */

+ /**

+  * @brief Free list of properties.

+  *

+  * @param[in] str_list          List to free.

+  */

  void col_free_property_list(char **str_list);

  

  #endif

@@ -1,4 +1,6 @@

- AC_INIT([collection],[0.4.0],[sssd-devel@lists.fedorahosted.org])

+ AC_INIT([collection],

+         [0.4.0],

+         [sssd-devel@lists.fedorahosted.org])

  AC_CONFIG_SRCDIR([collection.c])

  AC_CONFIG_AUX_DIR([build])

  AM_INIT_AUTOMAKE([-Wall -Werror foreign])
@@ -32,6 +34,9 @@

  

  AC_DEFINE([COL_MAX_DATA], [65535], [Max length of the data block allowed in the collection value.])

  

+ AC_PATH_PROG([DOXYGEN], [doxygen], [false])

+ AM_CONDITIONAL([HAVE_DOXYGEN], [test x$DOXYGEN != xfalse ])

  

- AC_CONFIG_FILES([Makefile collection.pc])

+ 

+ AC_CONFIG_FILES([Makefile collection.cfg.doxy collection.pc])

  AC_OUTPUT

file modified
+15
@@ -45,6 +45,21 @@

  ini_config_ut_SOURCES = ini_config_ut.c

  ini_config_ut_LDADD = libini_config.la -lcollection

  

+ if HAVE_DOXYGEN

+ docs:

+ # A temp way of building docs until we hook into the package build

+ 	rm -fR doc

+ 	mkdir -p doc

+ 	$(DOXYGEN) ini_config.cfg.doxy

+ else

+ docs:

+ 	@echo "Doxygen not installed, cannot generate documentation"

+ 	@exit 1

+ endif

+ 

  TESTS = ini_config_ut

  

  tests: all $(check_PROGRAMS)

+ 

+ clean-local:

+ 	rm -Rf doc

file removed
-1
@@ -1,1 +0,0 @@

- Documentation for ini_config can be found in ini_config.h 

\ No newline at end of file

file modified
+4 -1
@@ -23,5 +23,8 @@

  

  AC_DEFINE([MAX_KEY], [1024], [Max length of the key in the INI file.])

  

- AC_CONFIG_FILES([Makefile ini_config.pc])

+ AC_PATH_PROG([DOXYGEN], [doxygen], [false])

+ AM_CONDITIONAL([HAVE_DOXYGEN], [test x$DOXYGEN != xfalse ])

+ 

+ AC_CONFIG_FILES([Makefile ini_config.cfg.doxy ini_config.pc])

  AC_OUTPUT

file modified
+182 -31
@@ -239,9 +239,13 @@

  

          switch (status) {

          case RET_PAIR:

-             /* Add line to the collection of lines */

+             /* Add line to the collection of lines.

+              * It is pretty safe in this case to just type cast the value to

+              * int32_t since it is unrealistic that ini file will ever have

+              * so many lines.

+              */

              if (lines) {

-                 error = col_add_int_property(*lines, NULL, key, line);

+                 error = col_add_int_property(*lines, NULL, key, (int32_t)line);

                  if (error) {

                      TRACE_ERROR_NUMBER("Failed to add line to line collection", error);

                      fclose(file);
@@ -308,8 +312,11 @@

              if (lines) {

                  /* For easier search make line numbers for the sections negative.

                   * This would allow differentiating sections and attributes.

+                  * It is pretty safe in this case to just type cast the value to

+                  * int32_t since it is unrealistic that ini file will ever have

+                  * so many lines.

                   */

-                 error = col_add_int_property(*lines, NULL, key, -1 * line);

+                 error = col_add_int_property(*lines, NULL, key, (int32_t)(-1 * line));

                  if (error) {

                      TRACE_ERROR_NUMBER("Failed to add line to line collection", error);

                      fclose(file);
@@ -1275,13 +1282,16 @@

      return error;

  }

  

- /* Get long value from config item */

- long get_long_config_value(struct collection_item *item,

-                            int strict, long def, int *error)

+ /* Get long long value from config item */

+ static long long get_llong_config_value(struct collection_item *item,

+                                         int strict,

+                                         long long def,

+                                         int *error)

  {

+     int err;

      const char *str;

      char *endptr;

-     long val = 0;

+     long long val = 0;

  

      TRACE_FLOW_STRING("get_long_config_value", "Entry");

  
@@ -1298,50 +1308,179 @@

      /* Try to parse the value */

      str = (const char *)col_get_item_data(item);

      errno = 0;

-     val = strtol(str, &endptr, 10);

+     val = strtoll(str, &endptr, 10);

+     err = errno;

  

      /* Check for various possible errors */

-     if (((errno == ERANGE) &&

-         ((val == LONG_MAX) ||

-          (val == LONG_MIN))) ||

-          ((errno != 0) && (val == 0)) ||

-          (endptr == str)) {

-         TRACE_ERROR_NUMBER("Conversion failed", EIO);

+     if (err != 0) {

+         TRACE_ERROR_NUMBER("Conversion failed", err);

+         if (error) *error = err;

+         return def;

+     }

+ 

+     /* Other error cases */

+     if ((endptr == str) || (strict && (*endptr != '\0'))) {

+         TRACE_ERROR_NUMBER("More characters or nothing processed", EIO);

          if (error) *error = EIO;

          return def;

      }

  

-     if (strict && (*endptr != '\0')) {

-         TRACE_ERROR_NUMBER("More characters than expected", EIO);

+     TRACE_FLOW_NUMBER("get_long_config_value returning", (long)val);

+     return val;

+ }

+ 

+ /* Get unsigned long long value from config item */

+ static unsigned long long get_ullong_config_value(struct collection_item *item,

+                                                   int strict,

+                                                   unsigned long long def,

+                                                   int *error)

+ {

+     int err;

+     const char *str;

+     char *endptr;

+     unsigned long long val = 0;

+ 

+     TRACE_FLOW_STRING("get_long_config_value", "Entry");

+ 

+     /* Do we have the item ? */

+     if ((item == NULL) ||

+        (col_get_item_type(item) != COL_TYPE_STRING)) {

+         TRACE_ERROR_NUMBER("Invalid argument.", EINVAL);

+         if (error) *error = EINVAL;

+         return def;

+     }

+ 

+     if (error) *error = EOK;

+ 

+     /* Try to parse the value */

+     str = (const char *)col_get_item_data(item);

+     errno = 0;

+     val = strtoull(str, &endptr, 10);

+     err = errno;

+ 

+     /* Check for various possible errors */

+     if (err != 0) {

+         TRACE_ERROR_NUMBER("Conversion failed", err);

+         if (error) *error = err;

+         return def;

+     }

+ 

+     /* Other error cases */

+     if ((endptr == str) || (strict && (*endptr != '\0'))) {

+         TRACE_ERROR_NUMBER("More characters or nothing processed", EIO);

          if (error) *error = EIO;

-         val = def;

+         return def;

      }

  

-     TRACE_FLOW_NUMBER("get_long_config_value returning", val);

+     TRACE_FLOW_NUMBER("get_long_config_value returning", (long)val);

      return val;

  }

  

+ 

  /* Get integer value from config item */

  int get_int_config_value(struct collection_item *item,

-                          int strict, int def, int *error)

+                          int strict,

+                          int def,

+                          int *error)

  {

-     return get_long_config_value(item, strict, def, error);

+     long long val = 0;

+     int err = 0;

+ 

+     TRACE_FLOW_STRING("get_int_config_value", "Entry");

+ 

+     val = get_llong_config_value(item, strict, def, &err);

+     if (err == 0) {

+         if ((val > INT_MAX) || (val < INT_MIN)) {

+             val = def;

+             err = ERANGE;

+         }

+     }

+ 

+     if (error) *error = err;

+ 

+     TRACE_FLOW_NUMBER("get_int_config_value returning", (int)val);

+     return (int)val;

  }

  

  /* Get unsigned integer value from config item */

  unsigned get_unsigned_config_value(struct collection_item *item,

-                                    int strict, unsigned def, int *error)

+                                    int strict,

+                                    unsigned def,

+                                    int *error)

  {

-     return get_long_config_value(item, strict, def, error);

+     unsigned long long val = 0;

+     int err = 0;

+ 

+     TRACE_FLOW_STRING("get_unsigned_config_value", "Entry");

+ 

+     val = get_ullong_config_value(item, strict, def, &err);

+     if (err == 0) {

+         if (val > UINT_MAX) {

+             val = def;

+             err = ERANGE;

+         }

+     }

+ 

+     if (error) *error = err;

+ 

+     TRACE_FLOW_NUMBER("get_unsigned_config_value returning",

+                       (unsigned)val);

+     return (unsigned)val;

+ }

+ 

+ /* Get long value from config item */

+ long get_long_config_value(struct collection_item *item,

+                            int strict,

+                            long def,

+                            int *error)

+ {

+     long long val = 0;

+     int err = 0;

+ 

+     TRACE_FLOW_STRING("get_long_config_value", "Entry");

+ 

+     val = get_llong_config_value(item, strict, def, &err);

+     if (err == 0) {

+         if ((val > LONG_MAX) || (val < LONG_MIN)) {

+             val = def;

+             err = ERANGE;

+         }

+     }

+ 

+     if (error) *error = err;

+ 

+     TRACE_FLOW_NUMBER("get_long_config_value returning",

+                       (long)val);

+     return (long)val;

  }

  

  /* Get unsigned long value from config item */

  unsigned long get_ulong_config_value(struct collection_item *item,

-                                      int strict, unsigned long def, int *error)

+                                      int strict,

+                                      unsigned long def,

+                                      int *error)

  {

-     return get_long_config_value(item, strict, def, error);

+     unsigned long long val = 0;

+     int err = 0;

+ 

+     TRACE_FLOW_STRING("get_ulong_config_value", "Entry");

+ 

+     val = get_ullong_config_value(item, strict, def, &err);

+     if (err == 0) {

+         if (val > ULONG_MAX) {

+             val = def;

+             err = ERANGE;

+         }

+     }

+ 

+     if (error) *error = err;

+ 

+     TRACE_FLOW_NUMBER("get_ulong_config_value returning",

+                       (unsigned long)val);

+     return (unsigned long)val;

  }

  

+ 

  /* Get double value */

  double get_double_config_value(struct collection_item *item,

                                 int strict, double def, int *error)
@@ -1725,7 +1864,11 @@

      TRACE_FLOW_STRING("free_string_config_array", "Exit");

  }

  

- /* Get an array of long values */

+ /* Get an array of long values.

+  * NOTE: For now I leave just one function that returns numeric arrays.

+  * In future if we need other numeric types we can change it to do strtoll

+  * internally and wrap it for backward compatibility.

+  */

  long *get_long_config_array(struct collection_item *item, int *size, int *error)

  {

      const char *str;
@@ -1733,6 +1876,7 @@

      long val = 0;

      long *array;

      int count = 0;

+     int err;

  

      TRACE_FLOW_STRING("get_long_config_array", "Entry");

  
@@ -1756,18 +1900,25 @@

      /* Now parse the string */

      str = (const char *)col_get_item_data(item);

      while (*str) {

+ 

          errno = 0;

          val = strtol(str, &endptr, 10);

-         if (((errno == ERANGE) &&

-             ((val == LONG_MAX) ||

-              (val == LONG_MIN))) ||

-              ((errno != 0) && (val == 0)) ||

-              (endptr == str)) {

-             TRACE_ERROR_NUMBER("Conversion failed", EIO);

+         err = errno;

+ 

+         if (err) {

+             TRACE_ERROR_NUMBER("Conversion failed", err);

+             free(array);

+             if (error) *error = err;

+             return NULL;

+         }

+ 

+         if (endptr == str) {

+             TRACE_ERROR_NUMBER("Nothing processed", EIO);

              free(array);

              if (error) *error = EIO;

              return NULL;

          }

+ 

          /* Save value */

          array[count] = val;

          count++;

The added file is too large to be shown here, see it at: common/ini/ini_config.cfg.doxy.in
file modified
+1153 -160
@@ -27,243 +27,1236 @@

  #include <stdio.h>

  #include "collection.h"

  

- /* Name of the default (missing section in the INI file */

+ /** @mainpage The INI configuration interface

+  *

+  * The goal of the this interface is to allow applications

+  * to read configuration from the INI file.

+  *

+  * So why yet another library to read data from INI file?

+  * As we started the SSSD project we looked around for a

+  * open source library that would meet the following

+  * requirements:

+  * - Is written in C (not C++)

+  * - Is lightweight.

+  * - Has an live community.

+  * - Supported on multiple platforms .

+  * - Can evolve as we build SSSD solution.

+  * - Can deal with different types of values including arrays.

+  * - Can deal with sections that are related to each other

+  *   and can form a hierarchy of sections.

+  * - Has a compatible license we can use.

+  *

+  * We have seen several solutions but none was able to address our

+  * requirements fully. As a result we started developing our own

+  * INI parsing library. It is currently stable, however there is

+  * a list of the enhancements that we eventually plan to implement.

+  * One of the most interesting future features is the grammar

+  * validation utility. It is targeted at helping to diagnose

+  * a misconfiguration.

+  *

+  * Currently INI parser allows reading and merging INI files

+  * and getting a resulting configuration in one object.

+  *

+  * One of the main differences of this interface is that

+  * the library is created with the idea of reading the configuration

+  * data not managing it. Thus currently you will not find

+  * any function that alters the configuration data read from the files.

+  * There is a set of proposed enhancements to be able to manipulate

+  * the configuration data and save it back but there have been no real

+  * driver for it. This API is focused on letting applications read data

+  * from a file (or files) and interpret it, not to generate configuration

+  * files. There are all sorts of different tools that already do that.

+  *

+  * The INI configuration interface uses COLLECTION (see libcollection

+  * interface) to store data internally.

+  *

+  * Concepts:

+  * - The INI file consists of the key value pairs.

+  * - The keys and values are separated by the equal sign.

+  *   The spaces around equal sign are trimmed. Everything before the equal

+  *   sign is the key, everything after is the value.

+  * - Comments are the lines that start with ";" or "#" in the first

+  *   position of the line.

+  * - Library currently does not support multi-line values.

+  * - The keys and values are read and stored in the internal

+  *   collection.

+  * - More than one file can constitute the configuration for the application.

+  *   For example there can be a generic file in the /etc that

+  *   contains configuration for all the applications of this class running

+  *   on the box and then there might be a special file

+  *   with parameters specific for the application in the

+  *   /etc/whatever.d directory. Interface allows reading

+  *   both files in one call. The specific configuration for application

+  *   will overwrite the generic one.

+  * - If there is no section in the file or there are key value pairs

+  *   declared before the first section those pairs will be placed into

+  *   the default section.

+  * - The values are treated as strings. Spaces are trimmed at the beginning

+  *   and the end of the value. The value ends at the end of the line.

+  *   If values is too long an error will be returned.

+  * - Parsing of the values happens when the caller tries to interpret

+  *   the value. The caller can use different functions to do this.

+  *   The value can be treated as numeric, logical, string, binary,

+  *   array of strings or array of numbers. In case of arrays the functions

+  *   accept separators that will be used to slice the value into the array

+  *   elements.

+  * - If there is any error parsing the section and key values it can be

+  *   intercepted by the caller. There are different modes that the library

+  *   supports regarding error handling. See details in the description

+  *   of the individual functions.

+  */

+ 

+ /**

+  * @defgroup ini_config INI configuration interface

+  * @{

+  */

+ 

+ /**

+  * @defgroup constants Constants

+  * @{

+  */

+ 

+ /**

+  * @brief Name of the default section.

+  *

+  * This is the name of the implied section where orphan key-value

+  * pairs will be put.

+  */

  #define INI_DEFAULT_SECTION "default"

  

- /* Collection classes used in INI processing */

+ /**

+  * @defgroup classes Collection classes

+  *

+  * INI uses COLLECTION library to store data.

+  * It creates different objects with implied internal structure.

+  * To be able to validate the objects

+  * it is a good practice to define a class for each type of

+  * the object.

+  *

+  * This section contains constants that define

+  * internal collection classes used by INI interface.

+  * They are exposed so that if you use collection for

+  * other purposes you can make sure that the object classes

+  * do not overlap. It is a good practice to avoid

+  * them overlapping. Non-overlapping class space

+  * would make internal type checking more effective

+  * so that if an object of the wrong class is passed to

+  * some interface the interface would be able to

+  * check and detect an error.

+  *

+  * @{

+  */

+ /** @brief Base for the class definitions. */

  #define COL_CLASS_INI_BASE        20000

- #define COL_CLASS_INI_CONFIG      COL_CLASS_INI_BASE + 0 /* Class for configuration collection. Implies a collection of sections */

- #define COL_CLASS_INI_SECTION     COL_CLASS_INI_BASE + 1 /* A one level collection of key value pairs where values are always stings */

- #define COL_CLASS_INI_PERROR      COL_CLASS_INI_BASE + 2 /* A one level collection of parse errors - store parse_error structs */

- #define COL_CLASS_INI_PESET       COL_CLASS_INI_BASE + 3 /* A one level collection of parse error collections */

- #define COL_CLASS_INI_GERROR      COL_CLASS_INI_BASE + 4 /* A one level collection of grammar errors - store parse_error structs */

- #define COL_CLASS_INI_VERROR      COL_CLASS_INI_BASE + 5 /* A one level collection of validation errors - store parse_error structs */

- #define COL_CLASS_INI_LINES       COL_CLASS_INI_BASE + 6 /* A one level collection of lines in INI file */

- 

- 

- /* Error levels */

- #define INI_STOP_ON_ANY     0   /* Fail if any problem is detected */

- #define INI_STOP_ON_NONE    1   /* Best effort - do not fail */

- #define INI_STOP_ON_ERROR   2   /* Fail on errors only */

- 

- 

- /* Parsing errors and warnings */

- #define ERR_LONGDATA        1   /* Error */

- #define ERR_NOCLOSESEC      2   /* Error */

- #define ERR_NOSECTION       3   /* Error */

- #define ERR_SECTIONLONG     4   /* Error */

- #define ERR_NOEQUAL         5   /* Warning */

- #define ERR_NOKEY           6   /* Warning */

- #define ERR_LONGKEY         7   /* Warning */

+ /**

+  * @brief Class for the configuration object.

+  *

+  * The configuration object consists of the collection

+  * of collections where each sub collection is a section.

+  * Application however should not assume that this always

+  * be the case. Use only INI interface functions

+  * get data from the configuration object.

+  * Do not use the raw collection interface to get

+  * data.

+  */

+ #define COL_CLASS_INI_CONFIG      COL_CLASS_INI_BASE + 0

+ /**

+  * @brief A one level collection of key value pairs

+  * where values are always strings.

+  */

+ #define COL_CLASS_INI_SECTION     COL_CLASS_INI_BASE + 1

+ /**

+  * @brief A one level collection of parse errors.

+  *

+  * Collection stores \ref parse_error structures.

+  */

+ #define COL_CLASS_INI_PERROR      COL_CLASS_INI_BASE + 2

+ /**

+  * @brief Collection of error collections.

+  *

+  * When multiple files are read during one call

+  * each file has its own set of parsing errors

+  * and warnings. This is the collection

+  * of such sets.

+  */

+ #define COL_CLASS_INI_PESET       COL_CLASS_INI_BASE + 3

+ /** @brief Collection of grammar errors.

+  *

+  * Reserved for future use.

+  */

+ #define COL_CLASS_INI_GERROR      COL_CLASS_INI_BASE + 4

+ /** @brief Collection of validation errors.

+  *

+  * Reserved for future use.

+  */

+ #define COL_CLASS_INI_VERROR      COL_CLASS_INI_BASE + 5

+ /** @brief Collection of lines from the INI file.

+  *

+  * Reserved for future use

+  */

+ #define COL_CLASS_INI_LINES       COL_CLASS_INI_BASE + 6

+ 

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup errorlevel Error tolerance constants

+  *

+  * Constants in this section define what to do if

+  * error or warning encountered while parsing the INI file.

+  *

+  * @{

+  */

+ /** @brief Fail if any problem is detected. */

+ #define INI_STOP_ON_ANY     0

+ /** @brief Best effort - do not fail. */

+ #define INI_STOP_ON_NONE    1

+ /** @brief Fail on errors only. */

+ #define INI_STOP_ON_ERROR   2

  

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup parseerr Parsing errors and warnings

+  *

+  * @{

+  */

+ /** @brief Line is too long (Error). */

+ #define ERR_LONGDATA        1

+ /** @brief No closing bracket in section definition (Error). */

+ #define ERR_NOCLOSESEC      2

+ /** @brief Section name is missing (Error). */

+ #define ERR_NOSECTION       3

+ /** @brief Section name too long (Error). */

+ #define ERR_SECTIONLONG     4

+ /** @brief No equal sign (Warning). */

+ #define ERR_NOEQUAL         5

+ /** @brief No key before equal sign (Warning). */

+ #define ERR_NOKEY           6

+ /** @brief Key is too long (Warning). */

+ #define ERR_LONGKEY         7

+ 

+ /** @brief Size of the error array. */

  #define ERR_MAXPARSE        ERR_LONGKEY

  

- /* Grammar errors and warnings */

- /* Placeholder for now... */

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup gramerr Grammar errors and warnings

+  *

+  * Placeholder for now. Reserved for future use.

+  *

+  * @{

+  */

  #define ERR_MAXGRAMMAR      0

+ /**

+  * @}

+  */

  

- /* Validation errors and warnings */

- /* Placeholder for now... */

+ /**

+  * @defgroup valerr Validation errors and warnings

+  *

+  * Placeholder for now. Reserved for future use.

+  *

+  * @{

+  */

  #define ERR_MAXVALID        0

  

  

+ /**

+  * @}

+  */

+ 

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup structures Structures

+  * @{

+  */

+ 

+ /** @brief Structure that holds error number and

+  *  line number for the encountered error.

+  */

  struct parse_error {

      unsigned line;

      int error;

  };

  

- /* Function to return parsing error */

+ 

+ /**

+  * @}

+  */

+ 

+ /**

+  * @defgroup functions Functions

+  * @{

+  */

+ 

+ /** @brief Function to return a parsing error as a string.

+  *

+  * @param[in] parsing_error    Error code for the parsing error.

+  *

+  * @return Error string.

+  */

  const char *parsing_error_str(int parsing_error);

  

- /* Function to return grammar error in template.

+ /** @brief Function to return a grammar error in template.

+  *

+  * EXPERIMENTAL. Reserved for future use.

+  *

   * This error is returned when the template

   * is translated into the grammar object.

+  *

+  * @param[in] parsing_error    Error code for the grammar error.

+  *

+  * @return Error string.

   */

  const char *grammar_error_str(int parsing_error);

  

- /* Function to return validation error.

+ /** @brief Function to return a validation error.

+  *

+  * EXPERIMENTAL. Reserved for future use.

+  *

   * This is the error that it is returned when

   * the INI file is validated against the

   * grammar object.

+  *

+  * @param[in] parsing_error    Error code for the validation error.

+  *

+  * @return Error string.

   */

  const char *validation_error_str(int parsing_error);

  

- /* Read configuration information from a file */

- int config_from_file(const char *application,               /* Name of the application - will be used as name of the collection */

-                      const char *config_filename,           /* Name of the config file - if NULL the collection will be empty */

-                      struct collection_item **ini_config,   /* If *ini_config is NULL a new ini object will be allocated, */

-                                                             /* otherwise the one that is pointed to will be updated. */

-                      int error_level,                       /* Error level - break for errors, warnings or best effort (don't break) */

-                      struct collection_item **error_list);  /* List of errors for a file */

+ /**

+  * @brief Read configuration information from a file.

+  *

+  * @param[in]  application         Name of the application,

+  *                                 will be used as name of

+  *                                 the collection.

+  * @param[in]  config_filename     Name of the config file,

+  *                                 if NULL the configuration

+  *                                 collection will be empty.

+  * @param[out] ini_config          If *ini_config is NULL

+  *                                 a new ini object will be

+  *                                 allocated, otherwise

+  *                                 the one that is pointed to

+  *                                 will be updated.

+  * @param[in]  error_level         Break for errors, warnings

+  *                                 or best effort (don't break).

+  * @param[out] error_list          List of errors for the file

+  *                                 detected during parsing.

+  *

+  * @return 0 - Success.

+  * @return EINVAL - Invalid parameter.

+  * @return Any error returned by fopen().

+  *

+  */

+ int config_from_file(const char *application,

+                      const char *config_filename,

+                      struct collection_item **ini_config,

+                      int error_level,

+                      struct collection_item **error_list);

  

- /* Read configuration information from a file descriptor */

- int config_from_fd(const char *application,              /* Name of the application - will be used as name of the collection */

-                    int fd,                               /* Previously opened file descriptor for the config file */

-                    const char *config_source,            /* Name of the file being parsed, for use when printing the error list */

-                    struct collection_item **ini_config,  /* If *ini_config is NULL a new ini object will be allocated*/

-                    int error_level,                      /* Error level - break for errors, warnings or best effort (don't break) */

-                    struct collection_item **error_list); /* List of errors for a file */

+ /**

+  * @brief Read configuration information from a file descriptor.

+  *

+  * @param[in]  application         Name of the application,

+  *                                 will be used as name of

+  *                                 the collection.

+  * @param[in]  fd                  Previously opened file

+  *                                 descriptor for the config file.

+  * @param[in]  config_source       Name of the file being parsed,

+  *                                 for use when printing the error

+  *                                 list.

+  * @param[out] ini_config          If *ini_config is NULL

+  *                                 a new ini object will be

+  *                                 allocated, otherwise

+  *                                 the one that is pointed to

+  *                                 will be updated.

+  * @param[in]  error_level         Break for errors, warnings

+  *                                 or best effort (don't break).

+  * @param[out] error_list          List of errors for the file

+  *                                 detected during parsing.

+  *

+  * @return 0 - Success.

+  * @return EINVAL - Invalid parameter.

+  *

+  */

+ int config_from_fd(const char *application,

+                    int fd,

+                    const char *config_source,

+                    struct collection_item **ini_config,

+                    int error_level,

+                    struct collection_item **error_list);

  

  

- /* Read configuration information from a file with extra collection of line numbers */

+ /**

+  * @brief Read configuration information from a file with

+  * extra collection of line numbers.

+  *

+  * EXPERIMENTAL. Reserved for future use.

+  *

+  */

  int config_from_file_with_lines(

-                      const char *application,               /* Name of the application - will be used as name of the collection */

-                      const char *config_filename,           /* Name of the config file - if NULL the collection will be empty */

-                      struct collection_item **ini_config,   /* If *ini_config is NULL a new ini object will be allocated, */

-                                                             /* otherwise the one that is pointed to will be updated. */

-                      int error_level,                       /* Error level - break for errors, warnings or best effort (don't break) */

-                      struct collection_item **error_list,   /* List of errors for a file */

-                      struct collection_item **lines);       /* Collection of pairs where key is the key and value is line number */

- 

- /* Read configuration information from a file descriptor with extra collection of line numbers */

+                      const char *application,

+                      const char *config_filename,

+                      struct collection_item **ini_config,

+                      int error_level,

+                      struct collection_item **error_list,

+                      struct collection_item **lines);

+ 

+ /**

+  * @brief Read configuration information from a file descriptor with

+  * extra collection of line numbers.

+  *

+  * EXPERIMENTAL. Reserved for future use.

+  *

+  */

  int config_from_fd_with_lines(

-                    const char *application,               /* Name of the application - will be used as name of the collection */

-                    int fd,                                /* Previously opened file descriptor for the config file */

-                    const char *config_source,             /* Name of the file being parsed, for use when printing the error list */

-                    struct collection_item **ini_config,   /* If *ini_config is NULL a new ini object will be allocated, */

-                                                           /* otherwise the one that is pointed to will be updated. */

-                    int error_level,                       /* Error level - break for errors, warnings or best effort (don't break) */

-                    struct collection_item **error_list,   /* List of errors for a file */

-                    struct collection_item **lines);       /* Collection of pairs where key is the key and value is line number */

- 

- 

- /* Read default config file and then overwrite it with a specific one from the directory */

- int config_for_app(const char *application,               /* Name of the application that will be used to get config for */

-                    const char *config_file,               /* Name of the configuration file with default settings for all apps */

-                    const char *config_dir,                /* Name of the directory where the configuration files for different apps will be dropped */

-                    struct collection_item **ini_config,   /* New config object */

-                    int error_level,                       /* Level of error tolerance */

-                    struct collection_item **error_set);   /* Collection of collections of parsing errors */

- 

- /* Function to free configuration */

+                    const char *application,

+                    int fd,

+                    const char *config_source,

+                    struct collection_item **ini_config,

+                    int error_level,

+                    struct collection_item **error_list,

+                    struct collection_item **lines);

+ 

+ 

+ /**

+  * @brief Read default configuration file and then

+  * overwrite it with a specific one from the directory.

+  *

+  * @param[in]  application         Name of the application,

+  *                                 will be used as name of

+  *                                 the collection.

+  * @param[in]  config_file         Name of the configuration file,

+  *                                 with default settings for all

+  *                                 appplications.

+  * @param[in]  config_dir          Name of the directory where

+  *                                 the configuration files for

+  *                                 different applications reside.

+  *                                 Function will look for file

+  *                                 with the name name constructed by

+  *                                 appending ".ini" to the end of

+  *                                 the "application" argument.

+  * @param[out] ini_config          A new configuration object.

+  * @param[in]  error_level         Break for errors, warnings

+  *                                 or best effort (don't break).

+  * @param[out] error_set           Collection of error lists.

+  *                                 One list per file.

+  *

+  * @return 0 - Success.

+  * @return EINVAL - Invalid parameter.

+  * @return Any error returned by fopen().

+  */

+ int config_for_app(const char *application,

+                    const char *config_file,

+                    const char *config_dir,

+                    struct collection_item **ini_config,

+                    int error_level,

+                    struct collection_item **error_set);

+ 

+ /**

+  * @brief Function to free configuration object.

+  *

+  * @param[in] ini_config       Configuration object.

+  *

+  */

  void free_ini_config(struct collection_item *ini_config);

  

- /* Function to free configuration error list */

+ /**

+  * @brief Function to free configuration errors.

+  *

+  * @param[in] error_set       Configuration error set object.

+  *

+  */

  void free_ini_config_errors(struct collection_item *error_set);

  

- /* Function to free configuration line list */

+ /**

+  * @brief Function to free lines object.

+  *

+  * EXPERIMENTAL. Reserved for future use.

+  *

+  * @param[in] lines       Lines object.

+  *

+  */

  void free_ini_config_lines(struct collection_item *lines);

  

- /* Print errors and warnings that were detected while parsing one file */

- /* Use this function to print results of the config_from_file() call */

- void print_file_parsing_errors(FILE *file,                           /* File to send errors to */

-                                struct collection_item *error_list);  /* List of parsing errors */

  

  

- /* Print errors and warnings that were detected while

+ /**

+  * @brief Print errors and warnings that were detected while parsing one file.

+  *

+  * @param[in] file           File descriptor.

+  * @param[in] error_list     List of the parsing errors.

+  *

+  */

+ void print_file_parsing_errors(FILE *file,

+                                struct collection_item *error_list);

+ 

+ /**

+  * @brief Print errors and warnings that were detected while

   * checking grammar of the template.

+  *

+  * EXPERIMENTAL. Reserved for future use.

+  *

+  * @param[in] file           File descriptor.

+  * @param[in] error_list     List of the parsing errors.

+  *

   */

- void print_grammar_errors(FILE *file,                           /* File to send errors to */

-                           struct collection_item *error_list);  /* List of grammar errors */

+ void print_grammar_errors(FILE *file,

+                           struct collection_item *error_list);

  

- /* Print errors and warnings that were detected while

-  * checking INI file against grammar object.

+ /**

+  * @brief Print errors and warnings that were detected while

+  * checking INI file against the grammar object.

+  *

+  * EXPERIMENTAL. Reserved for future use.

+  *

+  * @param[in] file           File descriptor.

+  * @param[in] error_list     List of the parsing errors.

+  *

   */

- void print_validation_errors(FILE *file,                           /* File to send errors to */

-                              struct collection_item *error_list);  /* List of validation errors */

+ void print_validation_errors(FILE *file,

+                              struct collection_item *error_list);

+ 

+ 

  

- /* Print errors and warnings that were detected parsing configuration as a whole */

- /* Use this function to print results of the config_for_app() call */

- void print_config_parsing_errors(FILE *file,                           /* File to send errors to */

-                                  struct collection_item *error_list);  /* Collection of collections of errors */

  

- /* Get list of sections from the config collection as an array of strings.

+ /**

+  * @brief Print errors and warnings that were detected

+  * parsing configuration as a whole.

+  *

+  * Use this function to print results of the config_for_app() call.

+  *

+  * @param[in] file           File descriptor.

+  * @param[in] error_set      List of lists of the parsing errors.

+  *

+  */

+ void print_config_parsing_errors(FILE *file,

+                                  struct collection_item *error_set);

+ 

+ /**

+  * @brief Get list of sections.

+  *

+  * Get list of sections from the configuration object

+  * as an array of strings.

   * Function allocates memory for the array of the sections.

+  * Use \ref free_section_list() to free allocated memory.

+  *

+  * @param[in]  ini_config       Configuration object.

+  * @param[out] size             If not NULL parameter will

+  *                              receive number of sections

+  *                              in the configuration.

+  * @param[out] error            If not NULL parameter will

+  *                              receive the error code.

+  *                              0 - Success.

+  *                              EINVAL - Invalid parameter.

+  *                              ENOMEM - No memory.

+  *

+  * @return Array of strings.

   */

- char **get_section_list(struct collection_item *ini_config, int *size, int *error);

+ char **get_section_list(struct collection_item *ini_config,

+                         int *size,

+                         int *error);

  

- /* The section array should be freed using this function */

+ /**

+  * @brief Free list of sections.

+  *

+  * The section array created by \ref get_section_list()

+  * should be freed using this function.

+  *

+  * @param[in] section_list       Array of strings returned by

+  *                               \ref get_section_list() function.

+  */

  void free_section_list(char **section_list);

  

- /* Get list of attributes in a section as an array of strings.

+ /**

+  * @brief Get list of attributes.

+  *

+  * Get list of attributes in a section as an array of strings.

   * Function allocates memory for the array of attributes.

+  * Use \ref free_attribute_list() to free allocated memory.

+  *

+  * @param[in]  ini_config       Configuration object.

+  * @param[in]  section          Section name.

+  * @param[out] size             If not NULL parameter will

+  *                              receive number of attributes

+  *                              in the section.

+  * @param[out] error            If not NULL parameter will

+  *                              receive the error code.

+  *                              0 - Success.

+  *                              EINVAL - Invalid parameter.

+  *                              ENOMEM - No memory.

+  *

+  * @return Array of strings.

   */

- char **get_attribute_list(struct collection_item *ini_config, const char *section, int *size, int *error);

+ char **get_attribute_list(struct collection_item *ini_config,

+                           const char *section,

+                           int *size,

+                           int *error);

  

- /* The attribute array should be freed using this function */

+ /**

+  * @brief Free list of attributes.

+  *

+  * The attribute array created by \ref get_attribute_list()

+  * should be freed using this function.

+  *

+  * @param[in] attr_list          Array of strings returned by

+  *                               \ref get_attribute_list() function.

+  */

  void free_attribute_list(char **attr_list);

  

- /* Get a configuration item form the configuration */

- int get_config_item(const char *section,                    /* Section. If NULL assumed default */

-                     const char *name,                       /* Name of the property to look up */

-                     struct collection_item *ini_config,     /* Collection to search */

-                     struct collection_item **item);         /* Item returned. Will be NULL is not found. */

- 

- /* Conversion functions for the configuration item.

-  * Sets error to EINVAL if the item is bad.

-  * Sets error to EIO if the conversion failed.

-  * These functions do not allocate memory.

-  * They always return best effort conversion value.

-  * In case of error they return provided default.

-  * It is up to the caller to check an error and take an action.

-  */

- /* If "strict" parameter is non zero the function will fail if there are more

-  * characters after last digit.

-  */

- int get_int_config_value(struct collection_item *item, int strict, int def, int *error);

- long get_long_config_value(struct collection_item *item, int strict, long def, int *error);

- unsigned get_unsigned_config_value(struct collection_item *item, int strict, unsigned def, int *error);

- unsigned long get_ulong_config_value(struct collection_item *item, int strict, unsigned long def, int *error);

- double get_double_config_value(struct collection_item *item, int strict, double def, int *error);

- unsigned char get_bool_config_value(struct collection_item *item, unsigned char def, int *error);

- 

- /* Function get_string_config_value returns a newly allocated pointer to the string out of item.*/

- char *get_string_config_value(struct collection_item *item, int *error);

- /* Function returns the string stored in the item */

- const char *get_const_string_config_value(struct collection_item *item, int *error);

- 

- /* A get_bin_value and get_xxx_array functions allocate memory.

+ /**

+  * @brief Get a configuration item form the configuration.

+  *

+  * Check return error code first. If the function returns

+  * an error there is a serious problem.

+  * Then check if item is found. Function will set

+  * item parameter to NULL if no attribute with

+  * provided name is found in the collection.

+  *

+  * @param[in]  section          Section name.

+  *                              If NULL assumed default.

+  * @param[in]  name             Attribute name to find.

+  * @param[in]  ini_config       Configuration object to search.

+  * @param[out] item             Element of configuration

+  *                              collection.

+  *                              Will be set to NULL if

+  *                              element with the given name

+  *                              is not found.

+  * @return 0 - Success.

+  * @return EINVAL - Invalid parameter.

+  * @return ENOMEM - No memory.

+  *

+  */

+ int get_config_item(const char *section,

+                     const char *name,

+                     struct collection_item *ini_config,

+                     struct collection_item **item);

+ 

+ /**

+  * @brief Convert item value to integer number.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into an integer number. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  * If "strict" parameter is non zero the function will fail

+  * if there are more characters after the last digit.

+  * The value range is from INT_MIN to INT_MAX.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[in]  strict           Fail the function if

+  *                              the symbol after last digit

+  *                              is not valid.

+  * @param[in]  def              Default value to use if

+  *                              conversion failed.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed due

+  *                                invalid characters.

+  *                              - ERANGE - Value is out of range.

+  *

+  * @return Converted value.

+  * In case of failure the function returns default value and

+  * sets error code into the provided variable.

+  */

+ int get_int_config_value(struct collection_item *item,

+                          int strict,

+                          int def,

+                          int *error);

+ 

+ /**

+  * @brief Convert item value to long number.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into a long number. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  * If "strict" parameter is non zero the function will fail

+  * if there are more characters after the last digit.

+  * The value range is from LONG_MIN to LONG_MAX.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[in]  strict           Fail the function if

+  *                              the symbol after last digit

+  *                              is not valid.

+  * @param[in]  def              Default value to use if

+  *                              conversion failed.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed due

+  *                                invalid characters.

+  *                              - ERANGE - Value is out of range.

+  *

+  * @return Converted value.

+  * In case of failure the function returns default value and

+  * sets error code into the provided variable.

+  */

+ long get_long_config_value(struct collection_item *item,

+                            int strict,

+                            long def,

+                            int *error);

+ 

+ /**

+  * @brief Convert item value to unsigned integer number.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into an unsigned integer number. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  * If "strict" parameter is non zero the function will fail

+  * if there are more characters after the last digit.

+  * The value range is from 0 to UINT_MAX.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[in]  strict           Fail the function if

+  *                              the symbol after last digit

+  *                              is not valid.

+  * @param[in]  def              Default value to use if

+  *                              conversion failed.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed due

+  *                                invalid characters.

+  *                              - ERANGE - Value is out of range.

+  *

+  * @return Converted value.

+  * In case of failure the function returns default value and

+  * sets error code into the provided variable.

+  */

+ unsigned get_unsigned_config_value(struct collection_item *item,

+                                    int strict,

+                                    unsigned def,

+                                    int *error);

+ 

+ /**

+  * @brief Convert item value to unsigned long number.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into an unsigned long number. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  * If "strict" parameter is non zero the function will fail

+  * if there are more characters after the last digit.

+  * The value range is from 0 to ULONG_MAX.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[in]  strict           Fail the function if

+  *                              the symbol after last digit

+  *                              is not valid.

+  * @param[in]  def              Default value to use if

+  *                              conversion failed.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed due

+  *                                invalid characters.

+  *                              - ERANGE - Value is out of range.

+  *

+  * @return Converted value.

+  * In case of failure the function returns default value and

+  * sets error code into the provided variable.

+  */

+ unsigned long get_ulong_config_value(struct collection_item *item,

+                                      int strict,

+                                      unsigned long def,

+                                      int *error);

+ 

+ /**

+  * @brief Convert item value to floating point number.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into a floating point number. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  * If "strict" parameter is non zero the function will fail

+  * if there are more characters after the last digit.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[in]  strict           Fail the function if

+  *                              the symbol after last digit

+  *                              is not valid.

+  * @param[in]  def              Default value to use if

+  *                              conversion failed.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed due

+  *                                invalid characters.

+  *

+  * @return Converted value.

+  * In case of failure the function returns default value and

+  * sets error code into the provided variable.

+  */

+ double get_double_config_value(struct collection_item *item,

+                                int strict,

+                                double def,

+                                int *error);

+ 

+ /**

+  * @brief Convert item value into a logical value.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into a Boolean. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[in]  def              Default value to use if

+  *                              conversion failed.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed due

+  *                                invalid characters.

+  *

+  * @return Converted value.

+  * In case of failure the function returns default value and

+  * sets error code into the provided variable.

+  */

+ unsigned char get_bool_config_value(struct collection_item *item,

+                                     unsigned char def,

+                                     int *error);

+ 

+ /**

+  * @brief Get string configuration value

+  *

+  * Function creates a copy of the string value stored in the item.

+  * Returned value needs to be freed after use.

+  * If error occurred the returned value will be NULL.

+  *

+  * @param[in]  item             Item to use.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - ENOMEM - No memory.

+  *

+  * @return Copy of the string or NULL.

+  */

+ char *get_string_config_value(struct collection_item *item,

+                               int *error);

+ /**

+  * @brief Function returns the string stored in the item.

+  *

+  * Function returns a reference to the string value

+  * stored inside the item. This string can't be altered.

+  * The string will go out of scope if the item is deleted.

+  *

+  * @param[in]  item             Item to use.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *

+  * @return String from the item.

+  */

+ const char *get_const_string_config_value(struct collection_item *item,

+                                           int *error);

+ 

+ /**

+  * @brief Convert item value into a binary sequence.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into a sequence of bytes.

+  * Any of the conversion functions

+  * can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  *

+  * The function allocates memory.

   * It is the responsibility of the caller to free it after use.

-  * free_xxx convenience wrappers are provided for this purpose.

+  * Use \ref free_bin_config_value() for this purpose.

   * Functions will return NULL if conversion failed.

-  */

- /* A special hex format is assumed.

+  *

+  * Function assumes that the value being interpreted

+  * has a special format.

   * The string should be taken in single quotes

-  * and consist of hex encoded value two hex digits per byte.

-  * Example: '0A2BFECC'

+  * and consist of hex encoded value represented by

+  * two hex digits per byte.

   * Case does not matter.

+  *

+  * Example: '0a2BFeCc'

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[out] length           Variable that optionally receives

+  *                              the length of the binary

+  *                              sequence.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed due

+  *                                invalid characters.

+  *                              - ENOMEM - No memory.

+  *

+  * @return Converted value.

+  * In case of failure the function returns NULL.

   */

- char *get_bin_config_value(struct collection_item *item, int *length, int *error);

- void free_bin_config_value(char *);

+ char *get_bin_config_value(struct collection_item *item,

+                            int *length,

+                            int *error);

  

- /* Array of stings.

-  * Separator string includes up to three different separators. If NULL comma is assumed.

-  * The spaces are trimmed automatically around separators in the string.

+ /**

+  * @brief Free binary buffer

+  *

+  * Free binary value returned by \ref get_bin_config_value().

+  *

+  * @param[in] bin              Binary buffer to free.

+  *

+  */

+ void free_bin_config_value(char *bin);

+ 

+ /**

+  * @brief Convert value to an array of strings.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into an array of strings. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  *

+  * Separator string includes up to three different separators.

+  * If separator NULL, comma is assumed.

+  * The spaces are trimmed automatically around separators

+  * in the string.

   * The function drops empty tokens from the list.

   * This means that the string like this: "apple, ,banana, ,orange ,"

-  * will be translated into the list of three items: "apple","banana" and "orange".

+  * will be translated into the list of three items:

+  * "apple","banana" and "orange".

   *

   * The length of the allocated array is returned in "size".

   * Size and error parameters can be NULL.

-  * Use free_string_config_array() to free the array after use.

+  * Use \ref free_string_config_array() to free the array after use.

+  *

+  * The array is always NULL terminated so

+  * it is safe not to get size and just loop until

+  * array element is NULL.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[in]  sep              String cosisting of separator

+  *                              symbols. For example: ",.;" would mean

+  *                              that comma, dot and semicolon

+  *                              should be treated as separators

+  *                              in the value.

+  * @param[out] size             Variable that optionally receives

+  *                              the size of the array.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed.

+  *                              - ENOMEM - No memory.

+  *

+  * @return Array of strings.

+  * In case of failure the function returns NULL.

   */

  char **get_string_config_array(struct collection_item *item,

-                                const char *sep, int *size, int *error);

+                                const char *sep,

+                                int *size,

+                                int *error);

  

- /* This function is same as above but does not omit empty tokens.

+ /**

+  * @brief Convert value to an array of strings.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into an array of strings. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  *

+  * Separator string includes up to three different separators.

+  * If separator NULL, comma is assumed.

+  * The spaces are trimmed automatically around separators

+  * in the string.

+  * The function does not drop empty tokens from the list.

   * This means that the string like this: "apple, ,banana, ,orange ,"

-  * will be translated into the items: "apple", "", "banana", "", "orange", "".

-  * This function is useful when the configuration parameter

-  * holds a positionally sensitive list.

-  * Use free_string_config_array() to free the array after use.

+  * will be translated into the list of five items:

+  * "apple", "", "banana", "" and "orange".

+  *

+  * The length of the allocated array is returned in "size".

+  * Size and error parameters can be NULL.

+  * Use \ref free_string_config_array() to free the array after use.

+  *

+  * The array is always NULL terminated so

+  * it is safe not to get size and just loop until

+  * array element is NULL.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[in]  sep              String cosisting of separator

+  *                              symbols. For example: ",.;" would mean

+  *                              that comma, dot and semicolon

+  *                              should be treated as separators

+  *                              in the value.

+  * @param[out] size             Variable that optionally receives

+  *                              the size of the array.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed.

+  *                              - ENOMEM - No memory.

+  *

+  * @return Array of strings.

+  * In case of failure the function returns NULL.

   */

  char **get_raw_string_config_array(struct collection_item *item,

-                                    const char *sep, int *size, int *error);

- 

- /* Array of long values - separators are detected automatically. */

- /* The length of the allocated array is returned in "size". */

- /* Size and error parameters can be NULL. */

- long *get_long_config_array(struct collection_item *item, int *size, int *error);

- /* Array of double values - separators are detected automatically. */

- /* The length of the allocated array is returned in "size" */

- /* Size and error parameters can be NULL. */

- double *get_double_config_array(struct collection_item *item, int *size, int *error);

- 

- /* Special function to free string config array */

+                                    const char *sep,

+                                    int *size,

+                                    int *error);

+ 

+ /**

+  * @brief Convert value to an array of long values.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into an array of long values. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  *

+  * Separators inside the string are detected automatically.

+  * The spaces are trimmed automatically around separators

+  * in the string.

+  *

+  * The length of the allocated array is returned in "size".

+  * Size parameter can't be NULL.

+  *

+  * Use \ref free_long_config_array() to free the array after use.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[out] size             Variable that receives

+  *                              the size of the array.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed.

+  *                              - ERANGE - Value is out of range.

+  *                              - ENOMEM - No memory.

+  *

+  * @return Array of long values.

+  * In case of failure the function returns NULL.

+  */

+ long *get_long_config_array(struct collection_item *item,

+                             int *size,

+                             int *error);

+ 

+ /**

+  * @brief Convert value to an array of floating point values.

+  *

+  * This is a conversion function.

+  * It converts the value read from the INI file

+  * and stored in the configuration item

+  * into an array of floating point values. Any of the conversion

+  * functions can be used to try to convert the value

+  * stored as a string inside the item.

+  * The results can be different depending upon

+  * how the caller tries to interpret the value.

+  *

+  * Separators inside the string are detected automatically.

+  * The spaces are trimmed automatically around separators

+  * in the string.

+  *

+  * The length of the allocated array is returned in "size".

+  * Size parameter can't be NULL.

+  *

+  * Use \ref free_double_config_array() to free the array after use.

+  *

+  * @param[in]  item             Item to interpret.

+  *                              It must be retrieved using

+  *                              \ref get_config_item().

+  * @param[out] size             Variable that receives

+  *                              the size of the array.

+  * @param[out] error            Variable will get the value

+  *                              of the error code if

+  *                              error happened.

+  *                              Can be NULL. In this case

+  *                              function does not set

+  *                              the code.

+  *                              Codes:

+  *                              - 0 - Success.

+  *                              - EINVAL - Argument is invalid.

+  *                              - EIO - Conversion failed.

+  *                              - ENOMEM - No memory.

+  *

+  * @return Array of floating point values.

+  * In case of failure the function returns NULL.

+  */

+ double *get_double_config_array(struct collection_item *item,

+                                 int *size,

+                                 int *error);

+ 

+ /**

+  * @brief Free array of string values.

+  *

+  * Use this function to free the array returned by

+  * \ref get_string_config_array() or by

+  * \ref get_raw_string_config_array().

+  *

+  * @param[in] str_config        Array of string values.

+  */

  void free_string_config_array(char **str_config);

- /* Special function to free long config array */

+ 

+ /**

+  * @brief Free array of long values.

+  *

+  * Use this function to free the array returned by

+  * \ref get_long_config_array().

+  *

+  * @param[in] array         Array of long values.

+  */

  void free_long_config_array(long *array);

- /* Special function to free double config array */

+ /**

+  * @brief Free array of floating pointer values.

+  *

+  * Use this function to free the array returned by

+  * \ref get_double_config_array().

+  *

+  * @param[in] array         Array of floating pointer values.

+  */

  void free_double_config_array(double *array);

  

+ 

+ /**

+  * @}

+  */

+ 

  #endif

file modified
+198 -132
@@ -21,15 +21,25 @@

  

  #include <stdlib.h>

  #include <stdio.h>

+ #include <string.h>

  #include <errno.h>

  #include <unistd.h>

  #include <fcntl.h>

  #define TRACE_HOME

+ #include "trace.h"

  #include "ini_config.h"

  #include "collection.h"

  #include "collection_tools.h"

  

  

+ int verbose = 0;

+ 

+ #define COLOUT(foo) \

+     do { \

+         if (verbose) foo; \

+     } while(0)

+ 

+ 

  int basic_test(void)

  {

      int error;
@@ -39,32 +49,32 @@

      error = config_for_app("test", NULL, NULL,

                             &ini_config, INI_STOP_ON_NONE, &error_set);

      if (error != EINVAL) {

-         printf("Expected error EINVAL got somethign else: %d\n",error);

+         printf("Expected error EINVAL got somethign else: %d\n", error);

          return EINVAL;

      }

  

      error = config_for_app("test", "foo", "bar",

                             &ini_config, INI_STOP_ON_ANY, &error_set);

      if (error != ENOENT) {

-         printf("Expected error ENOENT got somethign else: %d\n",error);

+         printf("Expected error ENOENT got somethign else: %d\n", error);

          return ENOENT;

      }

  

      error = config_for_app("test", "./ini.conf", "./ini.d",

                             &ini_config, INI_STOP_ON_NONE, &error_set);

      if (error) {

-         printf("Attempt to read configuration returned error: %d\n",error);

+         printf("Attempt to read configuration returned error: %d\n", error);

          return error;

      }

  

-     col_debug_collection(ini_config,COL_TRAVERSE_DEFAULT);

-     col_print_collection(ini_config);

-     col_print_collection(error_set);

+     COLOUT(col_debug_collection(ini_config,COL_TRAVERSE_DEFAULT));

+     COLOUT(col_print_collection(ini_config));

+     COLOUT(col_print_collection(error_set));

  

-     printf("\n\n----------------------\n");

+     COLOUT(printf("\n\n----------------------\n"));

      /* Output parsing errors (if any) */

-     print_config_parsing_errors(stdout, error_set);

-     printf("----------------------\n\n\n");

+     COLOUT(print_config_parsing_errors(stdout, error_set));

+     COLOUT(printf("----------------------\n\n\n"));

  

  

      free_ini_config(ini_config);
@@ -82,24 +92,29 @@

      error = config_from_file("test", "./not_exist_ini.conf",

                               &ini_config, INI_STOP_ON_NONE, &error_set);

      if (error) {

-         printf("Attempt to read configuration returned error: %d. EXPECTED.\n\n", error);

+         COLOUT(printf("Attempt to read configuration returned error: %d."

+                       " EXPECTED.\n\n", error));

          if(error != ENOENT) return error;

      }

  

-     error = config_from_file("test", "./ini.conf", &ini_config, INI_STOP_ON_NONE, &error_set);

+     error = config_from_file("test",

+                              "./ini.conf",

+                              &ini_config,

+                              INI_STOP_ON_NONE,

+                              &error_set);

      if (error) {

-         printf("Attempt to read configuration returned error: %d\n",error);

+         printf("Attempt to read configuration returned error: %d\n", error);

          return error;

      }

  

-     col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT);

-     col_print_collection(ini_config);

-     col_print_collection(error_set);

+     COLOUT(col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT));

+     COLOUT(col_print_collection(ini_config));

+     COLOUT(col_print_collection(error_set));

  

-     printf("\n\n----------------------\n");

+     COLOUT(printf("\n\n----------------------\n"));

      /* Output parsing errors (if any) */

-     print_file_parsing_errors(stdout, error_set);

-     printf("----------------------\n\n\n");

+     COLOUT(print_file_parsing_errors(stdout, error_set));

+     COLOUT(printf("----------------------\n\n\n"));

  

  

      free_ini_config(ini_config);
@@ -108,7 +123,7 @@

      ini_config = NULL;

      error_set = NULL;

  

-     printf("TEST WITH LINES\n");

+     COLOUT(printf("TEST WITH LINES\n"));

  

      error = config_from_file_with_lines("test", "./ini.conf",

                                          &ini_config, INI_STOP_ON_NONE,
@@ -118,13 +133,13 @@

          return error;

      }

  

-     col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT);

-     col_debug_collection(lines, COL_TRAVERSE_DEFAULT);

+     COLOUT(col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT));

+     COLOUT(col_debug_collection(lines, COL_TRAVERSE_DEFAULT));

  

-     printf("\n\n----------------------\n");

+     COLOUT(printf("\n\n----------------------\n"));

      /* Output parsing errors (if any) */

-     print_file_parsing_errors(stdout, error_set);

-     printf("----------------------\n\n\n");

+     COLOUT(print_file_parsing_errors(stdout, error_set));

+     COLOUT(printf("----------------------\n\n\n"));

  

  

      free_ini_config(ini_config);
@@ -155,14 +170,14 @@

          return error;

      }

  

-     col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT);

-     col_print_collection(ini_config);

-     col_print_collection(error_set);

+     COLOUT(col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT));

+     COLOUT(col_print_collection(ini_config));

+     COLOUT(col_print_collection(error_set));

  

-     printf("\n\n----------------------\n");

+     COLOUT(printf("\n\n----------------------\n"));

      /* Output parsing errors (if any) */

-     print_file_parsing_errors(stdout, error_set);

-     printf("----------------------\n\n\n");

+     COLOUT(print_file_parsing_errors(stdout, error_set));

+     COLOUT(printf("----------------------\n\n\n"));

  

  

      free_ini_config(ini_config);
@@ -172,7 +187,7 @@

      ini_config = NULL;

      error_set = NULL;

  

-     printf("TEST WITH LINES\n");

+     COLOUT(printf("TEST WITH LINES\n"));

  

      fd = open("./ini.conf", O_RDONLY);

      if (fd < 0) {
@@ -190,13 +205,13 @@

          return error;

      }

  

-     col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT);

-     col_debug_collection(lines, COL_TRAVERSE_DEFAULT);

+     COLOUT(col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT));

+     COLOUT(col_debug_collection(lines, COL_TRAVERSE_DEFAULT));

  

-     printf("\n\n----------------------\n");

+     COLOUT(printf("\n\n----------------------\n"));

      /* Output parsing errors (if any) */

-     print_file_parsing_errors(stdout, error_set);

-     printf("----------------------\n\n\n");

+     COLOUT(print_file_parsing_errors(stdout, error_set));

+     COLOUT(printf("----------------------\n\n\n"));

  

  

      free_ini_config(ini_config);
@@ -213,28 +228,48 @@

      struct collection_item *ini_config = NULL;

  

      /* App name is null - expect failure */

-     error = config_for_app(NULL, NULL, NULL, NULL, INI_STOP_ON_NONE, NULL);

+     error = config_for_app(NULL,

+                            NULL,

+                            NULL,

+                            NULL,

+                            INI_STOP_ON_NONE,

+                            NULL);

      if (!error) {

-         printf("Expected error: %d got success\n",EINVAL);

+         printf("Expected error: %d got success\n", EINVAL);

          return -1;

      }

  

      /* Config collection storage is NULL - expect failure */

-     error = config_for_app("real", NULL, NULL, NULL, INI_STOP_ON_NONE, NULL);

+     error = config_for_app("real",

+                            NULL,

+                            NULL,

+                            NULL,

+                            INI_STOP_ON_NONE,

+                            NULL);

      if (!error) {

-         printf("Expected error: %d got success\n",EINVAL);

+         printf("Expected error: %d got success\n", EINVAL);

          return -1;

      }

  

      /* Config collection storage is NULL - expect failure */

-     error = config_for_app("real", "real.conf", NULL, NULL, INI_STOP_ON_NONE, NULL);

+     error = config_for_app("real",

+                            "real.conf",

+                            NULL,

+                            NULL,

+                            INI_STOP_ON_NONE,

+                            NULL);

      if (!error) {

-         printf("Expected error: %d got success\n",EINVAL);

+         printf("Expected error: %d got success\n", EINVAL);

          return -1;

      }

  

      /* Expect success but empty config */

-     error = config_for_app("real", "real.conf", NULL, &ini_config, INI_STOP_ON_NONE, NULL);

+     error = config_for_app("real",

+                            "real.conf",

+                            NULL,

+                            &ini_config,

+                            INI_STOP_ON_NONE,

+                            NULL);

      if (error) {

          printf("Expected success got error: %d\n",error);

          return error;
@@ -243,7 +278,8 @@

      count = 0;

      (void)col_get_collection_count(ini_config, &count);

      if (count > 1) {

-         printf("Expected empty collection but got contents with %d elements\n", count);

+         printf("Expected empty collection but"

+                " got contents with %d elements\n", count);

          col_print_collection(ini_config);

          return -1;

      }
@@ -262,8 +298,8 @@

      struct collection_item *item = NULL;

      int type;

  

-     printf("\n\n===== REAL TEST START ======\n");

-     printf("Reading collection\n");

+     COLOUT(printf("\n\n===== REAL TEST START ======\n"));

+     COLOUT(printf("Reading collection\n"));

      error = config_for_app("real", file, "./ini.d",

                             &ini_config, INI_STOP_ON_NONE, &error_set);

      if (error) {
@@ -271,18 +307,19 @@

          return error;

      }

  

-     printf("Debugging the config collection:\n");

-     col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT);

-     printf("Debugging the error collection:\n");

-     col_debug_collection(error_set, COL_TRAVERSE_DEFAULT);

+     COLOUT(printf("Debugging the config collection:\n"));

+     COLOUT(col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT));

+     COLOUT(printf("Debugging the error collection:\n"));

+     COLOUT(col_debug_collection(error_set, COL_TRAVERSE_DEFAULT));

  

-     printf("About to print parsing errors:\n");

-     printf("\n\n----------------------\n");

+     COLOUT(printf("About to print parsing errors:\n"));

+     COLOUT(printf("\n\n----------------------\n"));

      /* Output parsing errors (if any) */

-     print_config_parsing_errors(stdout, error_set);

-     printf("----------------------\n\n\n");

+     COLOUT(print_config_parsing_errors(stdout, error_set));

+     COLOUT(printf("----------------------\n\n\n"));

  

-     printf("About to bind iterator to print the config file contents.\n");

+     COLOUT(printf("About to bind iterator to print"

+                   " the config file contents.\n"));

      /* Bind iterator */

      error =  col_bind_iterator(&iterator, ini_config,

                             COL_TRAVERSE_DEFAULT|COL_TRAVERSE_END);
@@ -293,7 +330,7 @@

          return error;

      }

  

-     printf("About to start iteration loop.\n");

+     COLOUT(printf("About to start iteration loop.\n"));

      do {

          /* Loop through a collection */

          error = col_iterate_collection(iterator, &item);
@@ -310,18 +347,23 @@

  

          /* Start of the collection */

          if (type == COL_TYPE_COLLECTION)

-             printf("Contents of the configuration for application %s\n", col_get_item_property(item, NULL));

+             COLOUT(printf("Contents of the application's configuration %s\n",

+                           col_get_item_property(item, NULL)));

          /* End of section */

-         else if (type == COL_TYPE_END) printf("\n");

+         else if (type == COL_TYPE_END) COLOUT(printf("\n"));

          /* Section header ? */

-         else if (type == COL_TYPE_COLLECTIONREF) printf("[%s]\n", col_get_item_property(item, NULL));

+         else if (type == COL_TYPE_COLLECTIONREF)

+             COLOUT(printf("[%s]\n", col_get_item_property(item, NULL)));

          /* Anything else - we know they are all strings*/

-         else printf("%s = %s\n", col_get_item_property(item, NULL), (char *)col_get_item_data(item));

+         else

+             COLOUT(printf("%s = %s\n",

+                           col_get_item_property(item, NULL),

+                           (char *)col_get_item_data(item)));

      }

      while(1);

  

      /* Do not forget to unbind iterator - otherwise there will be a leak */

-     printf("About to clean up.\n");

+     COLOUT(printf("About to clean up.\n"));

      col_unbind_iterator(iterator);

  

      free_ini_config(ini_config);
@@ -347,7 +389,7 @@

      const char *cstrn;

      void *binary;

      int length;

-     int i;

+     int i = 0;

      char **strarray;

      char **strptr;

      int size;
@@ -355,8 +397,9 @@

      double *darray;

      char **prop_array;

  

-     printf("\n\n===== GET TEST START ======\n");

-     printf("Reading collection\n");

+     COLOUT(printf("\n\n===== GET TEST START ======\n"));

+     COLOUT(printf("Reading collection\n"));

+ 

      error = config_for_app("real", NULL, "./ini.d",

                             &ini_config, INI_STOP_ON_NONE, &error_set);

      if (error) {
@@ -364,13 +407,14 @@

          return error;

      }

  

-     printf("Debugging the config collection:\n");

-     col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT);

-     printf("Debugging the error collection:\n");

-     col_debug_collection(error_set, COL_TRAVERSE_DEFAULT);

+     COLOUT(printf("Debugging the config collection:\n"));

+     COLOUT(col_debug_collection(ini_config, COL_TRAVERSE_DEFAULT));

+     COLOUT(printf("Debugging the error collection:\n"));

+     COLOUT(col_debug_collection(error_set, COL_TRAVERSE_DEFAULT));

      free_ini_config_errors(error_set);

  

-     printf("Negtive test - trying to get non existing key-value pair.\n");

+     COLOUT(printf("Negtive test - trying to get non"

+                   " existing key-value pair.\n"));

  

      /* Negative test */

      item = NULL;
@@ -404,7 +448,7 @@

          return -1;

      }

  

-     printf("Trying to get an item.\n");

+     COLOUT(printf("Trying to get an item.\n"));

  

      /* Positive test */

      item = NULL;
@@ -422,9 +466,10 @@

          return -1;

      }

  

-     col_debug_item(item);

+     COLOUT(col_debug_item(item));

  

-     printf("Get item as string without duplication from NULL item.\n");

+     COLOUT(printf("Get item as string without duplication"

+                   " from the NULL item.\n"));

  

      /* Get a string without duplicication */

      /* Negative test */
@@ -435,7 +480,8 @@

          return -1;

      }

  

-     printf("Get item as string without duplication from correct item.\n");

+     COLOUT(printf("Get item as string without duplication"

+                   "from the correct item.\n"));

  

      /* Now get string from the right item */

      error = 0;
@@ -446,11 +492,12 @@

          return error;

      }

  

-     printf("Value: [%s]\n", cstr);

+     COLOUT(printf("Value: [%s]\n", cstr));

  

      /* Same thing but create a dup */

  

-     printf("Get item as string with duplication from correct item.\n");

+     COLOUT(printf("Get item as string with duplication"

+                   " from correct item.\n"));

  

      error = 0;

      str = get_string_config_value(item, &error);
@@ -460,12 +507,12 @@

          return error;

      }

  

-     printf("Value: [%s]\n", str);

+     COLOUT(printf("Value: [%s]\n", str));

      free(str);

  

  

      /* Get a badly formated number */

-     printf("Convert item to number with strict conversion.\n");

+     COLOUT(printf("Convert item to number with strict conversion.\n"));

  

      item = NULL;

      error = get_config_item("monitor", "bad_number", ini_config, &item);
@@ -482,7 +529,7 @@

          return -1;

      }

  

-     col_debug_item(item);

+     COLOUT(col_debug_item(item));

  

  

      /* Now try to get value in different ways */
@@ -490,7 +537,7 @@

      number = get_int_config_value(item, 1, 10, &error);

      if (error) {

          /* We expected error in this case */

-         printf("Expected error.\n");

+         COLOUT(printf("Expected error.\n"));

          if(number != 10) {

              printf("It failed to set default value.\n");

              free_ini_config(ini_config);
@@ -498,7 +545,7 @@

          }

      }

  

-     printf("Convert item to number without strict conversion.\n");

+     COLOUT(printf("Convert item to number without strict conversion.\n"));

  

      error = 0;

      number = 1;
@@ -519,7 +566,8 @@

  

      /* Get real integer */

  

-     printf("Fetch another item from section \"domains/LOCAL\" named \"enumerate\".\n");

+     COLOUT(printf("Fetch another item from section \"domains/LOCAL\""

+                   " named \"enumerate\".\n"));

  

      item = NULL;

      error = get_config_item("domains/LOCAL","enumerate", ini_config, &item);
@@ -536,7 +584,7 @@

          return -1;

      }

  

-     printf("Convert item to integer.\n");

+     COLOUT(printf("Convert item to integer.\n"));

  

      /* Take number out of it */

      error = 0;
@@ -554,9 +602,9 @@

          return -1;

      }

  

-     printf("Expected 3 got %d\n", number);

+     COLOUT(printf("Expected 3 got %d\n", number));

  

-     printf("Convert item to long.\n");

+     COLOUT(printf("Convert item to long.\n"));

  

      /* Take number out of it */

      error = 0;
@@ -574,9 +622,9 @@

          return -1;

      }

  

-     printf("Expected 3 got %ld\n", number_long);

+     COLOUT(printf("Expected 3 got %ld\n", number_long));

  

-     printf("Convert item to unsigned.\n");

+     COLOUT(printf("Convert item to unsigned.\n"));

  

      /* Take number out of it */

      error = 0;
@@ -594,9 +642,9 @@

          return -1;

      }

  

-     printf("Expected 3 got %d\n", number_unsigned);

+     COLOUT(printf("Expected 3 got %d\n", number_unsigned));

  

-     printf("Convert item to unsigned long.\n");

+     COLOUT(printf("Convert item to unsigned long.\n"));

  

      /* Take number out of it */

      error = 0;
@@ -614,9 +662,9 @@

          return -1;

      }

  

-     printf("Expected 3 got %lu\n", number_ulong);

+     COLOUT(printf("Expected 3 got %lu\n", number_ulong));

  

-     printf("Convert item to double.\n");

+     COLOUT(printf("Convert item to double.\n"));

  

      /* Take number out of it */

      error = 0;
@@ -634,9 +682,9 @@

          return -1;

      }

  

-     printf("Expected 3 got %e\n", number_double);

+     COLOUT(printf("Expected 3 got %e\n", number_double));

  

-     printf("Convert item to bool.\n");

+     COLOUT(printf("Convert item to bool.\n"));

  

      /* Take number out of it */

      error = 0;
@@ -648,7 +696,7 @@

      }

  

      /* Get real bool item and convert it */

-     printf("Get real bool item \"legacy\" and convert it.\n");

+     COLOUT(printf("Get real bool item \"legacy\" and convert it.\n"));

  

      item = NULL;

      error = get_config_item("domains/LOCAL","legacy", ini_config, &item);
@@ -665,7 +713,7 @@

          return -1;

      }

  

-     printf("Convert item to bool.\n");

+     COLOUT(printf("Convert item to bool.\n"));

  

      error = 0;

      logical = get_bool_config_value(item, 1, &error);
@@ -680,12 +728,15 @@

          return -1;

      }

  

-     printf("In the files it is FALSE so we got false.\n");

+     COLOUT(printf("In the files it is FALSE so we got false.\n"));

  

-     printf("Get binary item\n");

+     COLOUT(printf("Get binary item\n"));

  

      item = NULL;

-     error = get_config_item("domains/EXAMPLE.COM","binary_test", ini_config, &item);

+     error = get_config_item("domains/EXAMPLE.COM",

+                             "binary_test",

+                             ini_config,

+                             &item);

      if (error) {

          printf("Expected success but got error! %d\n", error);

          free_ini_config(ini_config);
@@ -699,7 +750,7 @@

          return -1;

      }

  

-     col_debug_item(item);

+     COLOUT(col_debug_item(item));

  

      error = 0;

      binary = get_bin_config_value(item, &length, &error);
@@ -709,15 +760,15 @@

          return error;

      }

  

-     printf("Binary value (expect 123) = ");

-     for (i=0;i<length;i++) {

-         printf("%d",*((unsigned char*)(binary)+i));

-     }

-     printf("\n");

+     COLOUT(printf("Binary value (expect 123) = "));

+     COLOUT(for (i=0;i<length;i++) {

+                 printf("%d",*((unsigned char*)(binary)+i));

+            });

+     COLOUT(printf("\n"));

  

      free_bin_config_value(binary);

  

-     printf("Get string array item\n");

+     COLOUT(printf("Get string array item\n"));

  

      item = NULL;

      error = get_config_item("domains", "domainsorder", ini_config, &item);
@@ -734,9 +785,9 @@

          return -1;

      }

  

-     col_debug_item(item);

+     COLOUT(col_debug_item(item));

  

-     printf("Get str array without size.\n");

+     COLOUT(printf("Get str array without size.\n"));

  

      error = 0;

      strarray = get_string_config_array(item, ",", NULL, &error);
@@ -749,13 +800,13 @@

      /* Can be used with this cycle */

      strptr = strarray;

      while (*strptr != NULL) {

-         printf("[%s]\n",*strptr);

+         COLOUT(printf("[%s]\n",*strptr));

          strptr++;

      }

  

      free_string_config_array(strarray);

  

-     printf("Get raw str array without size.\n");

+     COLOUT(printf("Get raw str array without size.\n"));

  

      error = 0;

      strarray = get_raw_string_config_array(item, ",", NULL, &error);
@@ -768,13 +819,13 @@

      /* Can be used with this cycle */

      strptr = strarray;

      while (*strptr != NULL) {

-         printf("[%s]\n",*strptr);

+         COLOUT(printf("[%s]\n",*strptr));

          strptr++;

      }

  

      free_string_config_array(strarray);

  

-     printf("Get str array with size.\n");

+     COLOUT(printf("Get str array with size.\n"));

  

      error = 0;

      size = 0;
@@ -786,11 +837,11 @@

      }

  

      /* Can be used with this cycle */

-     for (i=0;i<size;i++) printf("[%s]\n",*(strarray + i));

+     COLOUT(for (i=0;i<size;i++) printf("[%s]\n",*(strarray + i)));

  

      free_string_config_array(strarray);

  

-     printf("Get raw str array with size.\n");

+     COLOUT(printf("Get raw str array with size.\n"));

  

      error = 0;

      size = 0;
@@ -802,14 +853,17 @@

      }

  

      /* Can be used with this cycle */

-     for (i=0;i<size;i++) printf("[%s]\n",*(strarray + i));

+     COLOUT(for (i=0;i<size;i++) printf("[%s]\n",*(strarray + i)));

  

      free_string_config_array(strarray);

  

-     printf("Get long array item\n");

+     COLOUT(printf("Get long array item\n"));

  

      item = NULL;

-     error = get_config_item("domains/EXAMPLE.COM", "long_array", ini_config, &item);

+     error = get_config_item("domains/EXAMPLE.COM",

+                             "long_array",

+                             ini_config,

+                             &item);

      if(error) {

          printf("Expected success but got error! %d\n", error);

          free_ini_config(ini_config);
@@ -823,7 +877,7 @@

          return -1;

      }

  

-     col_debug_item(item);

+     COLOUT(col_debug_item(item));

  

      error = 0;

      size = 0; /* Here size is not optional!!! */
@@ -835,14 +889,17 @@

      }

  

      /* Can be used with this cycle */

-     for (i=0;i<size;i++) printf("%ld\n", *(array + i));

+     COLOUT(for (i=0;i<size;i++) printf("%ld\n", *(array + i)));

  

      free_long_config_array(array);

  

-     printf("Get double array item\n");

+     COLOUT(printf("Get double array item\n"));

  

      item = NULL;

-     error = get_config_item("domains/EXAMPLE.COM", "double_array", ini_config, &item);

+     error = get_config_item("domains/EXAMPLE.COM",

+                             "double_array",

+                             ini_config,

+                             &item);

      if (error) {

          printf("Expected success but got error! %d\n", error);

          free_ini_config(ini_config);
@@ -856,7 +913,7 @@

          return -1;

      }

  

-     col_debug_item(item);

+     COLOUT(col_debug_item(item));

  

      error = 0;

      size = 0; /* Here size is not optional!!! */
@@ -868,11 +925,11 @@

      }

  

      /* Can be used with this cycle */

-     for (i=0;i<size;i++) printf("%.4f\n", darray[i]);

+     COLOUT(for (i=0;i<size;i++) printf("%.4f\n", darray[i]));

  

      free_double_config_array(darray);

  

-     printf("\n\nSection list - no size\n");

+     COLOUT(printf("\n\nSection list - no size\n"));

  

      /* Do not care about the error or size */

      prop_array = get_section_list(ini_config, NULL, NULL);
@@ -883,13 +940,14 @@

      }

  

      i = 0;

-     while (prop_array[i]) {

-         printf("Section: [%s]\n", prop_array[i]);

-         i++;

-     }

+     COLOUT(while (prop_array[i]) {

+                printf("Section: [%s]\n", prop_array[i]);

+                i++;

+            });

+ 

      free_section_list(prop_array);

  

-     printf("\n\nSection list - with size\n");

+     COLOUT(printf("\n\nSection list - with size\n"));

  

      /* Do not care about the error or size */

      prop_array = get_section_list(ini_config, &size, NULL);
@@ -899,24 +957,27 @@

          return -1;

      }

  

-     for (i=0;i<size;i++) printf("Section: [%s]\n", prop_array[i]);

+     COLOUT(for (i=0;i<size;i++) printf("Section: [%s]\n", prop_array[i]));

      free_section_list(prop_array);

  

-     printf("\n\nAttributes in the section - with size and error\n");

+     COLOUT(printf("\n\nAttributes in the section - with size and error\n"));

  

      /* Do not care about the error or size */

-     prop_array = get_attribute_list(ini_config, "domains/EXAMPLE.COM", &size, &error);

+     prop_array = get_attribute_list(ini_config,

+                                     "domains/EXAMPLE.COM",

+                                     &size,

+                                     &error);

      if (prop_array == NULL) {

          printf("Expect success got error.\n");

          free_ini_config(ini_config);

          return -1;

      }

  

-     for (i=0;i<size;i++) printf("Attribute: [%s]\n", prop_array[i]);

+     COLOUT(for (i=0;i<size;i++) printf("Attribute: [%s]\n", prop_array[i]));

      free_attribute_list(prop_array);

  

      free_ini_config(ini_config);

-     printf("Done with get test!\n");

+     COLOUT(printf("Done with get test!\n"));

      return EOK;

  }

  
@@ -925,6 +986,10 @@

      int error = EOK;

      char *srcdir = NULL;

  

+     if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = 1;

+ 

+     printf("Start\n");

+ 

      srcdir = getenv("srcdir");

      if(srcdir) {

          if(chdir(srcdir) != 0) {
@@ -944,6 +1009,7 @@

          printf("Test failed! Error %d.\n", error);

          return -1;

      }

+ 

      printf("Success!\n");

      return 0;

  }

@@ -19,4 +19,18 @@

  libpath_utils_la_LDFLAGS = \

      -version-info 1:0:0

  

+ if HAVE_CHECK

+     check_PROGRAMS = path_utils_ut

+ endif

+ 

+ path_utils_ut_SOURCES = \

+     path_utils_ut.c

+ path_utils_ut_CFLAGS = \

+     $(AM_CFLAGS) \

+     $(CHECK_CFLAGS)

+ path_utils_ut_LDADD = \

+     $(CHECK_LIBS) \

+     libpath_utils.la

+ TESTS = $(check_PROGRAMS)

+ 

  tests: all $(check_PROGRAMS)

@@ -9,6 +9,12 @@

  

  AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])

  

+ PKG_CHECK_MODULES([CHECK], [check >= 0.9.5], [have_check=1], [have_check=])

+ if test x$have_check = x; then

+     AC_MSG_WARN([Without the 'CHECK' libraries, you will be unable to run all tests in the 'make check' suite])

+ fi

+ AM_CONDITIONAL([HAVE_CHECK], [test x$have_check != x])

+ 

  m4_pattern_allow([AM_SILENT_RULES])

  AM_SILENT_RULES

  

file modified
+112 -65
@@ -83,53 +83,81 @@

      return NULL;

  }

  

+ static int dot_to_absolute(char *rel_path, int rel_path_size)

+ {

+     char tmp_path[PATH_MAX];

+ 

+     if (strcmp(rel_path, ".") == 0) {

+         if (getcwd(rel_path, rel_path_size) == NULL) {

+             if (errno == ERANGE)

+                 return ENOBUFS;

+             else

+                 return errno;

+         }

+     } else if (strcmp(rel_path, "..") == 0) {

+         if (getcwd(tmp_path, sizeof(tmp_path)) == NULL)  {

+             if (errno == ERANGE)

+                 return ENOBUFS;

+             else

+                 return errno;

+         }

+         strncpy(rel_path, dirname(tmp_path), rel_path_size);

+         if (rel_path[rel_path_size-1] != 0) return ENOBUFS;

+     }

+ 

+     return SUCCESS;

+ }

+ 

  int get_basename(char *base_name, size_t base_name_size, const char *path)

  {

      char tmp_path[PATH_MAX];

+     int ret;

  

+     if (!path) return EINVAL;

      if (!base_name || base_name_size < 1) return ENOBUFS;

  

      strncpy(tmp_path, path, sizeof(tmp_path));

      if (tmp_path[sizeof(tmp_path)-1] != 0) return ENOBUFS;

      strncpy(base_name, basename(tmp_path), base_name_size);

      if (base_name[base_name_size-1] != 0) return ENOBUFS;

+ 

+     ret = dot_to_absolute(base_name, base_name_size);

+     if (ret != SUCCESS) {

+         return ret;

+     }

+ 

      return SUCCESS;

  }

  

  int get_dirname(char *dir_path, size_t dir_path_size, const char *path)

  {

      char tmp_path[PATH_MAX];

+     int ret;

  

+     if (!path) return EINVAL;

      if (!dir_path || dir_path_size < 1) return ENOBUFS;

  

      strncpy(tmp_path, path, sizeof(tmp_path));

      if (tmp_path[sizeof(tmp_path)-1] != 0) return ENOBUFS;

      strncpy(dir_path, dirname(tmp_path), dir_path_size);

      if (dir_path[dir_path_size-1] != 0) return ENOBUFS;

-     if (strcmp(dir_path, ".") == 0) {

-         if (getcwd(dir_path, dir_path_size) == NULL) {

-             if (errno == ERANGE)

-                 return ENOBUFS;

-             else

-                 return errno;

-         }

-     } else if (strcmp(dir_path, "..") == 0) {

-         if (getcwd(tmp_path, sizeof(tmp_path)) == NULL)  {

-             if (errno == ERANGE)

-                 return ENOBUFS;

-             else

-                 return errno;

-         }

-         strncpy(dir_path, dirname(tmp_path), dir_path_size);

-         if (dir_path[dir_path_size-1] != 0) return ENOBUFS;

+ 

+     ret = dot_to_absolute(dir_path, dir_path_size);

+     if (ret != SUCCESS) {

+         return ret;

      }

+ 

      return SUCCESS;

  }

  

- int get_directory_and_base_name(char *dir_path, size_t dir_path_size, char *base_name, size_t base_name_size, const char *path)

+ int get_directory_and_base_name(char *dir_path, size_t dir_path_size,

+                                 char *base_name, size_t base_name_size,

+                                 const char *path)

  {

      char tmp_path[PATH_MAX];

+     int ret;

  

+     if (!path) return EINVAL;

      if (!dir_path || dir_path_size < 1) return ENOBUFS;

      if (!base_name || base_name_size < 1) return ENOBUFS;

  
@@ -143,23 +171,16 @@

      strncpy(dir_path, dirname(tmp_path), dir_path_size);

      if (dir_path[dir_path_size-1] != 0) return ENOBUFS;

  

-     if (strcmp(dir_path, ".") == 0) {

-         if (getcwd(dir_path, dir_path_size) == NULL)  {

-             if (errno == ERANGE)

-                 return ENOBUFS;

-             else

-                 return errno;

-         }

-     } else if (strcmp(dir_path, "..") == 0) {

-         if (getcwd(tmp_path, sizeof(tmp_path)) == NULL)  {

-             if (errno == ERANGE)

-                 return ENOBUFS;

-             else

-                 return errno;

-         }

-         strncpy(dir_path, dirname(tmp_path), dir_path_size);

-         if (dir_path[dir_path_size-1] != 0) return ENOBUFS;

+     ret = dot_to_absolute(dir_path, dir_path_size);

+     if (ret != SUCCESS) {

+         return ret;

      }

+ 

+     if (strcmp(base_name, ".") == 0) {

+         strncpy(base_name, "", base_name_size);

+         if (base_name[base_name_size-1] != 0) return ENOBUFS;

+     }

+ 

      return SUCCESS;

  }

  
@@ -182,13 +203,15 @@

      if (head && *head) {

          for (p = head; *p; p++);                /* walk to end of head */

          for (p--; p >= head && *p == '/'; p--); /* skip any trailing slashes in head */

+         if ((p - head) > path_size-1) return ENOBUFS;

          for (src = head; src <= p && dst < dst_end;) *dst++ = *src++; /* copy head */

      }

      if (tail && *tail) {

          for (p = tail; *p && *p == '/'; p++);   /* skip any leading slashes in tail */

          if (dst > path)

              if (dst < dst_end) *dst++ = '/';    /* insert single slash between head & tail */

-         for (src = p; *src && dst < dst_end;) *dst++ = *src++; /* copy tail */

+         for (src = p; *src && dst <= dst_end;) *dst++ = *src++; /* copy tail */

+         if (*src) return ENOBUFS; /* failed to copy everything */

      }

      *dst = 0;

      if (dst > dst_end) {
@@ -212,7 +235,7 @@

      if (is_absolute_path(path)) {

          for (src = path; *src && dst < dst_end;) *dst++ = *src++;

          *dst = 0;

-         if (dst > dst_end) result = ENOBUFS;

+         if (dst > dst_end || *src) result = ENOBUFS;

          return result;

      }

  
@@ -222,24 +245,24 @@

          else

              return errno;

      }

+ 

      for (dst = absolute_path; *dst && dst < dst_end; dst++);

+     if (!(path && *path)) return result;

      if (dst > dst_end) {

-         *dst = 0;

-         result = ENOBUFS;

-         return result;

+         *absolute_path = 0;

+         return ENOBUFS;

      }

-     if (!(path && *path)) return result;

+ 

      *dst++ = '/';

      if (dst > dst_end) {

-         *dst = 0;

-         result = ENOBUFS;

-         return result;

+         *absolute_path = 0;

+         return ENOBUFS;

      }

+ 

      for (src = path; *src && dst < dst_end;) *dst++ = *src++;

-         *dst = 0;

-     if (dst > dst_end) {

-         result = ENOBUFS;

-     }

+     if (*src) return ENOBUFS; /* failed to copy everything */

+     *dst = 0;

+ 

      return result;

  }

  
@@ -249,6 +272,9 @@

      const char *start, *end;

      char *mem_block, **array_ptr, *component_ptr;

  

+     if (count) *count = 0;

+     if (!path) return NULL;

+ 

      /* If path is absolute add in special "/" root component */

      if (*path == '/') {

          n_components = 1;
@@ -364,12 +390,12 @@

              }

          }

  

-         if ((dst > normalized_path) && (dst < dst_end) && (dst[-1] != '/')) *dst++ = '/';

-         while ((start < end) && (dst < dst_end)) *dst++ = *start++;

-         if (dst > dst_end) {

-             *dst = 0;

+         if ((end-start) > (dst_end-dst)) {

              return ENOBUFS;

          }

+ 

+         if ((dst > normalized_path) && (dst < dst_end) && (dst[-1] != '/')) *dst++ = '/';

+         while ((start < end) && (dst < dst_end)) *dst++ = *start++;

      }

  

      if (dst == normalized_path) {
@@ -382,7 +408,10 @@

      return result;

  }

  

- int common_path_prefix(char *common_path, size_t common_path_size, int *common_count, const char *path1, const char *path2)

+ int common_path_prefix(char *common_path,

+                        size_t common_path_size,

+                        int *common_count,

+                        const char *path1, const char *path2)

  {

      int count1, count2, min_count, i, n_common, result;

      char **split1, **split2;
@@ -400,8 +429,8 @@

      else

          min_count = count2;

  

-     if (min_count <= 0) {

-         result = 0;

+     if (min_count <= 0 || !split1 || !split2 ) {

+         result = SUCCESS;

          *common_path = 0;

          goto done;

      }
@@ -410,8 +439,8 @@

          if (strcmp(split1[n_common], split2[n_common]) != 0) break;

      }

  

-     if (n_common < 0) {

-         result = 0;

+     if (n_common == 0) {

+         result = SUCCESS;

          *common_path = 0;

          goto done;

      }
@@ -458,7 +487,6 @@

  int find_existing_directory_ancestor(char *ancestor, size_t ancestor_size, const char *path)

  {

      int error;

-     char base_name[PATH_MAX];

      char dir_path[PATH_MAX];

      struct stat info;

  
@@ -472,9 +500,12 @@

              error = errno;

              if (error != ENOENT) return error;

          } else {

-         if (S_ISDIR(info.st_mode)) break;

+             if (S_ISDIR(info.st_mode)) break;

+         }

+         error = get_dirname(dir_path, sizeof(dir_path), dir_path);

+         if (error != SUCCESS) {

+             return error;

          }

-         get_directory_and_base_name(dir_path, sizeof(dir_path), base_name, sizeof(base_name), dir_path);

      }

  

      strncpy(ancestor, dir_path, ancestor_size);
@@ -482,9 +513,10 @@

      return SUCCESS;

  }

  

- int directory_list(const char *path, bool recursive, directory_list_callback_t callback, void *user_data)

+ int directory_list(const char *path, bool recursive,

+                    directory_list_callback_t callback, void *user_data)

  {

-     DIR * dir;

+     DIR *dir;

      struct dirent *entry;

      struct stat info;

      int error = 0;
@@ -498,9 +530,16 @@

  

      for (entry = readdir(dir); entry; entry = readdir(dir)) {

          prune = false;

-         if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) continue;

+         if (strcmp(entry->d_name, ".") == 0 ||

+             strcmp(entry->d_name, "..") == 0) {

+             continue;

+         }

  

-         path_concat(entry_path, sizeof(entry_path), path, entry->d_name);

+         error = path_concat(entry_path, sizeof(entry_path),

+                             path, entry->d_name);

+         if (error != SUCCESS) {

+             return error;

+         }

  

          if (lstat(entry_path, &info) < 0) {

              continue;
@@ -508,11 +547,19 @@

  

          prune = !callback(path, entry->d_name, entry_path, &info, user_data);

          if (S_ISDIR(info.st_mode)) {

-             if (recursive && !prune) directory_list(entry_path, recursive, callback, user_data);

- 

+             if (recursive && !prune) {

+                 error = directory_list(entry_path, recursive,

+                                        callback, user_data);

+                 if (error != SUCCESS) {

+                     return error;

+                 }

+             }

          }

      }

-     closedir(dir);

+     error = closedir(dir);

+     if (error) {

+         return error;

+     }

      return SUCCESS;

  }

  

@@ -0,0 +1,721 @@

+ /*

+    path_utils - unit tests

+ 

+    Authors:

+        Jakub Hrozek <jhrozek@redhat.com>

+ 

+    Copyright (C) 2009 Red Hat

+ 

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; either version 3 of the License, or

+    (at your option) any later version.

+ 

+    This program 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 General Public License for more details.

+ 

+    You should have received a copy of the GNU General Public License

+    along with this program.  If not, see <http://www.gnu.org/licenses/>.

+ */

+ 

+ #define _GNU_SOURCE /* asprintf */

+ 

+ #include <check.h>

+ #include <stdlib.h>

+ #include <stdio.h>

+ #include <unistd.h>

+ #include <errno.h>

+ 

+ #include "path_utils.h"

+ 

+ #define fail_unless_str_equal(a, b) do { \

+     fail_unless(strcmp(a, b) == 0, \

+                 "The strings '%s' and '%s' are different, expected same", \

+                 a, b); \

+ } while(0);

+ 

+ #define DIR_TEMPLATE        "test-directory-list-dir-XXXXXX"

+ #define SUBDIR              "test-directory-list-subdir"

+ #define SUBSUBDIR           "test-directory-list-subsubdir"

+ char *dlist_dir;

+ char *dlist_subdir;

+ char *dlist_subsubdir;

+ 

+ /**** get_dirname ****/

+ START_TEST(test_dirname)

+ {

+     char p[PATH_MAX];

+     char cwd[PATH_MAX];

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "/foo/bar") == SUCCESS);

+     fail_unless_str_equal(p, "/foo");

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "/") == SUCCESS);

+     fail_unless_str_equal(p, "/");

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "/foo") == SUCCESS);

+     fail_unless_str_equal(p, "/");

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "//foo//bar") == SUCCESS);

+     fail_unless_str_equal(p, "//foo");

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "//foo//") == SUCCESS);

+     fail_unless_str_equal(p, "//");

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "foo//bar") == SUCCESS);

+     fail_unless_str_equal(p, "foo");

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "foo//////bar") == SUCCESS);

+     fail_unless_str_equal(p, "foo");

+ 

+     /* if pathname does not contain a slash, dirname returns cwd */

+     fail_if(getcwd(cwd, PATH_MAX) == NULL, "getcwd failed");

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "foo") == SUCCESS);

+     fail_unless_str_equal(p, cwd);

+ 

+     fail_unless(get_dirname(p, PATH_MAX, ".") == SUCCESS);

+     fail_unless_str_equal(p, cwd);

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "..") == SUCCESS);

+     fail_unless_str_equal(p, cwd);

+ 

+     fail_unless(get_dirname(p, PATH_MAX, "") == SUCCESS);

+     fail_unless_str_equal(p, cwd);

+ }

+ END_TEST

+ 

+ START_TEST(test_dirname_neg)

+ {

+     char neg[3];

+     char p[PATH_MAX];

+ 

+     fail_if(get_dirname(neg, 3, "/foo/bar") == SUCCESS);

+     fail_unless(get_dirname(p, PATH_MAX, NULL) == EINVAL);

+ }

+ END_TEST

+ 

+ /**** get_basename ****/

+ START_TEST(test_basename)

+ {

+     char p[PATH_MAX];

+     char cwd[PATH_MAX];

+ 

+     fail_unless(get_basename(p, PATH_MAX, "/foo/bar") == SUCCESS);

+     fail_unless_str_equal(p, "bar");

+ 

+     fail_unless(get_basename(p, PATH_MAX, "/foo/") == SUCCESS);

+     fail_unless_str_equal(p, "foo");

+ 

+     fail_unless(get_basename(p, PATH_MAX, "foo") == SUCCESS);

+     fail_unless_str_equal(p, "foo");

+ 

+     fail_unless(get_basename(p, PATH_MAX, "/") == SUCCESS);

+     fail_unless_str_equal(p, "/");

+ 

+     fail_if(getcwd(cwd, PATH_MAX) == NULL, "getcwd failed");

+ 

+     fail_unless(get_basename(p, PATH_MAX, ".") == SUCCESS);

+     fail_unless_str_equal(p, cwd);

+ 

+     fail_unless(get_basename(p, PATH_MAX, "") == SUCCESS);

+     fail_unless_str_equal(p, cwd);

+ }

+ END_TEST

+ 

+ START_TEST(test_basename_neg)

+ {

+     char neg[3];

+     char p[PATH_MAX];

+ 

+     fail_if(get_basename(neg, 3, "/foo/bar") == SUCCESS);

+ 

+     fail_unless(get_basename(p, PATH_MAX, NULL) == EINVAL);

+ }

+ END_TEST

+ 

+ /**** is_absolute_path ****/

+ START_TEST(test_is_absolute_path)

+ {

+     fail_unless(is_absolute_path("") == false);

+     fail_unless(is_absolute_path("foo/bar") == false);

+ 

+     fail_unless(is_absolute_path("/foo/bar") == true);

+     fail_unless(is_absolute_path("/foo") == true);

+     fail_unless(is_absolute_path("/") == true);

+ }

+ END_TEST

+ 

+ /**** get_dirname_and_basename ****/

+ /* Just a couple of basic tests - get_dirname_and_basename()

+  * uses get_dirname() and get_basename() under the hood which

+  * are tested enough in their specific tests

+  */

+ START_TEST(test_dirname_and_basename)

+ {

+     char dir[PATH_MAX];

+     char base[PATH_MAX];

+     char cwd[PATH_MAX];

+     int ret;

+ 

+     ret = get_directory_and_base_name(dir, PATH_MAX, base, PATH_MAX, "/foo/bar");

+     fail_unless(ret == SUCCESS);

+     fail_unless_str_equal(dir, "/foo");

+     fail_unless_str_equal(base, "bar");

+ 

+     ret = get_directory_and_base_name(dir, PATH_MAX, base, PATH_MAX, "/foo");

+     fail_unless(ret == SUCCESS);

+     fail_unless_str_equal(dir, "/");

+     fail_unless_str_equal(base, "foo");

+ 

+     ret = get_directory_and_base_name(dir, PATH_MAX, base, PATH_MAX, "/");

+     fail_unless(ret == SUCCESS);

+     fail_unless_str_equal(dir, "/");

+     fail_unless_str_equal(base, "/");

+ 

+     fail_if(getcwd(cwd, PATH_MAX) == NULL, "getcwd failed");

+ 

+     ret = get_directory_and_base_name(dir, PATH_MAX, base, PATH_MAX, "foo");

+     fail_unless(ret == SUCCESS);

+     fail_unless_str_equal(dir, cwd);

+     fail_unless_str_equal(base, "foo");

+ 

+     ret = get_directory_and_base_name(dir, PATH_MAX, base, PATH_MAX, "");

+     fail_unless(ret == SUCCESS);

+     fail_unless_str_equal(dir, cwd);

+     fail_unless_str_equal(base, "");

+ 

+     ret = get_directory_and_base_name(dir, PATH_MAX, base, PATH_MAX, ".");

+     fail_unless(ret == SUCCESS);

+     fail_unless_str_equal(dir, cwd);

+     fail_unless_str_equal(base, "");

+ }

+ END_TEST

+ 

+ START_TEST(test_dirname_and_basename_neg)

+ {

+     char dir[PATH_MAX];

+     char base[PATH_MAX];

+     int ret;

+ 

+     ret = get_directory_and_base_name(dir, PATH_MAX, base, PATH_MAX, NULL);

+     fail_unless(ret == EINVAL);

+ }

+ END_TEST

+ 

+ /**** path_concat ****/

+ START_TEST(test_path_concat)

+ {

+     char p[PATH_MAX];

+     char p2[9];

+ 

+     fail_unless(path_concat(p, PATH_MAX, "/foo", "bar") == SUCCESS);

+     fail_unless_str_equal(p, "/foo/bar");

+ 

+     fail_unless(path_concat(p, PATH_MAX, "/foo", "/bar") == SUCCESS);

+     fail_unless_str_equal(p, "/foo/bar");

+ 

+     fail_unless(path_concat(p, PATH_MAX, "/foo/", "/bar") == SUCCESS);

+     fail_unless_str_equal(p, "/foo/bar");

+ 

+     fail_unless(path_concat(p, PATH_MAX, "/foo", "") == SUCCESS);

+     fail_unless_str_equal(p, "/foo");

+ 

+     fail_unless(path_concat(p, PATH_MAX, "foo", NULL) == SUCCESS);

+     fail_unless_str_equal(p, "foo");

+ 

+     fail_unless(path_concat(p, PATH_MAX, "", "foo") == SUCCESS);

+     fail_unless_str_equal(p, "foo");

+ 

+     fail_unless(path_concat(p, PATH_MAX, NULL, "foo") == SUCCESS);

+     fail_unless_str_equal(p, "foo");

+ 

+     /* on-by-one */

+     fail_unless(path_concat(p2, 9, "/foo", "bar") == SUCCESS);

+     fail_unless_str_equal(p2, "/foo/bar");

+ }

+ END_TEST

+ 

+ START_TEST(test_path_concat_neg)

+ {

+     char small[3];

+     char small2[4];

+     char p2[8];

+ 

+     /* these two test different conditions */

+     fail_unless(path_concat(small, 3, "/foo", "bar") == ENOBUFS);

+     fail_unless(path_concat(small2, 4, "/foo", "bar") == ENOBUFS);

+ 

+     /* off-by-one */

+     fail_unless(path_concat(p2, 8, "/foo", "bar") == ENOBUFS);

+     fail_unless_str_equal(p2, "/foo/bar");

+ }

+ END_TEST

+ 

+ /**** make_path_absolute ****/

+ START_TEST(test_make_path_absolute)

+ {

+     char p[PATH_MAX];

+     char p2[PATH_MAX];

+     char cwd[PATH_MAX];

+     char *buf;

+     size_t buf_len;

+ 

+     fail_unless(make_path_absolute(p, PATH_MAX, "/foo") == SUCCESS);

+     fail_unless_str_equal(p, "/foo");

+ 

+     fail_if(getcwd(cwd, PATH_MAX) == NULL, "getcwd failed");

+ 

+     fail_unless(make_path_absolute(p, PATH_MAX, "foo") == SUCCESS);

+     snprintf(p2, PATH_MAX, "%s/foo", cwd);

+     fail_unless_str_equal(p, p2);

+ 

+     fail_unless(make_path_absolute(p, PATH_MAX, "") == SUCCESS);

+     fail_unless_str_equal(p, cwd);

+ 

+     /* on-by-one; 2 = terminating null + path delimeter */

+     buf_len = strlen(cwd) + strlen("foo") + 2;

+     buf = malloc(buf_len);

+     fail_if(buf == NULL);

+     fail_unless(make_path_absolute(buf, buf_len, "foo") == SUCCESS);

+     free(buf);

+ }

+ END_TEST

+ 

+ START_TEST(test_make_path_absolute_neg)

+ {

+     char small[1];

+     char cwd[PATH_MAX];

+     char *small2;

+     int small_len;

+ 

+     fail_unless(make_path_absolute(small, 1, "/foo") == ENOBUFS);

+     fail_unless(make_path_absolute(NULL, 1, "/foo") == ENOBUFS);

+ 

+     /* off-by-one */

+     fail_if(getcwd(cwd, PATH_MAX) == NULL, "getcwd failed");

+     small_len = strlen(cwd) + strlen("foo") + 1;

+     small2 = malloc(small_len);

+     fail_if(small2 == NULL);

+     fail_unless(make_path_absolute(small2, small_len, "foo") == ENOBUFS);

+     free(small2);

+ 

+     /* just enough space for cwd */

+     small_len = strlen(cwd) + 1;

+     small2 = malloc(small_len);

+     fail_if(small2 == NULL);

+     fail_unless(make_path_absolute(small2, small_len, "foo") == ENOBUFS);

+     free(small2);

+ }

+ END_TEST

+ 

+ /**** make_normalized_absolute_path ****/

+ START_TEST(test_make_normalized_absolute_path)

+ {

+     char p[PATH_MAX];

+     char p2[PATH_MAX];

+     char cwd[PATH_MAX];

+ 

+     fail_if(getcwd(cwd, PATH_MAX) == NULL, "getcwd failed");

+ 

+     fail_unless(make_normalized_absolute_path(p, PATH_MAX, "foo/baz/../bar") == SUCCESS);

+     snprintf(p2, PATH_MAX, "%s/foo/bar", cwd);

+     fail_unless_str_equal(p, p2);

+ 

+     fail_unless(make_normalized_absolute_path(p, PATH_MAX, "/foo/../bar") == SUCCESS);

+     fail_unless_str_equal(p, "/bar");

+ 

+     fail_unless(make_normalized_absolute_path(p, PATH_MAX, "/foo/../baz/../bar") == SUCCESS);

+     fail_unless_str_equal(p, "/bar");

+ }

+ END_TEST

+ 

+ START_TEST(test_make_normalized_absolute_path_neg)

+ {

+     char small[1];

+ 

+     fail_unless(make_path_absolute(small, 1, "/foo") == ENOBUFS);

+     fail_unless(make_path_absolute(NULL, 1, "/foo") == ENOBUFS);

+ }

+ END_TEST

+ 

+ /**** split_path ****/

+ START_TEST(test_split_path)

+ {

+     char **array;

+     int n;

+ 

+     array = split_path("/foo/bar", &n);

+     fail_if(array == NULL);

+     fail_unless(n == 3);

+     fail_unless_str_equal(array[0], "/");

+     fail_unless_str_equal(array[1], "foo");

+     fail_unless_str_equal(array[2], "bar");

+     free(array);

+ 

+     array = split_path("/foo/../bar", &n);

+     fail_if(array == NULL);

+     fail_unless(n == 4);

+     fail_unless_str_equal(array[0], "/");

+     fail_unless_str_equal(array[1], "foo");

+     fail_unless_str_equal(array[2], "..");

+     fail_unless_str_equal(array[3], "bar");

+     free(array);

+ 

+     array = split_path("/foo/bar", NULL);

+     fail_if(array == NULL);

+     fail_unless_str_equal(array[0], "/");

+     fail_unless_str_equal(array[1], "foo");

+     fail_unless_str_equal(array[2], "bar");

+     free(array);

+ 

+     array = split_path("foo/bar", &n);

+     fail_if(array == NULL);

+     fail_unless(n == 2);

+     fail_unless_str_equal(array[0], "foo");

+     fail_unless_str_equal(array[1], "bar");

+     free(array);

+ 

+     array = split_path(".", &n);

+     fail_if(array == NULL);

+     fail_unless(n == 1);

+     fail_unless_str_equal(array[0], ".");

+     free(array);

+ 

+     array = split_path("foo", &n);

+     fail_if(array == NULL);

+     fail_unless(n == 1);

+     fail_unless_str_equal(array[0], "foo");

+     free(array);

+ 

+     /* one might expect { "" } or outright NULL, but we agreed not to

+      * do changes beyond bugfixes at this point */

+     array = split_path("", &n);

+     fail_if(array == NULL);

+     fail_unless(n == 0);

+     fail_unless(array[0] == NULL);

+     free(array);

+ }

+ END_TEST

+ 

+ START_TEST(test_split_path_neg)

+ {

+     char **array;

+     int n;

+ 

+     array = split_path(NULL, &n);

+     fail_unless(array == NULL);

+ 

+     array = split_path(NULL, NULL);

+     fail_unless(array == NULL);

+ }

+ END_TEST

+ 

+ /**** normalize_path ****/

+ START_TEST(test_normalize_path)

+ {

+     char norm[PATH_MAX];

+     char small[8];

+ 

+     fail_unless(normalize_path(norm, PATH_MAX, "/foo/../bar") == SUCCESS);

+     fail_unless_str_equal(norm, "/bar");

+ 

+     fail_unless(normalize_path(norm, PATH_MAX, "/foo/../baz/../bar") == SUCCESS);

+     fail_unless_str_equal(norm, "/bar");

+ 

+     fail_unless(normalize_path(norm, PATH_MAX, "foo/baz/../bar") == SUCCESS);

+     fail_unless_str_equal(norm, "foo/bar");

+ 

+     fail_unless(normalize_path(norm, PATH_MAX, "/foo/./bar") == SUCCESS);

+     fail_unless_str_equal(norm, "/foo/bar");

+ 

+     fail_unless(normalize_path(norm, PATH_MAX, "/foo//bar") == SUCCESS);

+     fail_unless_str_equal(norm, "/foo/bar");

+ 

+     fail_unless(normalize_path(norm, PATH_MAX, "/foo//bar") == SUCCESS);

+     fail_unless_str_equal(norm, "/foo/bar");

+ 

+     fail_unless(normalize_path(norm, PATH_MAX, "") == SUCCESS);

+     fail_unless_str_equal(norm, ".");

+ 

+     fail_unless(normalize_path(norm, PATH_MAX, "/../..") == SUCCESS);

+     fail_unless_str_equal(norm, "/");

+ 

+     /* on-by-one */

+     fail_unless(normalize_path(small, 8, "foo/baz/../bar") == SUCCESS);

+     fail_unless_str_equal(small, "foo/bar");

+ }

+ END_TEST

+ 

+ START_TEST(test_normalize_path_neg)

+ {

+     char norm[PATH_MAX];

+     char small[4];

+ 

+     fail_unless(normalize_path(norm, PATH_MAX, "foo/../..") == PATH_UTILS_ERROR_NOT_FULLY_NORMALIZED);

+ 

+     /* with a buffer of 4 chars, this would test off-by-one error */

+     fail_unless(normalize_path(small, 4, "/foo/../bar") == ENOBUFS);

+ }

+ END_TEST

+ 

+ /**** common_path_prefix ****/

+ START_TEST(test_common_path_prefix)

+ {

+     char common[PATH_MAX];

+     char small[5];

+     int count;

+ 

+     fail_unless(common_path_prefix(common, PATH_MAX, &count, "/usr/lib", "/usr/share") == SUCCESS);

+     fail_unless_str_equal(common, "/usr");

+     fail_unless(count == 2);

+ 

+     fail_unless(common_path_prefix(common, PATH_MAX, NULL, "/usr/lib", "/usr/share") == SUCCESS);

+     fail_unless_str_equal(common, "/usr");

+ 

+     fail_unless(common_path_prefix(common, PATH_MAX, &count, "/usr/lib", "/usr/lab") == SUCCESS);

+     fail_unless_str_equal(common, "/usr");

+     fail_unless(count == 2);

+ 

+     fail_unless(common_path_prefix(common, PATH_MAX, &count, "foo", "bar") == SUCCESS);

+     fail_unless_str_equal(common, "");

+     fail_unless(count == 0);

+ 

+     fail_unless(common_path_prefix(common, PATH_MAX, &count, "/", "/") == SUCCESS);

+     fail_unless_str_equal(common, "/");

+     fail_unless(count == 1);

+ 

+     fail_unless(common_path_prefix(common, PATH_MAX, &count, NULL, "/usr/share") == SUCCESS);

+     fail_unless_str_equal(common, "");

+     fail_unless(count == 0);

+ 

+     /* on-by-one */

+     fail_unless(common_path_prefix(small, 5, NULL, "/usr/lib", "/usr/share") == SUCCESS);

+     fail_unless_str_equal(small, "/usr");

+ }

+ END_TEST

+ 

+ START_TEST(test_common_path_prefix_neg)

+ {

+     char small[1];

+     char small2[4];

+     int count;

+ 

+     fail_unless(common_path_prefix(small, 1, &count, "/usr/lib", "/usr/share") == ENOBUFS);

+     fail_unless(common_path_prefix(NULL, PATH_MAX, &count, "/usr/lib", "/usr/share") == ENOBUFS);

+     /* off-by-one */

+     fail_unless(common_path_prefix(small2, 4, NULL, "/usr/lib", "/usr/share") == ENOBUFS);

+ }

+ END_TEST

+ 

+ /**** find_existing_directory_ancestor ****/

+ START_TEST(test_find_existing_directory_ancestor)

+ {

+     char p[PATH_MAX];

+     char cwd[PATH_MAX];

+ 

+     fail_unless(find_existing_directory_ancestor(p, PATH_MAX, "/etc/passwd") == SUCCESS);

+     fail_unless_str_equal(p, "/etc");

+ 

+     /* if pathname does not contain a slash, the parent is cwd */

+     fail_if(getcwd(cwd, PATH_MAX) == NULL, "getcwd failed");

+ 

+     fail_unless(find_existing_directory_ancestor(p, PATH_MAX, "foo/bar") == SUCCESS);

+     fail_unless_str_equal(p, cwd);

+ }

+ END_TEST

+ 

+ START_TEST(test_find_existing_directory_ancestor_neg)

+ {

+     char small[4];

+     fail_unless(find_existing_directory_ancestor(small, 4, "/etc/passwd") == ENOBUFS);

+     fail_unless(find_existing_directory_ancestor(NULL, 4, "/etc/passwd") == ENOBUFS);

+ }

+ END_TEST

+ 

+ /**** directory_list ****/

+ void setup_directory_list(void)

+ {

+     char *s = NULL;

+     int ret;

+ 

+     s = strdup(DIR_TEMPLATE);

+     fail_unless(s != NULL, "strdup failed\n");

+     dlist_dir = mkdtemp(s);

+     fail_unless(dlist_dir != NULL, "mkstemp failed [%d][%s]", errno, strerror(errno));

+ 

+     ret = asprintf(&dlist_subdir, "%s/%s", dlist_dir, SUBDIR);

+     fail_unless(ret != 1, "strdup failed\n");

+     ret = mkdir(dlist_subdir, 0700);

+     fail_unless(ret != -1, "mkdir %s failed [%d][%s]", dlist_subdir, errno, strerror(errno));

+ 

+     ret = asprintf(&dlist_subsubdir, "%s/%s", dlist_subdir, SUBSUBDIR);

+     fail_unless(ret != 1, "strdup failed\n");

+     ret = mkdir(dlist_subsubdir, 0700);

+     fail_unless(ret != -1, "mkdir %s failed [%d][%s]", dlist_subsubdir, errno, strerror(errno));

+ }

+ 

+ void teardown_directory_list(void)

+ {

+     int ret;

+ 

+     if (dlist_subsubdir) {

+         ret = rmdir(dlist_subsubdir);

+         fail_unless(ret != -1, "unlink %s failed [%d][%s]", dlist_subsubdir, errno, strerror(errno));

+         free(dlist_subsubdir);

+         dlist_subsubdir = NULL;

+     }

+ 

+     if (dlist_subdir) {

+         ret = rmdir(dlist_subdir);

+         fail_unless(ret != -1, "unlink %s failed [%d][%s]", dlist_subdir, errno, strerror(errno));

+         free(dlist_subdir);

+         dlist_subdir = NULL;

+     }

+ 

+     if (dlist_dir) {

+         ret = rmdir(dlist_dir);

+         fail_unless(ret != -1, "unlink %s failed [%d][%s]", dlist_dir, errno, strerror(errno));

+         free(dlist_dir);

+         dlist_dir = NULL;

+     }

+ }

+ 

+ bool dirlist_cb_nonrecursive(const char *directory, const char *base_name,

+                              const char *path, struct stat *info,

+                              void *user_data)

+ {

+     int *data = (int *) user_data;

+ 

+     fail_unless_str_equal(path, dlist_subdir);

+     fail_unless(*data == 123);

+ 

+     return true;

+ }

+ 

+ bool dirlist_cb_recursive(const char *directory, const char *base_name,

+                           const char *path, struct stat *info,

+                           void *user_data)

+ {

+     bool *seen_child = (bool *) user_data;

+     static bool seen_parent = false;

+ 

+     if (!seen_parent) {

+         fail_unless_str_equal(path, dlist_subdir);

+         seen_parent = true;

+     } else {

+         *seen_child = true;

+         fail_unless_str_equal(path, dlist_subsubdir);

+         seen_parent = false;

+     }

+ 

+     return true;

+ }

+ 

+ START_TEST(test_directory_list)

+ {

+     int data = 123;

+     bool seen_child;

+ 

+     fail_unless(directory_list(dlist_dir, false, dirlist_cb_nonrecursive, &data) == SUCCESS);

+ 

+     seen_child = false;

+     fail_unless(directory_list(dlist_dir, true, dirlist_cb_recursive, &seen_child) == SUCCESS);

+     fail_unless(seen_child == true);

+ 

+     seen_child = false;

+     fail_unless(directory_list(dlist_dir, false, dirlist_cb_recursive, &seen_child) == SUCCESS);

+     fail_unless(seen_child == false);

+ }

+ END_TEST

+ 

+ START_TEST(test_directory_list_neg)

+ {

+     fail_if(directory_list("/not/here", false, dirlist_cb_nonrecursive, NULL) == SUCCESS);

+     fail_if(directory_list("/etc/passwd", false, dirlist_cb_nonrecursive, NULL) == SUCCESS);

+ }

+ END_TEST

+ 

+ /**** is_ancestor_path ****/

+ START_TEST(test_is_ancestor_path)

+ {

+   fail_unless(is_ancestor_path("/a/b/c", "/a/b/c/d") == true);

+   /* equal, not ancestor */

+   fail_unless(is_ancestor_path("/a/b/c/d", "/a/b/c/d") == false);

+   fail_unless(is_ancestor_path("/a/x/c", "/a/b/c/d") == false);

+   fail_unless(is_ancestor_path(NULL, "/a/b/c/d") == false);

+   fail_unless(is_ancestor_path("/a/x/c", NULL) == false);

+   fail_unless(is_ancestor_path(NULL, NULL) == false);

+   fail_unless(is_ancestor_path("", "") == false);

+ }

+ END_TEST

+ 

+ 

+ Suite *path_utils_suite(void)

+ {

+     Suite *s = suite_create("path_utils");

+ 

+     TCase *tc_path_utils = tcase_create("path_utils");

+     TCase *tc_directory_list = tcase_create("path_utils_directory_list");

+ 

+     tcase_add_test(tc_path_utils, test_dirname);

+     tcase_add_test(tc_path_utils, test_dirname_neg);

+ 

+     tcase_add_test(tc_path_utils, test_basename);

+     tcase_add_test(tc_path_utils, test_basename_neg);

+ 

+     tcase_add_test(tc_path_utils, test_dirname_and_basename);

+     tcase_add_test(tc_path_utils, test_dirname_and_basename_neg);

+ 

+     tcase_add_test(tc_path_utils, test_is_absolute_path);

+ 

+     tcase_add_test(tc_path_utils, test_path_concat);

+     tcase_add_test(tc_path_utils, test_path_concat_neg);

+ 

+     tcase_add_test(tc_path_utils, test_split_path);

+     tcase_add_test(tc_path_utils, test_split_path_neg);

+ 

+     tcase_add_test(tc_path_utils, test_make_path_absolute);

+     tcase_add_test(tc_path_utils, test_make_path_absolute_neg);

+ 

+     tcase_add_test(tc_path_utils, test_normalize_path);

+     tcase_add_test(tc_path_utils, test_normalize_path_neg);

+ 

+     tcase_add_test(tc_path_utils, test_make_normalized_absolute_path);

+     tcase_add_test(tc_path_utils, test_make_normalized_absolute_path_neg);

+ 

+     tcase_add_test(tc_path_utils, test_common_path_prefix);

+     tcase_add_test(tc_path_utils, test_common_path_prefix_neg);

+ 

+     tcase_add_test(tc_path_utils, test_find_existing_directory_ancestor);

+     tcase_add_test(tc_path_utils, test_find_existing_directory_ancestor_neg);

+ 

+     tcase_add_test(tc_path_utils, test_is_ancestor_path);

+ 

+     tcase_add_checked_fixture(tc_directory_list,

+                               setup_directory_list,

+                               teardown_directory_list);

+     tcase_add_test(tc_directory_list, test_directory_list);

+     tcase_add_test(tc_directory_list, test_directory_list_neg);

+ 

+     suite_add_tcase(s, tc_path_utils);

+     suite_add_tcase(s, tc_directory_list);

+ 

+     return s;

+ }

+ 

+ int main(void)

+ {

+   int number_failed;

+ 

+   Suite *s = path_utils_suite();

+   SRunner *sr = srunner_create(s);

+   /* If CK_VERBOSITY is set, use that, otherwise it defaults to CK_NORMAL */

+   srunner_run_all(sr, CK_ENV);

+   number_failed = srunner_ntests_failed(sr);

+   srunner_free(sr);

+   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;

+ }

+ 

file modified
+20 -43
@@ -1,5 +1,7 @@

- %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_lib(1))")}

- %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_lib())")}

+ %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)

+ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

+ %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

+ %endif

  

  Name: @PACKAGE_NAME@

  Version: @PACKAGE_VERSION@
@@ -69,6 +71,7 @@

  BuildRequires: c-ares-devel

  BuildRequires: python-devel

  BuildRequires: check-devel

+ BuildRequires: doxygen

  

  %description

  Provides a set of daemons to manage access to remote directories and
@@ -205,6 +208,10 @@

  

  make %{?_smp_mflags}

  

+ pushd common

+ make %{?_smp_mflags} docs

+ popd

+ 

  %check

  make %{?_smp_mflags} check

  
@@ -230,6 +237,10 @@

  install -m400 src/config/etc/sssd.api.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.conf

  install -m400 src/config/etc/sssd.api.d/* $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.d/

  

+ # Copy default logrotate file

+ mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d

+ install -m644 src/examples/logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/sssd

+ 

  # Remove .la files created by libtool

  rm -f \

      $RPM_BUILD_ROOT/%{_lib}/libnss_sss.la \
@@ -244,6 +255,7 @@

      $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_proxy.la \

      $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_krb5.la \

      $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_ipa.la \

+     $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_simple.la \

      $RPM_BUILD_ROOT/%{_libdir}/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.la \

      $RPM_BUILD_ROOT/%{python_sitearch}/pysss.la

  
@@ -284,6 +296,7 @@

  %attr(750,root,root) %dir %{_var}/log/%{name}

  %attr(700,root,root) %dir %{_sysconfdir}/sssd

  %config(noreplace) %{_sysconfdir}/sssd/sssd.conf

+ %config(noreplace) %{_sysconfdir}/logrotate.d/sssd

  %config %{_sysconfdir}/sssd/sssd.api.conf

  %attr(700,root,root) %dir %{_sysconfdir}/sssd/sssd.api.d

  %config %{_sysconfdir}/sssd/sssd.api.d/
@@ -291,6 +304,7 @@

  %{_mandir}/man5/sssd-ipa.5*

  %{_mandir}/man5/sssd-krb5.5*

  %{_mandir}/man5/sssd-ldap.5*

+ %{_mandir}/man5/sssd-simple.5*

  %{_mandir}/man8/sssd.8*

  %{_mandir}/man8/sss_groupadd.8*

  %{_mandir}/man8/sss_groupdel.8*
@@ -355,7 +369,7 @@

  %{_includedir}/collection_stack.h

  %{_libdir}/libcollection.so

  %{_libdir}/pkgconfig/collection.pc

- %doc common/collection/README

+ %doc common/collection/doc/html/

  

  %files -n libini_config

  %defattr(-,root,root,-)
@@ -369,7 +383,7 @@

  %{_includedir}/ini_config.h

  %{_libdir}/libini_config.so

  %{_libdir}/pkgconfig/ini_config.pc

- %doc common/ini/README

+ %doc common/ini/doc/html/

  

  %files -n libref_array

  %defattr(-,root,root,-)
@@ -427,43 +441,6 @@

  %postun -n libref_array -p /sbin/ldconfig

  

  %changelog

- * Mon Sep 28 2009 Sumit Bose <sbose@redhat.com> - 0.6.0-0

- - New upstream release 0.6.0

- 

- * Fri Sep 25 2009 Simo Sorce <ssorce@redhat.com> - 0.5.0-1

- - Split package into server and clients components

- - Convert to new config file format

- 

- * Wed Sep 02 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.5.0-0

- - New upstream release 0.5.0

- 

- * Mon May 18 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.4.0-1

- - Convert build system to automake

- 

- * Mon Apr 20 2009 Jakub Hrozek <jhrozek@redhat.com> - 0.3.2-1

- - bugfix release 0.3.2

- 

- * Mon Apr 13 2009 Simo Sorce <ssorce@redhat.com> - 0.3.1-1

- - bugfix release

- 

- * Sun Apr 12 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.3.0-2

- - Remove InfoPipe from RPM build

- 

- * Sun Apr 12 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.3.0-1

- - Convert to using /etc/sssd/sssd.conf for configuration

- 

- * Tue Mar 10 2009 Simo Sorce <ssorce@redhat.com> - 0.2.1-1

- - Bump up to version 0.2.1

- 

- * Fri Mar 06 2009 Jakub Hrozek <jhrozek@redhat.com> - 0.1.0-4

- - fixed items found during review

- - added initscript

- 

- * Thu Mar 05 2009 Sumit Bose <sbose@redhat.com> - 0.1.0-3

- - added sss_client

- 

- * Mon Feb 23 2009 Jakub Hrozek <jhrozek@redhat.com> - 0.1.0-2

- - Small cleanup and fixes in the spec file

+ * Mon Mar 15 2010 Stephen Gallagher <sgallagh@redhat.com> - @PACKAGE_VERSION@-0@PRERELEASE_VERSION@

+ - Automated build of the SSSD

  

- * Thu Feb 12 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.1.0-1

- - Initial release (based on version 0.1.0 upstream code)

file modified
+40 -10
@@ -75,7 +75,8 @@

          fail_over-tests \

          find_uid-tests \

          auth-tests \

-         ipa_ldap_opt-tests

+         ipa_ldap_opt-tests \

+         simple_access-tests

  endif

  

  check_PROGRAMS = \
@@ -90,7 +91,8 @@

      libsss_ldap.la \

      libsss_krb5.la \

      libsss_proxy.la \

-     libsss_ipa.la

+     libsss_ipa.la \

+     libsss_simple.la

  

  ldblib_LTLIBRARIES = \

      memberof.la
@@ -244,7 +246,8 @@

  SSSD_TOOLS_OBJ = \

      tools/sss_sync_ops.c \

      tools/tools_util.c \

-     tools/files.c

+     tools/files.c \

+     tools/nscd.c

  

  SSSD_RESOLV_OBJ = \

      resolv/async_resolv.c
@@ -324,6 +327,7 @@

      providers/fail_over.h \

      providers/providers.h \

      providers/child_common.h \

+     providers/simple/simple_access.h \

      providers/krb5/krb5_auth.h \

      providers/krb5/krb5_common.h \

      providers/krb5/krb5_utils.h \
@@ -389,6 +393,7 @@

      examples/sssd.conf \

      examples/sssdproxytest \

      examples/sudo \

+     examples/logrotate \

      providers/sssd_be.exports \

      sss_client/COPYING \

      sss_client/COPYING.LESSER \
@@ -449,15 +454,15 @@

  #################

  # Feature Tests #

  #################

- if HAVE_CHECK

  noinst_LTLIBRARIES += \

      libsss_test_common.la

  

  libsss_test_common_la_SOURCES = \

      tests/common.c

- libsss_test_common_la_LIBADD = \

-     $(SSSD_LIBS) \

-     $(CHECK_LIBS)

+ 

+ if HAVE_CHECK

+ libsss_test_common_la_SOURCES += \

+     tests/common_check.c

  

  sysdb_tests_DEPENDENCIES = \

      $(ldblib_LTLIBRARIES)
@@ -626,14 +631,27 @@

      libsss_test_common.la

  

  ipa_ldap_opt_tests_SOURCES = \

+     providers/ipa/ipa_utils.c \

      tests/ipa_ldap_opt-tests.c

  ipa_ldap_opt_tests_CFLAGS = \

      $(AM_CFLAGS) \

      $(CHECK_CFLAGS)

  ipa_ldap_opt_tests_LDADD = \

      $(CHECK_LIBS) \

+     $(TALLOC_LIBS) \

      libsss_test_common.la

  

+ simple_access_tests_SOURCES = \

+     tests/simple_access-tests.c \

+     providers/simple/simple_access.c \

+     $(SSSD_UTIL_OBJ)

+ simple_access_tests_CFLAGS = \

+     $(AM_CFLAGS) \

+     $(CHECK_CFLAGS)

+ simple_access_tests_LDADD = \

+     $(SSSD_LIBS) \

+     $(CHECK_LIBS)

+ 

  endif

  

  stress_tests_SOURCES = \
@@ -720,6 +738,16 @@

      -version-info 1:0:0 \

      -module

  

+ libsss_simple_la_SOURCES = \

+     providers/simple/simple_access.c

+ libsss_simple_la_CFLAGS = \

+     $(AM_CFLAGS)

+ libsss_simple_la_LIBADD = \

+     $(PAM_LIBS)

+ libsss_simple_la_LDFLAGS = \

+     -version-info 1:0:0 \

+     -module

+ 

  libsss_krb5_la_SOURCES = \

      util/find_uid.c \

      providers/child_common.c \
@@ -743,6 +771,7 @@

      providers/child_common.c \

      providers/ipa/ipa_init.c \

      providers/ipa/ipa_common.c \

+     providers/ipa/ipa_utils.c \

      providers/ipa/ipa_auth.c \

      providers/ipa/ipa_access.c \

      providers/ipa/ipa_timerules.c \
@@ -859,8 +888,8 @@

  dist_man_MANS = man/sss_useradd.8 man/sss_userdel.8 man/sss_usermod.8 \

  		man/sss_groupadd.8 man/sss_groupdel.8 man/sss_groupmod.8 \

  		man/sssd.8 man/sssd.conf.5 man/sssd-ldap.5 man/sssd-krb5.5 \

- 		man/sssd-ipa.5 man/sssd_krb5_locator_plugin.8 \

- 		man/sss_groupshow.8 man/pam_sss.8

+ 		man/sssd-ipa.5 man/sssd-simple.5 \

+ 		man/sssd_krb5_locator_plugin.8 man/sss_groupshow.8 man/pam_sss.8

  

  SUFFIXES = .1.xml .1 .3.xml .3 .5.xml .5 .8.xml .8

  .1.xml.1:
@@ -900,7 +929,8 @@

      config/etc/sssd.api.d/sssd-krb5.conf \

      config/etc/sssd.api.d/sssd-ldap.conf \

      config/etc/sssd.api.d/sssd-local.conf \

-     config/etc/sssd.api.d/sssd-proxy.conf

+     config/etc/sssd.api.d/sssd-proxy.conf \

+     config/etc/sssd.api.d/sssd-simple.conf

  

  installsssddirs::

  	mkdir -p \

file modified
+14 -14
@@ -114,20 +114,6 @@

      AC_SUBST(initdir)

    ])

  

- AC_DEFUN([WITH_SHADOW_UTILS_PATH],

-   [ AC_ARG_WITH([shadow-utils-path],

-                 [AC_HELP_STRING([--with-shadow-utils-path=PATH],

-                                 [Where to look for shadow-utils binaries [/usr/sbin]]

-                                )

-                 ]

-                )

-     shadow_utils_path="${sbindir}"

-     if test x"$with_shadow_utils_path" != x; then

-         shadow_utils_path=$with_shadow_utils_path

-     fi

-     AC_SUBST(shadow_utils_path)

-   ])

- 

  AC_DEFUN([WITH_MANPAGES],

    [ AC_ARG_WITH([manpages],

                  [AC_HELP_STRING([--with-manpages],
@@ -217,3 +203,17 @@

      AC_DEFINE_UNQUOTED(TEST_DIR, "$with_test_dir", [Directory used for 'make check' temporary files])

    ])

  

+ AC_DEFUN([WITH_NSCD],

+   [ AC_ARG_WITH([nscd],

+                 [AC_HELP_STRING([--with-nscd],

+                                 [Whether to attempt to flush nscd cache after local domain operations [yes]]

+                                )

+                 ],

+                 [],

+                 with_nscd=yes

+                )

+     if test x"$with_nscd" == xyes; then

+         AC_DEFINE_UNQUOTED(HAVE_NSCD, 1, [flush nscd cache after local domain operations])

+     fi

+   ])

+ 

file modified
+1 -1
@@ -290,7 +290,7 @@

      if (ret != EOK) {

          DEBUG(1, ("Permission check on config file failed.\n"));

          talloc_zfree(tmp_ctx);

-         return EIO;

+         return EPERM;

      }

  

      /* Determine if the conf file has changed since we last updated

file modified
+8 -1
@@ -100,6 +100,7 @@

  

      # [provider/krb5/chpass]

      'krb5_changepw_principal' : _('The principal of the change password service'),

+     'krb5_kpasswd' : _('Server where the change password service is running if not on the KDC'),

  

      # [provider/ldap]

      'ldap_uri' : _('ldap_uri, The URI of the LDAP server'),
@@ -144,6 +145,10 @@

      # [provider/ldap/auth]

      'ldap_pwd_policy' : _('Policy to evaluate the password expiration'),

  

+     # [provider/simple/access]

+     'simple_allow_users' : _('Comma separated list of allowed users'),

+     'simple_deny_users' : _('Comma separated list of prohibited users'),

+ 

      # [provider/local/id]

      'default_shell' : _('Default shell, /bin/bash'),

      'base_directory' : _('Base for home directories'),
@@ -1188,10 +1193,12 @@

              outputfile = self.configfile

  

          # open() will raise IOError if it fails

+         old_umask = os.umask(0177)

          of = open(outputfile, "wb")

          output = self.dump(self.opts)

          of.write(output)

          of.close()

+         os.umask(old_umask)

  

      def list_services(self):

          """
@@ -1438,7 +1445,7 @@

  

          [domain.set_option(opt['name'], opt['value'])

           for opt in self.strip_comments_empty(self.options('domain/%s' % name))

-          if opt not in providers]

+          if (opt['name'], opt['value']) not in providers]

  

          # Determine if this domain is currently active

          domain.active = self.is_domain_active(name)

file modified
+97 -5
@@ -5,6 +5,8 @@

  @author: sgallagh

  '''

  import unittest

+ import os

+ from stat import *

  

  import SSSDConfig

  
@@ -119,7 +121,27 @@

          local_domain.set_active(True)

          sssdconfig.save_domain(local_domain)

  

-         sssdconfig.write('/tmp/testCreateNewLocalConfig.conf')

+         of = '/tmp/testCreateNewLocalConfig.conf'

+ 

+         #Ensure the output file doesn't exist

+         try:

+             os.unlink(of)

+         except:

+             pass

+ 

+         #Write out the file

+         sssdconfig.write(of)

+ 

+         #Verify that the output file has the correct permissions

+         mode = os.stat(of)[ST_MODE]

+ 

+         #Output files should not be readable or writable by

+         #non-owners, and should not be executable by anyone

+         self.assertFalse(S_IMODE(mode) & 0177)

+ 

+         #Remove the output file

+         os.unlink(of)

+ 

  

      def testCreateNewLDAPConfig(self):

          sssdconfig = SSSDConfig.SSSDConfig(srcdir + "/etc/sssd.api.conf",
@@ -133,7 +155,26 @@

          ldap_domain.set_active(True)

          sssdconfig.save_domain(ldap_domain)

  

-         sssdconfig.write('/tmp/testCreateNewLDAPConfig.conf')

+         of = '/tmp/testCreateNewLDAPConfig.conf'

+ 

+         #Ensure the output file doesn't exist

+         try:

+             os.unlink(of)

+         except:

+             pass

+ 

+         #Write out the file

+         sssdconfig.write(of)

+ 

+         #Verify that the output file has the correct permissions

+         mode = os.stat(of)[ST_MODE]

+ 

+         #Output files should not be readable or writable by

+         #non-owners, and should not be executable by anyone

+         self.assertFalse(S_IMODE(mode) & 0177)

+ 

+         #Remove the output file

+         os.unlink(of)

  

      def testModifyExistingConfig(self):

          sssdconfig = SSSDConfig.SSSDConfig(srcdir + "/etc/sssd.api.conf",
@@ -148,7 +189,26 @@

          ldap_domain.set_active(True)

          sssdconfig.save_domain(ldap_domain)

  

-         sssdconfig.write('/tmp/testModifyExistingConfig.conf')

+         of = '/tmp/testModifyExistingConfig.conf'

+ 

+         #Ensure the output file doesn't exist

+         try:

+             os.unlink(of)

+         except:

+             pass

+ 

+         #Write out the file

+         sssdconfig.write(of)

+ 

+         #Verify that the output file has the correct permissions

+         mode = os.stat(of)[ST_MODE]

+ 

+         #Output files should not be readable or writable by

+         #non-owners, and should not be executable by anyone

+         self.assertFalse(S_IMODE(mode) & 0177)

+ 

+         #Remove the output file

+         os.unlink(of)

  

      def testSpaces(self):

          sssdconfig = SSSDConfig.SSSDConfig(srcdir + "/etc/sssd.api.conf",
@@ -413,6 +473,8 @@

              'cache_credentials',

              'store_legacy_passwords',

              'use_fully_qualified_names',

+             'filter_users',

+             'filter_groups',

              'entry_cache_timeout',

              'lookup_family_order',

              'account_cache_expiration',
@@ -627,6 +689,7 @@

              'ldap': ['id', 'auth', 'chpass'],

              'krb5': ['auth', 'chpass'],

              'proxy': ['id', 'auth'],

+             'simple': ['access'],

              'permit': ['access'],

              'deny': ['access']}

  
@@ -674,7 +737,8 @@

  

          #Test looking up all provider values

          options = domain.list_provider_options('krb5')

-         control_list.extend(['krb5_changepw_principal'])

+         control_list.extend(['krb5_changepw_principal',

+                              'krb5_kpasswd'])

  

          self.assertTrue(type(options) == dict,

                          "Options should be a dictionary")
@@ -725,6 +789,8 @@

              'cache_credentials',

              'store_legacy_passwords',

              'use_fully_qualified_names',

+             'filter_users',

+             'filter_groups',

              'entry_cache_timeout',

              'account_cache_expiration',

              'lookup_family_order',
@@ -1257,7 +1323,12 @@

          self.assertTrue(isinstance(domain, SSSDConfig.SSSDDomain))

          self.assertTrue(domain.active)

  

+         domain = sssdconfig.get_domain('LDAP')

+         self.assertTrue(isinstance(domain, SSSDConfig.SSSDDomain))

+         self.assertFalse(domain.active)

+ 

          # TODO verify the contents of this domain

+         self.assertTrue(domain.get_option('ldap_id_use_start_tls'))

  

          # Negative Test - No such domain

          self.assertRaises(SSSDConfig.NoDomainError, sssdconfig.get_domain, 'nosuchdomain')
@@ -1406,7 +1477,28 @@

                           'cn=accounts, dc=example, dc=com')

  

          sssdconfig.save_domain(domain)

-         sssdconfig.write('/tmp/testSaveDomain.out')

+ 

+         of = '/tmp/testSaveDomain.out'

+ 

+         #Ensure the output file doesn't exist

+         try:

+             os.unlink(of)

+         except:

+             pass

+ 

+         #Write out the file

+         sssdconfig.write(of)

+ 

+         #Verify that the output file has the correct permissions

+         mode = os.stat(of)[ST_MODE]

+ 

+         #Output files should not be readable or writable by

+         #non-owners, and should not be executable by anyone

+         self.assertFalse(S_IMODE(mode) & 0177)

+ 

+         #Remove the output file

+         os.unlink(of)

+ 

  

          domain2 = sssdconfig.get_domain('example.com2')

          self.assertTrue(domain2.get_option('ldap_krb5_init_creds'))

@@ -56,6 +56,8 @@

  entry_cache_timeout = int, None, false

  lookup_family_order = str, None, false

  account_cache_expiration = int, None, false

+ filter_users = list, str, false

+ filter_groups = list, str, false

  

  # Special providers

  [provider/permit]

@@ -11,3 +11,4 @@

  

  [provider/krb5/chpass]

  krb5_changepw_principal = str, None, false

+ krb5_kpasswd = str, None, false

@@ -9,6 +9,7 @@

  ldap_opt_timeout = int, None, false

  ldap_offline_timeout = int, None, false

  ldap_tls_cacert = str, None, false

+ ldap_tls_cacertdir = str, None, false

  ldap_tls_reqcert = str, None, false

  ldap_sasl_mech = str, None, false

  ldap_sasl_authid = str, None, false

@@ -0,0 +1,5 @@

+ [provider/simple]

+ 

+ [provider/simple/access]

+ simple_allow_users = str, None, false

+ simple_deny_users = str, None, false

@@ -31,6 +31,7 @@

  debug_level = 0

  

  [domain/LDAP]

+ ldap_id_use_start_tls = true

  id_provider  =    ldap

  auth_provider=ldap

  debug_level = 0

file modified
+4
@@ -71,6 +71,7 @@

  WITH_KRB5_PLUGIN_PATH

  WITH_PYTHON_BINDINGS

  WITH_SELINUX

+ WITH_NSCD

  

  m4_include([external/platform.m4])

  m4_include([external/pkg.m4])
@@ -92,6 +93,7 @@

  m4_include([external/python.m4])

  m4_include([external/selinux.m4])

  m4_include([external/crypto.m4])

+ m4_include([external/nscd.m4])

  m4_include([util/signal.m4])

  

  PKG_CHECK_MODULES([DBUS],[dbus-1])
@@ -135,6 +137,8 @@

  PKG_CHECK_MODULES([CHECK], [check >= 0.9.5], [have_check=1], [have_check=])

  if test x$have_check = x; then

      AC_MSG_WARN([Without the 'CHECK' libraries, you will be unable to run all tests in the 'make check' suite])

+ else

+     AC_CHECK_HEADERS([check.h],,AC_MSG_ERROR([Could not find CHECK headers]))

  fi

  

  AC_PATH_PROG([DOXYGEN], [doxygen], [false])

@@ -0,0 +1,11 @@

+ /var/log/sssd/*.log {

+     weekly

+     missingok

+     notifempty

+     sharedscripts

+     rotate 2

+     compress

+     postrotate

+         /bin/kill -HUP `cat /var/run/sssd.pid  2>/dev/null`  2> /dev/null || true

+     endscript

+ }

@@ -0,0 +1,9 @@

+ AC_PATH_PROG(NSCD, nscd)

+ AC_MSG_CHECKING(for nscd)

+ if test -x "$NSCD"; then

+   AC_DEFINE_UNQUOTED([NSCD_PATH], "$NSCD", [The path to nscd, if available])

+   AC_MSG_RESULT(yes)

+ else

+   AC_MSG_RESULT(no. Manipulating nscd cache will not be available.)

+ fi

+ 

@@ -29,12 +29,18 @@

  #include <netdb.h>

  #include <sys/stat.h>

  #include <fcntl.h>

+ #include <ctype.h>

  

  #include <krb5/locate_plugin.h>

  

  #include "providers/krb5/krb5_common.h"

  

+ #define DEFAULT_KERBEROS_PORT 88

+ #define DEFAULT_KADMIN_PORT 749

+ #define DEFAULT_KPASSWD_PORT 464

+ 

  #define BUFSIZE 512

+ #define PORT_STR_SIZE 7

  #define SSSD_KRB5_LOCATOR_DEBUG "SSSD_KRB5_LOCATOR_DEBUG"

  #define DEBUG_KEY "[sssd_krb5_locator] "

  #define PLUGIN_DEBUG(body) do { \
@@ -45,7 +51,10 @@

  

  struct sssd_ctx {

      char *sssd_realm;

-     struct addrinfo *sssd_kdc_addrinfo;

+     char *kdc_addr;

+     uint16_t kdc_port;

+     char *kpasswd_addr;

+     uint16_t kpasswd_port;

      bool debug;

  };

  
@@ -69,31 +78,50 @@

      free(s);

  }

  

- static int get_kdcinfo(const char *realm, struct sssd_ctx *ctx)

+ static int get_krb5info(const char *realm, struct sssd_ctx *ctx,

+                         enum locate_service_type svc)

  {

      int ret;

-     char *kdcinfo_name = NULL;

+     char *krb5info_name = NULL;

      size_t len;

      uint8_t buf[BUFSIZE + 1];

      uint8_t *p;

      int fd = -1;

+     const char *name_tmpl = NULL;

+     char *port_str;

+     long port;

+     char *endptr;

+ 

+     switch (svc) {

+         case locate_service_kdc:

+             name_tmpl = KDCINFO_TMPL;

+             break;

+         case locate_service_kpasswd:

+             name_tmpl = KPASSWDINFO_TMPL;

+             break;

+         default:

+             PLUGIN_DEBUG(("Unsupported service [%d].\n", svc));

+             return EINVAL;

+     }

  

-     len = strlen(realm) + strlen(KDCINFO_TMPL);

  

-     kdcinfo_name = calloc(1, len + 1);

-     if (kdcinfo_name == NULL) {

+     len = strlen(realm) + strlen(name_tmpl);

+ 

+     krb5info_name = calloc(1, len + 1);

+     if (krb5info_name == NULL) {

          PLUGIN_DEBUG(("malloc failed.\n"));

          return ENOMEM;

      }

  

-     ret = snprintf(kdcinfo_name, len, KDCINFO_TMPL, realm);

+     ret = snprintf(krb5info_name, len, name_tmpl, realm);

      if (ret < 0) {

-         PLUGIN_DEBUG(("snprintf failed"));

+         PLUGIN_DEBUG(("snprintf failed.\n"));

          ret = EINVAL;

+         goto done;

      }

-     kdcinfo_name[len] = '\0';

+     krb5info_name[len] = '\0';

  

-     fd = open(kdcinfo_name, O_RDONLY);

+     fd = open(krb5info_name, O_RDONLY);

      if (fd == -1) {

          PLUGIN_DEBUG(("open failed [%d][%s].\n", errno, strerror(errno)));

          ret = errno;
@@ -117,33 +145,74 @@

      close(fd);

  

      if (len == 0) {

-         PLUGIN_DEBUG(("Content of kdcinfo file [%s] is [%d] or larger.\n",

-                       kdcinfo_name, BUFSIZE));

+         PLUGIN_DEBUG(("Content of krb5info file [%s] is [%d] or larger.\n",

+                       krb5info_name, BUFSIZE));

      }

-     PLUGIN_DEBUG(("Found kdcinfo [%s].\n", buf));

+     PLUGIN_DEBUG(("Found [%s] in [%s].\n", buf, krb5info_name));

  

-     ret = getaddrinfo((char *) buf, "kerberos", NULL, &ctx->sssd_kdc_addrinfo);

-     if (ret != 0) {

-         PLUGIN_DEBUG(("getaddrinfo failed [%d][%s].\n", ret,

-                                                         gai_strerror(ret)));

-         if (ret == EAI_SYSTEM) {

-             PLUGIN_DEBUG(("getaddrinfo failed [%d][%s].\n", errno,

-                                                             strerror(errno)));

+     port_str = strrchr((char *) buf, ':');

+     if (port_str == NULL) {

+         port = 0;

+     } else {

+         *port_str = '\0';

+         ++port_str;

+ 

+         if (isdigit(*port_str)) {

+             errno = 0;

+             port = strtol(port_str, &endptr, 10);

+             if (errno != 0) {

+                 ret = errno;

+                 PLUGIN_DEBUG(("strtol failed on [%s]: [%d][%s], "

+                             "assuming default.\n", port_str, ret, strerror(ret)));

+                 port = 0;

+             }

+             if (*endptr != '\0') {

+                 PLUGIN_DEBUG(("Found additional characters [%s] in port number "

+                             "[%s], assuming default.\n", endptr, port_str));

+                 port = 0;

+             }

+ 

+             if (port < 0 || port > 65535) {

+                 PLUGIN_DEBUG(("Illegal port number [%d], assuming default.\n",

+                             port));

+                 port = 0;

+             }

+         } else {

+             PLUGIN_DEBUG(("Illegal port number [%s], assuming default.\n",

+                         port_str));

+             port = 0;

          }

-         goto done;

      }

  

-     ctx->sssd_realm = strdup(realm);

-     if (ctx->sssd_realm == NULL) {

-         PLUGIN_DEBUG(("strdup failed.\n"));

-         ret = ENOMEM;

-         goto done;

+     switch (svc) {

+         case locate_service_kdc:

+             free(ctx->kdc_addr);

+             ctx->kdc_addr = strdup((char *) buf);

+             if (ctx->kdc_addr == NULL) {

+                 PLUGIN_DEBUG(("strdup failed.\n"));

+                 ret = ENOMEM;

+                 goto done;

+             }

+             ctx->kdc_port = (uint16_t) port;

+             break;

+         case locate_service_kpasswd:

+             free(ctx->kpasswd_addr);

+             ctx->kpasswd_addr = strdup((char *) buf);

+             if (ctx->kpasswd_addr == NULL) {

+                 PLUGIN_DEBUG(("strdup failed.\n"));

+                 ret = ENOMEM;

+                 goto done;

+             }

+             ctx->kpasswd_port = (uint16_t) port;

+             break;

+         default:

+             PLUGIN_DEBUG(("Unsupported service [%d].\n", svc));

+             ret = EINVAL;

+             goto done;

      }

  

- 

- 

  done:

-     free(kdcinfo_name);

+     free(krb5info_name);

      return ret;

  }

  
@@ -178,7 +247,8 @@

      ctx = (struct sssd_ctx *) private_data;

      PLUGIN_DEBUG(("sssd_krb5_locator_close called\n"));

  

-     freeaddrinfo(ctx->sssd_kdc_addrinfo);

+     free(ctx->kdc_addr);

+     free(ctx->kpasswd_addr);

      free(ctx->sssd_realm);

      free(ctx);

      private_data = NULL;
@@ -197,21 +267,39 @@

      int ret;

      struct addrinfo *ai;

      struct sssd_ctx *ctx;

-     char hostip[NI_MAXHOST];

+     struct addrinfo ai_hints;

+     uint16_t port = 0;

+     const char *addr = NULL;

+     char port_str[PORT_STR_SIZE];

  

      if (private_data == NULL) return KRB5_PLUGIN_NO_HANDLE;

      ctx = (struct sssd_ctx *) private_data;

  

      if (ctx->sssd_realm == NULL || strcmp(ctx->sssd_realm, realm) != 0) {

-         freeaddrinfo(ctx->sssd_kdc_addrinfo);

-         ctx->sssd_kdc_addrinfo = NULL;

          free(ctx->sssd_realm);

-         ctx->sssd_realm = NULL;

-         ret = get_kdcinfo(realm, ctx);

+         ctx->sssd_realm = strdup(realm);

+         if (ctx->sssd_realm == NULL) {

+             PLUGIN_DEBUG(("strdup failed.\n"));

+             return ENOMEM;

+         }

+ 

+         ret = get_krb5info(realm, ctx, locate_service_kdc);

          if (ret != EOK) {

-             PLUGIN_DEBUG(("get_kdcinfo failed.\n"));

+             PLUGIN_DEBUG(("get_krb5info failed.\n"));

              return KRB5_PLUGIN_NO_HANDLE;

          }

+ 

+         if (svc == locate_service_kadmin || svc == locate_service_kpasswd ||

+             svc == locate_service_master_kdc) {

+             ret = get_krb5info(realm, ctx, locate_service_kpasswd);

+             if (ret != EOK) {

+                 PLUGIN_DEBUG(("reading kpasswd address failed, "

+                               "using kdc address.\n"));

+                 free(ctx->kpasswd_addr);

+                 ctx->kpasswd_addr = strdup(ctx->kdc_addr);

+                 ctx->kpasswd_port = 0;

+             }

+         }

      }

  

      PLUGIN_DEBUG(("sssd_realm[%s] requested realm[%s] family[%d] socktype[%d] "
@@ -220,11 +308,22 @@

  

      switch (svc) {

          case locate_service_kdc:

+             addr = ctx->kdc_addr;

+             port = ctx->kdc_port ? ctx->kdc_port : DEFAULT_KERBEROS_PORT;

+             break;

          case locate_service_master_kdc:

+             addr = ctx->kpasswd_addr;

+             port = DEFAULT_KERBEROS_PORT;

+             break;

          case locate_service_kadmin:

+             addr = ctx->kpasswd_addr;

+             port = DEFAULT_KADMIN_PORT;

              break;

-         case locate_service_krb524:

          case locate_service_kpasswd:

+             addr = ctx->kpasswd_addr;

+             port = ctx->kpasswd_port ? ctx->kpasswd_port : DEFAULT_KPASSWD_PORT;

+             break;

+         case locate_service_krb524:

              return KRB5_PLUGIN_NO_HANDLE;

          default:

              return EINVAL;
@@ -250,32 +349,43 @@

      if (strcmp(realm, ctx->sssd_realm) != 0)

          return KRB5_PLUGIN_NO_HANDLE;

  

-     for (ai = ctx->sssd_kdc_addrinfo; ai != NULL; ai = ai->ai_next) {

-         ret = getnameinfo(ai->ai_addr, ai->ai_addrlen, hostip, NI_MAXHOST,

-                           NULL, 0, NI_NUMERICHOST);

-         if (ret != 0) {

-             PLUGIN_DEBUG(("getnameinfo failed [%d][%s].\n", ret,

-                           gai_strerror(ret)));

-             if (ret == EAI_SYSTEM) {

-                 PLUGIN_DEBUG(("getnameinfo failed [%d][%s].\n", errno,

-                               strerror(errno)));

-             }

+     memset(port_str, 0, PORT_STR_SIZE);

+     ret = snprintf(port_str, PORT_STR_SIZE-1, "%u", port);

+     if (ret < 0 || ret >= (PORT_STR_SIZE-1)) {

+         PLUGIN_DEBUG(("snprintf failed.\n"));

+         return EFAULT;

+     }

+ 

+     memset(&ai_hints, 0, sizeof(struct addrinfo));

+     ai_hints.ai_flags = AI_NUMERICHOST|AI_NUMERICSERV;

+     ai_hints.ai_socktype = socktype;

+ 

+     ret = getaddrinfo(addr, port_str, &ai_hints, &ai);

+     if (ret != 0) {

+         PLUGIN_DEBUG(("getaddrinfo failed [%d][%s].\n", ret,

+                                                         gai_strerror(ret)));

+         if (ret == EAI_SYSTEM) {

+             PLUGIN_DEBUG(("getaddrinfo failed [%d][%s].\n", errno,

+                                                             strerror(errno)));

          }

-         PLUGIN_DEBUG(("addr[%s] family[%d] socktype[%d] - ", hostip,

-                       ai->ai_family, ai->ai_socktype));

+         return EFAULT;

+     }

  

-         if ((family == AF_UNSPEC || ai->ai_family == family) &&

-             ai->ai_socktype == socktype) {

+     PLUGIN_DEBUG(("addr[%s:%s] family[%d] socktype[%d]\n", addr, port_str,

+                  ai->ai_family, ai->ai_socktype));

  

-             ret = cbfunc(cbdata, socktype, ai->ai_addr);

-             if (ret != 0) {

-                 PLUGIN_DEBUG(("\ncbfunc failed\n"));

-             } else {

-                 PLUGIN_DEBUG(("used\n"));

-             }

+     if ((family == AF_UNSPEC || ai->ai_family == family) &&

+         ai->ai_socktype == socktype) {

+ 

+         ret = cbfunc(cbdata, socktype, ai->ai_addr);

+         if (ret != 0) {

+             PLUGIN_DEBUG(("cbfunc failed\n"));

+             return ret;

          } else {

-             PLUGIN_DEBUG((" NOT used\n"));

+             PLUGIN_DEBUG(("[%s] used\n", addr));

          }

+     } else {

+         PLUGIN_DEBUG(("[%s] NOT used\n", addr));

      }

  

      return 0;

@@ -1876,6 +1876,11 @@

                      talloc_free(valdn);

                      continue;

                  }

+                 /* do not re-add the original deleted entry by mistake */

+                 if (ldb_dn_compare(valdn, del_ctx->first->entry_dn) == 0) {

+                     talloc_free(valdn);

+                     continue;

+                 }

                  new_list->dns = talloc_realloc(new_list,

                                                 new_list->dns,

                                                 struct ldb_dn *,

@@ -45,6 +45,8 @@

                  <listitem>

                      <para>

                          Also print indirect group members in a tree-like hierarchy.

+                         Note that this also affects printing parent groups - without

+                         <option>R</option>, only the direct parent will be printed.

                      </para>

                  </listitem>

              </varlistentry>

file modified
+33 -2
@@ -69,7 +69,9 @@

                              of the Kerberos servers to which SSSD should

                              connect in the order of preference. For more

                              information on failover and server redundancy,

-                             see the <quote>FAILOVER</quote> section.

+                             see the <quote>FAILOVER</quote> section. An optional

+                             port number (preceded by a colon) may be appended to

+                             the addresses or hostnames.

                          </para>

                      </listitem>

                  </varlistentry>
@@ -99,10 +101,39 @@

                  </varlistentry>

  

                  <varlistentry>

+                     <term>krb5_kpasswd (string)</term>

+                     <listitem>

+                         <para>

+                             If the change password service is not running on the

+                             KDC alternative servers can be defined here. An

+                             optional port number (preceded by a colon) may be

+                             appended to the addresses or hostnames.

+                         </para>

+                         <para>

+                             For more information on failover and server

+                             redundancy, see the <quote>FAILOVER</quote> section.

+                             Please note that even if there are no more kpasswd

+                             servers to try the back end is not switch to offline

+                             if authentication against the KDC is still possible.

+                         </para>

+                     </listitem>

+                 </varlistentry>

+ 

+                 <varlistentry>

                      <term>krb5_ccachedir (string)</term>

                      <listitem>

                          <para>

-                             Directory to store credential caches.

+                             Directory to store credential caches. All the

+                             substitution sequences of krb5_ccname_template can

+                             be used here, too, except %d and %P. If the

+                             directory does not exist it will be created. If %u,

+                             %U, %p or %h are used a private directory belonging

+                             to the user is created. Otherwise a public directory

+                             with restricted deletion flag (aka sticky bit, see

+                             <citerefentry>

+                                 <refentrytitle>chmod</refentrytitle>

+                                 <manvolnum>1</manvolnum>

+                             </citerefentry> for details) is created.

                          </para>

                          <para>

                              Default: /tmp

@@ -0,0 +1,124 @@

+ <?xml version="1.0" encoding="UTF-8"?>

+ <!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook V4.4//EN"

+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">

+ <reference>

+ <title>SSSD Manual pages</title>

+ <refentry>

+     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/upstream.xml" />

+ 

+     <refmeta>

+         <refentrytitle>sssd-simple</refentrytitle>

+         <manvolnum>5</manvolnum>

+         <refmiscinfo class="manual">File Formats and Conventions</refmiscinfo>

+     </refmeta>

+ 

+     <refnamediv id='name'>

+         <refname>sssd-simple</refname>

+         <refpurpose>the configuration file for SSSD's 'simple' access-control

+             provider</refpurpose>

+     </refnamediv>

+ 

+     <refsect1 id='description'>

+         <title>DESCRIPTION</title>

+         <para>

+             This manual page describes the configuration of the simple

+             access-control provider for

+             <citerefentry>

+                 <refentrytitle>sssd</refentrytitle>

+                 <manvolnum>8</manvolnum>

+             </citerefentry>.

+             For a detailed syntax reference, refer to the

+             <quote>FILE FORMAT</quote> section of the

+             <citerefentry>

+                 <refentrytitle>sssd.conf</refentrytitle>

+                 <manvolnum>5</manvolnum>

+             </citerefentry> manual page.

+         </para>

+         <para>

+             The simple access provider grants or denies access based on an

+             access or deny list of user names. Here to following rules apply:

+             <itemizedlist>

+                 <listitem>

+                     <para>If both lists are empty, access is granted</para>

+                 </listitem>

+                 <listitem>

+                     <para>If simple_allow_users is set, only users from this

+                         list are allowed access.</para>

+                     <para>This setting supersedes the simple_deny_users list

+                         (which would be redundant).</para>

+                 </listitem>

+                 <listitem>

+                     <para>If the simple_allow_users list is empty, users are

+                         allowed access unless they appear in the

+                         simple_deny_users list</para>

+                 </listitem>

+             </itemizedlist>

+         </para>

+     </refsect1>

+ 

+     <refsect1 id='file-format'>

+         <title>CONFIGURATION OPTIONS</title>

+         <para>Refer to the section <quote>DOMAIN SECTIONS</quote> of the

+             <citerefentry>

+                 <refentrytitle>sssd.conf</refentrytitle>

+                 <manvolnum>5</manvolnum>

+             </citerefentry> manual page for details on the configuration of an

+             SSSD domain.

+             <variablelist>

+                 <varlistentry>

+                     <term>simple_allow_users (string)</term>

+                     <listitem>

+                         <para>

+                             Comma separated list of users who are allowed to log

+                             in.

+                         </para>

+                     </listitem>

+                 </varlistentry>

+ 

+                 <varlistentry>

+                     <term>simple_deny_users (string)</term>

+                     <listitem>

+                         <para>

+                             Comma separated list of users who are rejected if

+                             simple_allow_users is not set.

+                         </para>

+                     </listitem>

+                 </varlistentry>

+             </variablelist>

+         </para>

+         <para>

+             Please note that it is an configuration error if both,

+             simple_allow_users and simple_deny_users, are defined.

+         </para>

+     </refsect1>

+ 

+     <refsect1 id='example'>

+         <title>EXAMPLE</title>

+         <para>

+             The following example assumes that SSSD is correctly

+             configured and example.com is one of the domains in the

+             <replaceable>[sssd]</replaceable> section. This examples shows only

+             the simple access provider-specific options.

+         </para>

+         <para>

+ <programlisting>

+     [domain/example.com]

+     access_provider = simple

+     simple_allow_users = user1, user2

+ </programlisting>

+         </para>

+     </refsect1>

+ 

+     <refsect1 id='see_also'>

+         <title>SEE ALSO</title>

+         <para>

+             <citerefentry>

+                 <refentrytitle>sssd.conf</refentrytitle><manvolnum>5</manvolnum>

+             </citerefentry>,

+             <citerefentry>

+                 <refentrytitle>sssd</refentrytitle><manvolnum>8</manvolnum>

+             </citerefentry>

+         </para>

+     </refsect1>

+ </refentry>

+ </reference>

file modified
+10 -1
@@ -305,7 +305,9 @@

                          <para>

                              Exclude certain users from being fetched from the sss

                              NSS database. This is particulary useful for system

-                             accounts.

+                             accounts. This option can also be set per-domain or

+                             include fully-qualified names to filter only users from

+                             the particular domain.

                          </para>

                          <para>

                              Default: root
@@ -563,6 +565,13 @@

                              <quote>deny</quote> always deny access.

                          </para>

                          <para>

+                             <quote>simple</quote> access control based on access

+                             or deny lists. See <citerefentry>

+                             <refentrytitle>sssd-simple</refentrytitle>

+                             <manvolnum>5</manvolnum></citerefentry> for more

+                             information on configuring the simple access module.

+                         </para>

+                         <para>

                              Default: <quote>permit</quote>

                          </para>

                      </listitem>

file modified
+69 -61
@@ -282,8 +282,10 @@

          return 0;

      }

  

-     /* always try to delist service */

-     DLIST_REMOVE(svc->mt_ctx->svc_list, svc);

+     /* try to delist service */

+     if (svc->mt_ctx) {

+         DLIST_REMOVE(svc->mt_ctx->svc_list, svc);

+     }

  

      /* svc is beeing freed, neutralize the spy */

      if (svc->conn_spy) {
@@ -302,6 +304,7 @@

      }

  

      /* svc->conn has been freed, NULL the pointer in svc */

+     spy->svc->conn_spy = NULL;

      spy->svc->conn = NULL;

      return 0;

  }
@@ -650,16 +653,16 @@

           */

          DEBUG(0, ("A reply callback was called but no reply was received"

                    " and no timeout occurred\n"));

- 

          /* Destroy this connection */

          sbus_disconnect(svc->conn);

-         goto done;

+         dbus_pending_call_unref(pending);

+         return;

      }

  

      /* TODO: Handle cases where the call has timed out or returned

       * with an error.

       */

- done:

+ 

      dbus_pending_call_unref(pending);

      dbus_message_unref(reply);

  }
@@ -687,9 +690,7 @@

  static int service_signal(struct mt_svc *svc, const char *svc_signal)

  {

      DBusMessage *msg;

-     dbus_bool_t dbret;

-     DBusConnection *dbus_conn;

-     DBusPendingCall *pending_reply;

+     int ret;

  

      if (svc->provider && strcasecmp(svc->provider, "local") == 0) {

          /* The local provider requires no signaling */
@@ -705,7 +706,6 @@

          return EIO;

      }

  

-     dbus_conn = sbus_get_connection(svc->conn);

      msg = dbus_message_new_method_call(NULL,

                                         MONITOR_PATH,

                                         MONITOR_INTERFACE,
@@ -717,21 +717,12 @@

          return ENOMEM;

      }

  

-     dbret = dbus_connection_send_with_reply(dbus_conn, msg, &pending_reply,

-                                             svc->mt_ctx->service_id_timeout);

-     if (!dbret || pending_reply == NULL) {

-         DEBUG(0, ("D-BUS send failed.\n"));

-         dbus_message_unref(msg);

-         monitor_kill_service(svc);

-         talloc_free(svc);

-         return EIO;

-     }

+     ret = sbus_conn_send(svc->conn, msg,

+                          svc->mt_ctx->service_id_timeout,

+                          reload_reply, svc, NULL);

  

-     /* Set up the reply handler */

-     dbus_pending_call_set_notify(pending_reply, reload_reply, svc, NULL);

      dbus_message_unref(msg);

- 

-     return EOK;

+     return ret;

  }

  

  static int service_signal_dns_reload(struct mt_svc *svc)
@@ -742,6 +733,10 @@

  {

      return service_signal(svc, MON_CLI_METHOD_OFFLINE);

  }

+ static int service_signal_rotate(struct mt_svc *svc)

+ {

+     return service_signal(svc, MON_CLI_METHOD_ROTATE);

+ }

  

  static int check_domain_ranges(struct sss_domain_info *domains)

  {
@@ -894,6 +889,8 @@

      }

      svc->mt_ctx = ctx;

  

+     talloc_set_destructor((TALLOC_CTX *)svc, svc_destructor);

+ 

      svc->name = talloc_strdup(svc, name);

      if (!svc->name) {

          talloc_free(svc);
@@ -1103,11 +1100,14 @@

                          void *private_data)

  {

      struct mt_ctx *ctx = talloc_get_type(private_data, struct mt_ctx);

+     struct mt_svc *cur_svc;

  

      DEBUG(1, ("Received SIGHUP.\n"));

-     /* Right now this function doesn't do anything.

-      * It will handle logrotate HUPs soon.

-      */

+ 

+     /* Signal all services to rotate debug files */

+     for(cur_svc = ctx->svc_list; cur_svc; cur_svc = cur_svc->next) {

+         service_signal_rotate(cur_svc);

+     }

  }

  

  static int monitor_cleanup(void)
@@ -1201,6 +1201,20 @@

      return ret;

  }

  

+ static int monitor_ctx_destructor(void *mem)

+ {

+     struct mt_ctx *mon = talloc_get_type(mem, struct mt_ctx);

+     struct mt_svc *svc;

+ 

+     /* zero out references in svcs so that they don't try

+      * to access the monitor context on process shutdown */

+ 

+     for (svc = mon->svc_list; svc; svc = svc->next) {

+         svc->mt_ctx = NULL;

+     }

+     return 0;

+ }

+ 

  static errno_t load_configuration(TALLOC_CTX *mem_ctx,

                                    const char *config_file,

                                    struct mt_ctx **monitor)
@@ -1213,6 +1227,7 @@

      if(!ctx) {

          return ENOMEM;

      }

+     talloc_set_destructor((TALLOC_CTX *)ctx, monitor_ctx_destructor);

  

      cdb_file = talloc_asprintf(ctx, "%s/%s", DB_PATH, CONFDB_FILE);

      if (cdb_file == NULL) {
@@ -1349,8 +1364,7 @@

  

      buf = talloc_size(tmp_ctx, event_size);

      if (!buf) {

-         talloc_free(tmp_ctx);

-         return;

+         goto done;

      }

  

      total_len = 0;
@@ -1359,8 +1373,7 @@

                     event_size-total_len);

          if (len == -1 && errno != EINTR) {

              DEBUG(0, ("Critical error reading inotify file descriptor.\n"));

-             talloc_free(tmp_ctx);

-             return;

+             goto done;

          }

          total_len += len;

      }
@@ -1373,23 +1386,19 @@

           */

          name = talloc_size(tmp_ctx, len);

          if (!name) {

-             talloc_free(tmp_ctx);

-             return;

+             goto done;

          }

          total_len = 0;

          while (total_len < in_event->len) {

              len = read(file_ctx->mt_ctx->inotify_fd, &name, in_event->len);

              if (len == -1 && errno != EINTR) {

                  DEBUG(0, ("Critical error reading inotify file descriptor.\n"));

-                 talloc_free(tmp_ctx);

-                 return;

+                 goto done;

              }

              total_len += len;

          }

      }

  

-     talloc_free(tmp_ctx);

- 

      for (cb = file_ctx->callbacks; cb; cb = cb->next) {

          if (cb->wd == in_event->wd) {

              break;
@@ -1397,7 +1406,7 @@

      }

      if (!cb) {

          DEBUG(0, ("Unknown watch descriptor\n"));

-         return;

+         goto done;

      }

  

      if (in_event->mask & IN_IGNORED) {
@@ -1418,7 +1427,7 @@

              DEBUG(0, ("Could not restore inotify watch. Quitting!\n"));

              close(file_ctx->mt_ctx->inotify_fd);

              kill(getpid(), SIGTERM);

-             return;

+             goto done;

          }

          rw_ctx->cb = cb;

          rw_ctx->file_ctx = file_ctx;
@@ -1429,12 +1438,15 @@

              close(file_ctx->mt_ctx->inotify_fd);

              kill(getpid(), SIGTERM);

          }

-         return;

+         goto done;

      }

  

      /* Tell the monitor to signal the children */

      cb->fn(file_ctx, cb->filename);

      file_ctx->needs_update = 0;

+ 

+ done:

+     talloc_free(tmp_ctx);

  }

  

  static void rewatch_config_file(struct tevent_context *ev,
@@ -1852,9 +1864,7 @@

  static int service_send_ping(struct mt_svc *svc)

  {

      DBusMessage *msg;

-     DBusPendingCall *pending_reply;

-     DBusConnection *dbus_conn;

-     dbus_bool_t dbret;

+     int ret;

  

      if (!svc->conn) {

          DEBUG(8, ("Service not yet initialized\n"));
@@ -1863,8 +1873,6 @@

  

      DEBUG(4,("Pinging %s\n", svc->name));

  

-     dbus_conn = sbus_get_connection(svc->conn);

- 

      /*

       * Set up identity request

       * This should be a well-known path and method
@@ -1880,24 +1888,11 @@

          return ENOMEM;

      }

  

-     dbret = dbus_connection_send_with_reply(dbus_conn, msg, &pending_reply,

-                                             svc->mt_ctx->service_id_timeout);

-     if (!dbret || pending_reply == NULL) {

-         /*

-          * Critical Failure

-          * We can't communicate on this connection

-          * We'll drop it using the default destructor.

-          */

-         DEBUG(0, ("D-BUS send failed.\n"));

-         talloc_zfree(svc->conn);

-         return EIO;

-     }

- 

-     /* Set up the reply handler */

-     dbus_pending_call_set_notify(pending_reply, ping_check, svc, NULL);

+     ret = sbus_conn_send(svc->conn, msg,

+                          svc->mt_ctx->service_id_timeout,

+                          ping_check, svc, NULL);

      dbus_message_unref(msg);

- 

-     return EOK;

+     return ret;

  }

  

  static void ping_check(DBusPendingCall *pending, void *data)
@@ -2250,13 +2245,26 @@

          }

      }

  

+     /* Warn if nscd seems to be running */

+     ret = check_file(NSCD_SOCKET_PATH, -1, -1, -1, CHECK_SOCK, NULL);

+     if (ret == EOK) {

+         DEBUG(0, ("WARNING: nscd appears to be running\n"));

+         ERROR("nscd socket was detected.  As nscd caching capabilities "

+               "may conflict with SSSD, it is recommended to not run "

+               "nscd in parallel with SSSD\n");

+     }

+ 

      /* Parse config file, fail if cannot be done */

      ret = load_configuration(tmp_ctx, config_file, &monitor);

      if (ret != EOK) {

-         if (ret == EIO) {

+         if (ret == EPERM) {

              DEBUG(1, ("Cannot read configuration file %s\n", config_file));

              ERROR("Cannot read config file %s, please check if permissions "

                    "are 0600 and the file is owned by root.root\n", config_file);

+         } else {

+             DEBUG(1, ("Error loading configuration database: [%d]: %s",

+                       ret, strerror(ret)));

+             ERROR("Cannot load configuration database\n");

          }

          return 4;

      }

file modified
+5
@@ -25,6 +25,11 @@

  #define RESOLV_CONF_PATH "/etc/resolv.conf"

  #define CONFIG_FILE_POLL_INTERVAL 5 /* seconds */

  

+ /* for detecting if NSCD is running */

+ #ifndef NSCD_SOCKET_PATH

+ #define NSCD_SOCKET_PATH "/var/run/nscd/socket"

+ #endif

+ 

  typedef int (*monitor_reconf_fn) (struct config_file_ctx *file_ctx,

                                    const char *filename);

  

@@ -41,6 +41,7 @@

  #define MON_CLI_METHOD_SHUTDOWN "shutDown"

  #define MON_CLI_METHOD_RES_INIT "resInit"

  #define MON_CLI_METHOD_OFFLINE "goOffline" /* Applicable only to providers */

+ #define MON_CLI_METHOD_ROTATE "rotateLogs"

  

  #define SSSD_SERVICE_PIPE "private/sbus-monitor"

  
@@ -51,4 +52,6 @@

                          struct sbus_connection *conn);

  int monitor_common_res_init(DBusMessage *message,

                              struct sbus_connection *conn);

+ int monitor_common_rotate_logs(DBusMessage *message,

+                                struct sbus_connection *conn);

  

file modified
+18 -21
@@ -109,12 +109,9 @@

  int monitor_common_send_id(struct sbus_connection *conn,

                             const char *name, uint16_t version)

  {

-     DBusPendingCall *pending_reply;

-     DBusConnection *dbus_conn;

      DBusMessage *msg;

      dbus_bool_t ret;

- 

-     dbus_conn = sbus_get_connection(conn);

+     int retval;

  

      /* create the message */

      msg = dbus_message_new_method_call(NULL,
@@ -137,24 +134,11 @@

          return EIO;

      }

  

-     ret = dbus_connection_send_with_reply(dbus_conn, msg, &pending_reply,

-                                           30000 /* TODO: set timeout */);

-     if (!ret || !pending_reply) {

-         /*

-          * Critical Failure

-          * We can't communicate on this connection

-          * We'll drop it using the default destructor.

-          */

-         DEBUG(0, ("D-BUS send failed.\n"));

-         dbus_message_unref(msg);

-         return EIO;

-     }

- 

-     /* Set up the reply handler */

-     dbus_pending_call_set_notify(pending_reply, id_callback, NULL, NULL);

+     retval = sbus_conn_send(conn, msg, 3000,

+                             id_callback,

+                             NULL, NULL);

      dbus_message_unref(msg);

- 

-     return EOK;

+     return retval;

  }

  

  int monitor_common_pong(DBusMessage *message,
@@ -193,3 +177,16 @@

      return monitor_common_pong(message, conn);

  }

  

+ int monitor_common_rotate_logs(DBusMessage *message,

+                                struct sbus_connection *conn)

+ {

+     int ret;

+ 

+     ret = rotate_debug_files();

+     if (ret) {

+         DEBUG(1, ("Could not rotate debug files!\n"));

+         return ret;

+     }

+ 

+     return monitor_common_pong(message, conn);

+ }

file modified
+3
@@ -7,4 +7,7 @@

  sv

  it

  fr

+ id

+ zh_TW

+ uk

  

file modified
+15 -8
@@ -1,16 +1,23 @@

  # List of source files which contain translatable strings.

  confdb/confdb_setup.c

  config/SSSDConfig.py

- tools/sss_groupdel.c

- tools/sss_groupmod.c

- tools/sss_userdel.c

- tools/tools_util.c

- tools/tools_util.h

- tools/sss_useradd.c

- tools/sss_groupadd.c

- tools/sss_usermod.c

+ monitor/monitor.c

+ providers/krb5/krb5_child.c

+ providers/ldap/ldap_child.c

+ providers/data_provider_be.c

  sss_client/common.c

  sss_client/group.c

  sss_client/pam_sss.c

  sss_client/pam_test_client.c

  sss_client/passwd.c

+ tools/sss_useradd.c

+ tools/sss_groupadd.c

+ tools/sss_groupdel.c

+ tools/sss_groupmod.c

+ tools/sss_groupshow.c

+ tools/sss_useradd.c

+ tools/sss_userdel.c

+ tools/sss_usermod.c

+ tools/tools_util.c

+ tools/tools_util.h

+ util/util.h

file modified
+311 -180
@@ -8,7 +8,7 @@

  msgstr ""

  "Project-Id-Version: SSS\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

  "PO-Revision-Date: 2009-12-09 11:13+0100\n"

  "Last-Translator: Fabian Affolter <fab@fedoraproject.org>\n"

  "Language-Team: German <fedora-trans-de@redhat.com>\n"
@@ -172,11 +172,11 @@

  msgid "IPA client hostname"

  msgstr "IPA-Client-Rechnername"

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr "Kerberos-Serveradresse"

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr "Kerberos Realm"

  
@@ -204,311 +204,277 @@

  msgid "The principal of the change password service"

  msgstr ""

  

- #: config/SSSDConfig.py:105

- msgid "ldap_uri, The URI of the LDAP server"

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

  msgstr ""

  

  #: config/SSSDConfig.py:106

- msgid "The default base DN"

+ msgid "ldap_uri, The URI of the LDAP server"

  msgstr ""

  

  #: config/SSSDConfig.py:107

- msgid "The Schema Type in use on the LDAP server, rfc2307"

+ msgid "The default base DN"

  msgstr ""

  

  #: config/SSSDConfig.py:108

- msgid "The default bind DN"

+ msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr ""

  

  #: config/SSSDConfig.py:109

- msgid "The type of the authentication token of the default bind DN"

+ msgid "The default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:110

- msgid "The authentication token of the default bind DN"

+ msgid "The type of the authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:111

- msgid "Length of time to attempt connection"

+ msgid "The authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:112

- msgid "Length of time to attempt synchronous LDAP operations"

+ msgid "Length of time to attempt connection"

  msgstr ""

  

  #: config/SSSDConfig.py:113

- msgid "Length of time between attempts to reconnect while offline"

+ msgid "Length of time to attempt synchronous LDAP operations"

  msgstr ""

  

  #: config/SSSDConfig.py:114

- msgid "file that contains CA certificates"

+ msgid "Length of time between attempts to reconnect while offline"

  msgstr ""

  

  #: config/SSSDConfig.py:115

- msgid "Require TLS certificate verification"

+ msgid "file that contains CA certificates"

  msgstr ""

  

  #: config/SSSDConfig.py:116

- msgid "Specify the sasl mechanism to use"

+ msgid "Require TLS certificate verification"

  msgstr ""

  

  #: config/SSSDConfig.py:117

+ msgid "Specify the sasl mechanism to use"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr ""

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr ""

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr ""

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr ""

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr ""

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr ""

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr ""

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr ""

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr "Benutzername-Attribut"

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr "UID-Attribut"

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr "GECOS-Attribut"

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr "Shell-Attribut"

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr "UUID-Attribut"

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr ""

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr "Vollständiger Name"

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr ""

  

- #: config/SSSDConfig.py:148

- msgid "Default shell, /bin/bash"

- msgstr ""

- 

  #: config/SSSDConfig.py:149

- msgid "Base for home directories"

+ msgid "Comma separated list of allowed users"

  msgstr ""

  

- #: config/SSSDConfig.py:152

- msgid "The name of the NSS library to use"

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

  msgstr ""

  

- #: config/SSSDConfig.py:155

- msgid "PAM stack to use"

+ #: config/SSSDConfig.py:153

+ msgid "Default shell, /bin/bash"

  msgstr ""

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

+ #: config/SSSDConfig.py:154

+ msgid "Base for home directories"

  msgstr ""

  

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

+ #: config/SSSDConfig.py:157

+ msgid "The name of the NSS library to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

+ #: config/SSSDConfig.py:160

+ msgid "PAM stack to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

- msgid "Error initializing the tools - no local domain\n"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

  msgstr ""

  

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

  msgstr ""

  

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

  msgstr ""

  

- #: tools/sss_groupdel.c:107

- #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

  msgstr ""

  

- #: tools/sss_groupdel.c:136

+ #: monitor/monitor.c:2252

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

- msgstr ""

- 

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

- msgstr ""

- 

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr ""

- 

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:130

+ #: monitor/monitor.c:2262

+ #, c-format

  msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

  msgstr ""

  

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

  msgstr ""

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ msgid "An open file descriptor for the debug logs"

  msgstr ""

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

  msgstr ""

  

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

  msgstr ""

  

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

  msgstr ""

  

- #: tools/sss_userdel.c:47

- msgid "Do not remove home directory and mail spool"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

  msgstr ""

  

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

  msgstr ""

  

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

  msgstr ""

  

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ msgid "Password change failed. "

  msgstr ""

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

  msgstr ""

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

  msgstr ""

  

- #: tools/sss_userdel.c:174

- #, c-format

- msgid "Cannot remove homedir: %s\n"

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

  msgstr ""

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

  msgstr ""

  

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

+ #: sss_client/pam_sss.c:1006

+ msgid "Current Password: "

  msgstr ""

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

  msgstr ""

  

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

  msgstr ""

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47
@@ -547,10 +513,39 @@

  msgid "Specify an alternative skeleton directory"

  msgstr ""

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr ""
@@ -564,6 +559,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr ""
@@ -598,10 +597,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr ""
@@ -614,6 +621,161 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr ""

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:954

+ #, fuzzy, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr "Gruppen"

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr ""

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr ""
@@ -656,46 +818,15 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr ""

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr ""

- 

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

- msgstr ""

- 

- #: sss_client/pam_sss.c:526

- msgid "Password change failed. "

- msgstr ""

- 

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:953

- msgid "Password: "

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:983

- msgid "Current Password: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

  msgstr ""

file modified
+373 -228
@@ -1,21 +1,23 @@

- # English translations for sss_daemon package.

- # Copyright (C) 2009 Red Hat, Inc.

- # This file is distributed under the same license as the sss_daemon package.

- # Automatically generated, 2009.

+ # Fedora Spanish translation of sssd.master.

+ # This file is distributed under the same license as the sssd.master package.

+ #

+ # Domingo Becker <domingobecker@gmail.com>, 2009, 2010.

+ # Héctor Daniel Cabrera <logan@fedoraproject.org>, 2010.

  #

  msgid ""

  msgstr ""

  "Project-Id-Version: sss_daemon 0.4.0\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

- "PO-Revision-Date: 2010-02-19 09:41-0300\n"

- "Last-Translator: Domingo Becker <domingobecker@gmail.com>\n"

- "Language-Team: Transifex Spanish\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

+ "PO-Revision-Date: 2010-03-15 11:40-0300\n"

+ "Last-Translator: Héctor Daniel Cabrera <logan@fedoraproject.org>\n"

+ "Language-Team: Fedora Spanish <trans-es@lists.fedoraproject.org>\n"

  "MIME-Version: 1.0\n"

  "Content-Type: text/plain; charset=UTF-8\n"

  "Content-Transfer-Encoding: 8bit\n"

  "Plural-Forms: nplurals=2; plural=(n != 1);\n"

  "X-Poedit-Language: Spanish\n"

+ "X-Poedit-Country: ARGENTINA\n"

  

  #: config/SSSDConfig.py:39

  msgid "Set the verbosity of the debug logging"
@@ -164,12 +166,12 @@

  msgid ""

  "Restrict or prefer a specific address family when performing DNS lookups"

  msgstr ""

+ "Restringir o preferir una familia de direcciones específica, cuando se "

+ "realicen búsquedas DNS"

  

  #: config/SSSDConfig.py:83

- #, fuzzy

  msgid "How long to keep cached entries after last successful login (days)"

- msgstr ""

- "Por cuánto tiempo permitir ingresos cacheados entre ingresos en línea (días)"

+ msgstr "Por cuánto tiempo permitir ingresos cacheados luego del último (días)"

  

  #: config/SSSDConfig.py:86

  msgid "IPA domain"
@@ -183,11 +185,11 @@

  msgid "IPA client hostname"

  msgstr "Nombre de equipo del cliente IPA"

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr "Dirección del servidor Kerberos"

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr "Reinado Kerberos"

  
@@ -215,324 +217,285 @@

  msgid "The principal of the change password service"

  msgstr "El principal del servicio de cambio de contraseña"

  

- #: config/SSSDConfig.py:105

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

+ msgstr ""

+ "El servidor en donde está ejecutándose el servicio de modificación de "

+ "contraseña, en caso de no ser KDC. "

+ 

+ #: config/SSSDConfig.py:106

  msgid "ldap_uri, The URI of the LDAP server"

  msgstr "ldap_uri, El URI del servidor LDAP"

  

- #: config/SSSDConfig.py:106

+ #: config/SSSDConfig.py:107

  msgid "The default base DN"

  msgstr "DN base predeterminado"

  

- #: config/SSSDConfig.py:107

+ #: config/SSSDConfig.py:108

  msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr "El Tipo de Esquema a usar en el servidor LDAP, rfc2307"

  

- #: config/SSSDConfig.py:108

+ #: config/SSSDConfig.py:109

  msgid "The default bind DN"

  msgstr "El DN Bind predeterminado"

  

- #: config/SSSDConfig.py:109

+ #: config/SSSDConfig.py:110

  msgid "The type of the authentication token of the default bind DN"

  msgstr "El tipo del token de autenticación del DN bind predeterminado"

  

- #: config/SSSDConfig.py:110

+ #: config/SSSDConfig.py:111

  msgid "The authentication token of the default bind DN"

  msgstr "El token de autenticación del DN bind predeterminado"

  

- #: config/SSSDConfig.py:111

+ #: config/SSSDConfig.py:112

  msgid "Length of time to attempt connection"

  msgstr "Tiempo durante el que se intentará la conexión"

  

- #: config/SSSDConfig.py:112

+ #: config/SSSDConfig.py:113

  msgid "Length of time to attempt synchronous LDAP operations"

  msgstr "Tiempo durante el que se intentará operaciones LDAP sincrónicas"

  

- #: config/SSSDConfig.py:113

+ #: config/SSSDConfig.py:114

  msgid "Length of time between attempts to reconnect while offline"

  msgstr "Tiempo entre intentos de reconexión cuando esté fuera de línea"

  

- #: config/SSSDConfig.py:114

+ #: config/SSSDConfig.py:115

  msgid "file that contains CA certificates"

  msgstr "archivo que contiene los certificados CA"

  

- #: config/SSSDConfig.py:115

+ #: config/SSSDConfig.py:116

  msgid "Require TLS certificate verification"

  msgstr "Requiere la verificación de certificado TLS"

  

- #: config/SSSDConfig.py:116

+ #: config/SSSDConfig.py:117

  msgid "Specify the sasl mechanism to use"

  msgstr "Especificar el mecanismo sasl a usar"

  

- #: config/SSSDConfig.py:117

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr "Especifique el id de autorización sasl a usar"

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr "Tabla de clave del servicio Kerberos"

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr "Usar auth Kerberos para la conexión LDAP"

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr "Seguir referencias LDAP"

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr "Tiempo máximo a esperar un pedido de búsqueda"

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr "Tiempo en segundos entre las actualizaciones de enumeración"

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr "Requiere TLS para búsquedas de ID, falso"

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr "DN base para búsquedas de usuario"

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr "Ambito de las búsquedas del usuario"

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr "Filtro para las búsquedas del usuario"

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr "Objectclass para los usuarios"

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr "Atributo Username"

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr "Atributo UID"

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr "Atributo GID primario"

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr "Atributo GECOS"

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr "Atributo Directorio de inicio"

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr "Atributo shell"

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr "Atributo UUID"

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr "Atributo principal del usuario (para Kerberos) "

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr "Nombre completo"

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr "Atributo memberOf"

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr "Atributo hora de modificación"

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr "Política para evaluar el vencimiento de la contraseña"

  

- #: config/SSSDConfig.py:148

+ #: config/SSSDConfig.py:149

+ msgid "Comma separated list of allowed users"

+ msgstr "Lista separada por comas de usuarios autorizados"

+ 

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

+ msgstr "Lista separada por comas de usuarios prohibidos"

+ 

+ #: config/SSSDConfig.py:153

  msgid "Default shell, /bin/bash"

  msgstr "Shell predeterminado, /bin/bash"

  

- #: config/SSSDConfig.py:149

+ #: config/SSSDConfig.py:154

  msgid "Base for home directories"

  msgstr "Base de los directorios de inicio"

  

- #: config/SSSDConfig.py:152

+ #: config/SSSDConfig.py:157

  msgid "The name of the NSS library to use"

  msgstr "Nombre de la biblioteca NSS a usar"

  

- #: config/SSSDConfig.py:155

+ #: config/SSSDConfig.py:160

  msgid "PAM stack to use"

  msgstr "Pila PAM a usar"

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

- msgstr "Nivel de depuración en que se debe ejecutar"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

+ msgstr "Convertirse en demonio (predeterminado)"

  

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

- msgstr "Error al poner la región\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

+ msgstr "Ejecutarse en forma interactiva (no un demonio)"

  

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

- msgstr "Especifique el grupo a borrar\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

+ msgstr "Indicar un archivo de configuración diferente al predeterminado"

  

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

- msgid "Error initializing the tools - no local domain\n"

- msgstr "Error al inicializar las herramientas -  no hay dominio local\n"

- 

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

- msgstr "Error al inicializar las herramientas\n"

- 

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

- msgstr "Dominio inválido especificado en FQDN\n"

- 

- #: tools/sss_groupdel.c:107

- #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

- msgstr "El grupo %s está fuera del rango de ID definido para los dominios\n"

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

+ msgstr "sssd debe ejecutarse como root\n"

  

- #: tools/sss_groupdel.c:136

+ #: monitor/monitor.c:2252

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

  msgstr ""

- "No existe tal grupo en el dominio local. Eliminando los grupos que sólo se "

- "permiten en el dominio local.\n"

- 

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr "Error interno. No se pudo eliminar el grupo.\n"

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

- msgstr "Grupos a los que se debe agregar este grupo"

+ "Ha sido detectado un socket nscd. Debido a que las capacidades de cacheo de "

+ "nscd pueden entrar en conflicto con SSSD, se recomienda no ejecutar nscd en "

+ "forma paralalea con SSSD\n"

  

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

- msgstr "Grupos desde los que se debe eliminar este grupo"

- 

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr "El GID del grupo"

- 

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

- msgstr "Especifique el grupo a modificar\n"

- 

- #: tools/sss_groupmod.c:130

+ #: monitor/monitor.c:2262

+ #, c-format

  msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

- "No se pudo encontrar el grupo en el dominio local, la modificación de grupos "

- "se permite sólo en el dominio local\n"

+ "No es posible leer el archivo de configuración %s, por favor verifique que "

+ "los permisos sean 0600, y que su deueño sea root.root\n"

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

- msgstr "Error interno al analizar sintácticamente los parámetros.\n"

- 

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

  msgstr ""

- "Los grupos miembro deben estar en el mismo dominio que el grupo padre\n"

  

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

- msgstr ""

- "No se pudo encontrar el grupo %s en el dominio local, solo se permiten los "

- "grupos del dominio local\n"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

+ msgstr "Nive de depuración"

  

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

- msgstr "El GID elegido está fuera del rango permitido\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

+ msgstr "Agregar marcas de tiempo de depuración"

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

- msgstr ""

- "No se pudo modificar el grupo - verifique si los nombre de grupo miembro son "

- "los correctos\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ msgid "An open file descriptor for the debug logs"

+ msgstr "Un arhivo abierto de descriptor para los registros de depuración"

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

- msgstr ""

- "No se pudo modificar el grupo - verifique si el nombre de grupo es correcto\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

+ msgstr "Dominio del proveedor de información (obligatorio)"

  

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

- msgstr "Error de transacción. No se pudo modificar el grupo.\n"

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "Las contraseñas no coinciden"

  

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

- msgstr "Eliminar el directorio de inicio y el receptor de correo"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

+ msgstr "Autenticación fuera de línea."

  

- #: tools/sss_userdel.c:47

- msgid "Do not remove home directory and mail spool"

- msgstr "No eliminar el directorio de inicio y el receptor de correo"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

+ msgstr ", su contraseña cacheada vencerá el:"

  

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

- msgstr "Forzar la eliminación de los archivos que no pertenecen al usuario"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

+ msgstr "Autenticación fuera de línea, la autenticación se deniega hasta:"

  

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

- msgstr "Especifique el usuario a borrar\n"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

+ msgstr "El sistema está fuera de línea, no se puede cambiar la contraseña"

  

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

- msgstr "No se pudieron establecer los valores predeterminados\n"

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ msgid "Password change failed. "

+ msgstr "Falló el cambio de contraseña."

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

- msgstr "El usuario %s está fuera del rango de ID para el dominio\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

+ msgstr "Mensaje del servidor:"

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

- msgstr "No eliminando el directorio de inicio - no pertenece al usuario\n"

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "Nueva contraseña: "

  

- #: tools/sss_userdel.c:174

- #, c-format

- msgid "Cannot remove homedir: %s\n"

- msgstr " Imposible eliminar el directorio de inicio: %s\n"

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "Reingrese la contraseña nueva:"

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

- msgstr ""

- "No existe ese usuario en el dominio local. La eliminación de usuarios se "

- "permite en el dominio local.\n"

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "Contraseña: "

  

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

- msgstr "Error interno. No se pudo eliminar el usuario.\n"

+ #: sss_client/pam_sss.c:1006

+ msgid "Current Password: "

+ msgstr "Contraseña actual: "

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

- msgstr "Falta memoria\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

+ msgstr "La contraseña ha expirado. Modifíquela en este preciso momento."

  

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

- msgstr "%s se debe ejecutar como root\n"

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

+ msgstr "Nivel de depuración en que se debe ejecutar"

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47

  msgid "The UID of the user"
@@ -571,10 +534,39 @@

  msgid "Specify an alternative skeleton directory"

  msgstr "Debe especificar un directorio esqueleto alternativo"

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr "Error al poner la región\n"

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr "Especifique el usuario a agregar\n"

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr "Error al inicializar las herramientas -  no hay dominio local\n"

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr "Error al inicializar las herramientas\n"

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr "Dominio inválido especificado en FQDN\n"

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr "Error interno al analizar sintácticamente los parámetros.\n"

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr "Los grupos deben estar en el mismo dominio que el usuario\n"
@@ -588,6 +580,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr "No se pudo obtener la información del grupo del usuario\n"

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr "No se pudieron establecer los valores predeterminados\n"

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr "El UID seleccionado está fuera del rango permitido\n"
@@ -624,10 +620,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr "Error en la transacción. No se pudo agregar el usuario.\n"

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr "El GID del grupo"

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr "Especifique el grupo a agregar\n"

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr "El GID elegido está fuera del rango permitido\n"

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr "No se pudo asignar el ID para el grupo - ¿el dominio estará lleno?\n"
@@ -640,6 +644,179 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr "Error en la transacción. No se pudo agregar el grupo.\n"

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr "Especifique el grupo a borrar\n"

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr "El grupo %s está fuera del rango de ID definido para los dominios\n"

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "No existe tal grupo en el dominio local. Eliminando los grupos que sólo se "

+ "permiten en el dominio local.\n"

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr "Error interno. No se pudo eliminar el grupo.\n"

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr "Grupos a los que se debe agregar este grupo"

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr "Grupos desde los que se debe eliminar este grupo"

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr "Especifique el grupo a modificar\n"

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ "No se pudo encontrar el grupo en el dominio local, la modificación de grupos "

+ "se permite sólo en el dominio local\n"

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr ""

+ "Los grupos miembro deben estar en el mismo dominio que el grupo padre\n"

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ "No se pudo encontrar el grupo %s en el dominio local, solo se permiten los "

+ "grupos del dominio local\n"

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ "No se pudo modificar el grupo - verifique si los nombre de grupo miembro son "

+ "los correctos\n"

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ "No se pudo modificar el grupo - verifique si el nombre de grupo es correcto\n"

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr "Error de transacción. No se pudo modificar el grupo.\n"

+ 

+ #: tools/sss_groupshow.c:954

+ #, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr "%s%sGrupo: %s\n"

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr "Magia privada"

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr "%sGID número: %d\n"

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr "%sMember usuarios: "

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ "\n"

+ "%sEs miembro de: "

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ "\n"

+ "%sGrupos de miembro: "

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr "Imprime miembros de grupo indirecto en forma recursiva"

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr "Especifica el grupo a mostrar\n"

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr "No es posible iniciar la búsqueda\n"

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "No existe tal grupo en el dominio local. Imprimir los grupos está permitido "

+ "únicamente en el dominio local.\n"

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr "Error interno. No se pudo imprimir el grupo.\n"

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr "Eliminar el directorio de inicio y el receptor de correo"

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr "No eliminar el directorio de inicio y el receptor de correo"

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr "Forzar la eliminación de los archivos que no pertenecen al usuario"

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr "Especifique el usuario a borrar\n"

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr "El usuario %s está fuera del rango de ID para el dominio\n"

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr "No eliminando el directorio de inicio - no pertenece al usuario\n"

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr " Imposible eliminar el directorio de inicio: %s\n"

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ "No existe ese usuario en el dominio local. La eliminación de usuarios se "

+ "permite en el dominio local.\n"

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr "Error interno. No se pudo eliminar el usuario.\n"

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr "El GID del Usuario"
@@ -687,50 +864,18 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr "Error de transacción. No se pudo modificar el usuario.\n"

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr "Las contraseñas no coinciden"

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr "Autenticación fuera de línea."

- 

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ", su contraseña cacheada vencerá el:"

- 

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

- msgstr "Autenticación fuera de línea, la autenticación se deniega hasta:"

- 

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

- msgstr "El sistema está fuera de línea, no se puede cambiar la contraseña"

- 

- #: sss_client/pam_sss.c:526

- msgid "Password change failed. "

- msgstr "Falló el cambio de contraseña."

- 

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

- msgstr "Mensaje del servidor:"

- 

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr "Nueva contraseña: "

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

- msgstr "Reingrese la contraseña nueva:"

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

+ msgstr "Falta memoria\n"

  

- #: sss_client/pam_sss.c:953

- msgid "Password: "

- msgstr "Contraseña: "

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

+ msgstr "%s se debe ejecutar como root\n"

  

- #: sss_client/pam_sss.c:983

- #, fuzzy

- msgid "Current Password: "

- msgstr "Nueva contraseña: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

+ msgstr "Envia el resultado de la depuración hacia archivos en lugar de stderr"

  

  #~ msgid "Password has expired."

  #~ msgstr "La contraseña ha expirado."

file modified
+319 -188
@@ -7,7 +7,7 @@

  msgstr ""

  "Project-Id-Version: fr\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

  "PO-Revision-Date: 2009-11-17 21:05+0100\n"

  "Last-Translator: Pablo Martin-Gomez <pablo.martin-gomez@laposte.net>\n"

  "Language-Team: Français <fedora-trans-fr@redhat.com>\n"
@@ -171,11 +171,11 @@

  msgid "IPA client hostname"

  msgstr ""

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr ""

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr ""

  
@@ -203,311 +203,279 @@

  msgid "The principal of the change password service"

  msgstr ""

  

- #: config/SSSDConfig.py:105

- msgid "ldap_uri, The URI of the LDAP server"

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

  msgstr ""

  

  #: config/SSSDConfig.py:106

- msgid "The default base DN"

+ msgid "ldap_uri, The URI of the LDAP server"

  msgstr ""

  

  #: config/SSSDConfig.py:107

- msgid "The Schema Type in use on the LDAP server, rfc2307"

+ msgid "The default base DN"

  msgstr ""

  

  #: config/SSSDConfig.py:108

- msgid "The default bind DN"

+ msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr ""

  

  #: config/SSSDConfig.py:109

- msgid "The type of the authentication token of the default bind DN"

+ msgid "The default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:110

- msgid "The authentication token of the default bind DN"

+ msgid "The type of the authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:111

- msgid "Length of time to attempt connection"

+ msgid "The authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:112

- msgid "Length of time to attempt synchronous LDAP operations"

+ msgid "Length of time to attempt connection"

  msgstr ""

  

  #: config/SSSDConfig.py:113

- msgid "Length of time between attempts to reconnect while offline"

+ msgid "Length of time to attempt synchronous LDAP operations"

  msgstr ""

  

  #: config/SSSDConfig.py:114

- msgid "file that contains CA certificates"

+ msgid "Length of time between attempts to reconnect while offline"

  msgstr ""

  

  #: config/SSSDConfig.py:115

- msgid "Require TLS certificate verification"

+ msgid "file that contains CA certificates"

  msgstr ""

  

  #: config/SSSDConfig.py:116

- msgid "Specify the sasl mechanism to use"

+ msgid "Require TLS certificate verification"

  msgstr ""

  

  #: config/SSSDConfig.py:117

+ msgid "Specify the sasl mechanism to use"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr ""

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr ""

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr ""

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr ""

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr ""

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr ""

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr ""

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr ""

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr ""

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr ""

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr ""

  

- #: config/SSSDConfig.py:148

- msgid "Default shell, /bin/bash"

- msgstr ""

- 

  #: config/SSSDConfig.py:149

- msgid "Base for home directories"

+ msgid "Comma separated list of allowed users"

  msgstr ""

  

- #: config/SSSDConfig.py:152

- msgid "The name of the NSS library to use"

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

  msgstr ""

  

- #: config/SSSDConfig.py:155

- msgid "PAM stack to use"

+ #: config/SSSDConfig.py:153

+ msgid "Default shell, /bin/bash"

  msgstr ""

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

+ #: config/SSSDConfig.py:154

+ msgid "Base for home directories"

  msgstr ""

  

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

+ #: config/SSSDConfig.py:157

+ msgid "The name of the NSS library to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

+ #: config/SSSDConfig.py:160

+ msgid "PAM stack to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

- msgid "Error initializing the tools - no local domain\n"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

  msgstr ""

  

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

  msgstr ""

  

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

  msgstr ""

  

- #: tools/sss_groupdel.c:107

- #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

  msgstr ""

  

- #: tools/sss_groupdel.c:136

+ #: monitor/monitor.c:2252

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

- msgstr ""

- 

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

- msgstr ""

- 

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

- msgstr ""

- 

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr ""

- 

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:130

+ #: monitor/monitor.c:2262

+ #, c-format

  msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

  msgstr ""

  

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

  msgstr ""

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ msgid "An open file descriptor for the debug logs"

  msgstr ""

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

  msgstr ""

  

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

- msgstr ""

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "Les mots de passe ne correspondent pas"

  

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

  msgstr ""

  

- #: tools/sss_userdel.c:47

- msgid "Do not remove home directory and mail spool"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

  msgstr ""

  

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

  msgstr ""

  

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

  msgstr ""

  

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

- msgstr ""

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ #, fuzzy

+ msgid "Password change failed. "

+ msgstr "Le mot de passe a expiré."

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

  msgstr ""

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

- msgstr ""

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "Nouveau mot de passe : "

  

- #: tools/sss_userdel.c:174

- #, c-format

- msgid "Cannot remove homedir: %s\n"

- msgstr ""

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "Retaper le nouveau mot de passe : "

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

- msgstr ""

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "Mot de passe : "

  

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

- msgstr ""

+ #: sss_client/pam_sss.c:1006

+ #, fuzzy

+ msgid "Current Password: "

+ msgstr "Nouveau mot de passe : "

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

  msgstr ""

  

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

  msgstr ""

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47
@@ -546,10 +514,39 @@

  msgid "Specify an alternative skeleton directory"

  msgstr ""

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr ""
@@ -563,6 +560,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr ""
@@ -597,10 +598,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr ""
@@ -613,6 +622,161 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr ""

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:954

+ #, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr ""

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr ""
@@ -655,51 +819,18 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr "Les mots de passe ne correspondent pas"

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr ""

- 

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:526

- #, fuzzy

- msgid "Password change failed. "

- msgstr "Le mot de passe a expiré."

- 

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

  msgstr ""

  

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr "Nouveau mot de passe : "

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

- msgstr "Retaper le nouveau mot de passe : "

- 

- #: sss_client/pam_sss.c:953

- msgid "Password: "

- msgstr "Mot de passe : "

- 

- #: sss_client/pam_sss.c:983

- #, fuzzy

- msgid "Current Password: "

- msgstr "Nouveau mot de passe : "

- 

  #~ msgid "Password has expired."

  #~ msgstr "Le mot de passe a expiré."

file added
+858
@@ -0,0 +1,858 @@

+ # Indonesian Translation of SSSD.

+ # Copyright (C) YEAR Red Hat, Inc.

+ # This file is distributed under the same license as the sssd package.

+ # Teguh DC <dheche@songolimo.net>, 2010.

+ msgid ""

+ msgstr ""

+ "Project-Id-Version: sssd\n"

+ "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

+ "PO-Revision-Date: 2010-03-09 10:34+0700\n"

+ "Last-Translator: Teguh DC <dheche@songolimo.net>\n"

+ "Language-Team: Fedora Indonesia <trans-id@lists.fedoraproject.org>\n"

+ "MIME-Version: 1.0\n"

+ "Content-Type: text/plain; charset=UTF-8\n"

+ "Content-Transfer-Encoding: 8bit\n"

+ "Language: id\n"

+ "Plural-Forms: nplurals=1; plural=0;\n"

+ "X-Generator: Virtaal 0.5.1\n"

+ 

+ #: config/SSSDConfig.py:39

+ msgid "Set the verbosity of the debug logging"

+ msgstr "Mengatur verbosity dari pencatatan debug"

+ 

+ #: config/SSSDConfig.py:40

+ msgid "Include timestamps in debug logs"

+ msgstr "Sertakan cap waktu di pencatatan debug"

+ 

+ #: config/SSSDConfig.py:41

+ msgid "Write debug messages to logfiles"

+ msgstr "Menulis pesan debug ke berkas log"

+ 

+ #: config/SSSDConfig.py:42

+ msgid "Ping timeout before restarting service"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:43

+ msgid "Command to start service"

+ msgstr "Perintah untuk memulai layanan"

+ 

+ #: config/SSSDConfig.py:44

+ msgid "Number of times to attempt connection to Data Providers"

+ msgstr "Jumlah usaha yang dilakukan untuk mencoba koneksi ke Penyedia Data"

+ 

+ #: config/SSSDConfig.py:47

+ msgid "SSSD Services to start"

+ msgstr "Layanan SSSD akan dijalankan"

+ 

+ #: config/SSSDConfig.py:48

+ msgid "SSSD Domains to start"

+ msgstr "Domain SSSD akan dijalankan"

+ 

+ #: config/SSSDConfig.py:49

+ msgid "Timeout for messages sent over the SBUS"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:50

+ msgid "Regex to parse username and domain"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:51

+ msgid "Printf-compatible format for displaying fully-qualified names"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:54

+ msgid "Enumeration cache timeout length (seconds)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:55

+ msgid "Entry cache background update timeout length (seconds)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:56

+ msgid "Negative cache timeout length (seconds)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:57

+ msgid "Users that SSSD should explicitly ignore"

+ msgstr "Pengguna yang diabaikan secara eksplisit oleh SSSD"

+ 

+ #: config/SSSDConfig.py:58

+ msgid "Groups that SSSD should explicitly ignore"

+ msgstr "Grup yang diabaikan secara eksplisit oleh SSSD"

+ 

+ #: config/SSSDConfig.py:59

+ msgid "Should filtered users appear in groups"

+ msgstr "Haruskah pengguna yang disaring muncul dalam grup"

+ 

+ #: config/SSSDConfig.py:60

+ msgid "The value of the password field the NSS provider should return"

+ msgstr "Nilai kolom kata sandi yang harus dikembalikan oleh penyedia NSS"

+ 

+ #: config/SSSDConfig.py:63

+ msgid "How long to allow cached logins between online logins (days)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:64

+ msgid "How many failed logins attempts are allowed when offline"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:65

+ msgid ""

+ "How long (minutes) to deny login after offline_failed_login_attempts has "

+ "been reached"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:68

+ msgid "Identity provider"

+ msgstr "Penyedia identitas"

+ 

+ #: config/SSSDConfig.py:69

+ msgid "Authentication provider"

+ msgstr "Penyedia otentikasi"

+ 

+ #: config/SSSDConfig.py:70

+ msgid "Access control provider"

+ msgstr "Penyedia kontrol akses"

+ 

+ #: config/SSSDConfig.py:71

+ msgid "Password change provider"

+ msgstr "Penyedia pengubah kata sandi"

+ 

+ #: config/SSSDConfig.py:74

+ msgid "Minimum user ID"

+ msgstr "ID pengguna minimum"

+ 

+ #: config/SSSDConfig.py:75

+ msgid "Maximum user ID"

+ msgstr "ID pengguna maksimum"

+ 

+ #: config/SSSDConfig.py:76

+ msgid "Ping timeout before restarting domain"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:77

+ msgid "Enable enumerating all users/groups"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:78

+ msgid "Cache credentials for offline login"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:79

+ msgid "Store password hashes"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:80

+ msgid "Display users/groups in fully-qualified form"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:81

+ msgid "Entry cache timeout length (seconds)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:82

+ msgid ""

+ "Restrict or prefer a specific address family when performing DNS lookups"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:83

+ msgid "How long to keep cached entries after last successful login (days)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:86

+ msgid "IPA domain"

+ msgstr "Domain IPA"

+ 

+ #: config/SSSDConfig.py:87

+ msgid "IPA server address"

+ msgstr "Alamat server IPA"

+ 

+ #: config/SSSDConfig.py:88

+ msgid "IPA client hostname"

+ msgstr "Nama host klien IPA"

+ 

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

+ msgid "Kerberos server address"

+ msgstr "Alamat server Kerberos"

+ 

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

+ msgid "Kerberos realm"

+ msgstr "Realm Kerberos"

+ 

+ #: config/SSSDConfig.py:93

+ msgid "Authentication timeout"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:96

+ msgid "Directory to store credential caches"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:97

+ msgid "Location of the user's credential cache"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:98

+ msgid "Location of the keytab to validate credentials"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:99

+ msgid "Enable credential validation"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:102

+ msgid "The principal of the change password service"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:106

+ msgid "ldap_uri, The URI of the LDAP server"

+ msgstr "ldap_uri, URI server LDAP"

+ 

+ #: config/SSSDConfig.py:107

+ msgid "The default base DN"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:108

+ msgid "The Schema Type in use on the LDAP server, rfc2307"

+ msgstr "Jenis Skema yang digunakan pada server LDAP, rfc2307"

+ 

+ #: config/SSSDConfig.py:109

+ msgid "The default bind DN"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:110

+ msgid "The type of the authentication token of the default bind DN"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:111

+ msgid "The authentication token of the default bind DN"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:112

+ msgid "Length of time to attempt connection"

+ msgstr "Lamanya waktu untuk mencoba koneksi"

+ 

+ #: config/SSSDConfig.py:113

+ msgid "Length of time to attempt synchronous LDAP operations"

+ msgstr "Lamanya waktu untuk mencoba operasi LDAP yang sinkron"

+ 

+ #: config/SSSDConfig.py:114

+ msgid "Length of time between attempts to reconnect while offline"

+ msgstr "Lamanya waktu antara upaya untuk menyambung kembali saat luring"

+ 

+ #: config/SSSDConfig.py:115

+ msgid "file that contains CA certificates"

+ msgstr "berkas yang berisi sertifikat CA"

+ 

+ #: config/SSSDConfig.py:116

+ msgid "Require TLS certificate verification"

+ msgstr "Membutuhkan verifikasi sertifikat TLS"

+ 

+ #: config/SSSDConfig.py:117

+ msgid "Specify the sasl mechanism to use"

+ msgstr "Tentukan mekanisme sasl yang digunakan"

+ 

+ #: config/SSSDConfig.py:118

+ msgid "Specify the sasl authorization id to use"

+ msgstr "Tentukan id otorisasi sasl yang digunakan"

+ 

+ #: config/SSSDConfig.py:121

+ msgid "Kerberos service keytab"

+ msgstr "Keytab layanan Kerberos"

+ 

+ #: config/SSSDConfig.py:122

+ msgid "Use Kerberos auth for LDAP connection"

+ msgstr "Gunakan otentikasi Kerberos untuk koneksi LDAP"

+ 

+ #: config/SSSDConfig.py:123

+ msgid "Follow LDAP referrals"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:126

+ msgid "Length of time to wait for a search request"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:127

+ msgid "Length of time between enumeration updates"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:128

+ msgid "Require TLS for ID lookups, false"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:129

+ msgid "Base DN for user lookups"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:130

+ msgid "Scope of user lookups"

+ msgstr "Lingkup pencarian pengguna"

+ 

+ #: config/SSSDConfig.py:131

+ msgid "Filter for user lookups"

+ msgstr "Filter pencarian pengguna"

+ 

+ #: config/SSSDConfig.py:132

+ msgid "Objectclass for users"

+ msgstr "Objectclass untuk pengguna"

+ 

+ #: config/SSSDConfig.py:133

+ msgid "Username attribute"

+ msgstr "Atribut Nama pengguna"

+ 

+ #: config/SSSDConfig.py:134

+ msgid "UID attribute"

+ msgstr "Atribut UID"

+ 

+ #: config/SSSDConfig.py:135

+ msgid "Primary GID attribute"

+ msgstr "Atribut GID Primer"

+ 

+ #: config/SSSDConfig.py:136

+ msgid "GECOS attribute"

+ msgstr "Atribut GECOS"

+ 

+ #: config/SSSDConfig.py:137

+ msgid "Home directory attribute"

+ msgstr "Atribut direktori Home"

+ 

+ #: config/SSSDConfig.py:138

+ msgid "Shell attribute"

+ msgstr "Atribut Shell"

+ 

+ #: config/SSSDConfig.py:139

+ msgid "UUID attribute"

+ msgstr "Atribut UUID"

+ 

+ #: config/SSSDConfig.py:140

+ msgid "User principal attribute (for Kerberos)"

+ msgstr "Atribut utama pengguna (untuk Kerberos)"

+ 

+ #: config/SSSDConfig.py:141

+ msgid "Full Name"

+ msgstr "Nama Lengkap"

+ 

+ #: config/SSSDConfig.py:142

+ msgid "memberOf attribute"

+ msgstr "Atribut memberOf"

+ 

+ #: config/SSSDConfig.py:143

+ msgid "Modification time attribute"

+ msgstr "Atribut waktu modifikasi"

+ 

+ #: config/SSSDConfig.py:146

+ msgid "Policy to evaluate the password expiration"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:149

+ msgid "Comma separated list of allowed users"

+ msgstr "Daftar pengguna yang diijinkan dalam format yang dipisahkan koma"

+ 

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

+ msgstr "Daftar pengguna yang tidak diijinkan dalam format yang dipisahkan koma"

+ 

+ #: config/SSSDConfig.py:153

+ msgid "Default shell, /bin/bash"

+ msgstr "Shell default, /bin/bash"

+ 

+ #: config/SSSDConfig.py:154

+ msgid "Base for home directories"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:157

+ msgid "The name of the NSS library to use"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:160

+ msgid "PAM stack to use"

+ msgstr ""

+ 

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

+ msgstr ""

+ 

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

+ msgstr ""

+ 

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

+ msgstr ""

+ 

+ #: monitor/monitor.c:2217

+ #, fuzzy

+ msgid "sssd must be run as root\n"

+ msgstr "%s harus dijalankan sebagai root\n"

+ 

+ #: monitor/monitor.c:2252

+ msgid ""

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

+ msgstr ""

+ 

+ #: monitor/monitor.c:2262

+ #, c-format

+ msgid ""

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

+ msgstr ""

+ 

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

+ msgstr ""

+ 

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

+ msgstr ""

+ 

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

+ msgstr ""

+ 

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ #, fuzzy

+ msgid "An open file descriptor for the debug logs"

+ msgstr "Mengatur verbosity dari pencatatan debug"

+ 

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

+ msgstr ""

+ 

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "Kata sandi tidak cocok"

+ 

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

+ msgstr "Otentikasi luring"

+ 

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

+ msgstr ""

+ 

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

+ msgstr "Otentikasi luring, otentikasi ditolak sampai:"

+ 

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

+ msgstr "Sistem sedang luring, perubahan kata sandi tidak dimungkinkan"

+ 

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ msgid "Password change failed. "

+ msgstr "Perubahan kata sandi gagal."

+ 

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

+ msgstr "Pesan server:"

+ 

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "Kata Sandi Baru: "

+ 

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "Masukkan lagi kata sandi baru:"

+ 

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "Kata sandi:"

+ 

+ #: sss_client/pam_sss.c:1006

+ msgid "Current Password: "

+ msgstr "Kata sandi saat ini:"

+ 

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:115 tools/sss_usermod.c:47

+ msgid "The UID of the user"

+ msgstr "UID dari pengguna"

+ 

+ #: tools/sss_useradd.c:116

+ msgid "The GID or group name of the user"

+ msgstr "GID atau nama grup pengguna"

+ 

+ #: tools/sss_useradd.c:117 tools/sss_usermod.c:49

+ msgid "The comment string"

+ msgstr "String komentar"

+ 

+ #: tools/sss_useradd.c:118 tools/sss_usermod.c:50

+ msgid "Home directory"

+ msgstr "Direktori Home"

+ 

+ #: tools/sss_useradd.c:119 tools/sss_usermod.c:51

+ msgid "Login shell"

+ msgstr "Shell login"

+ 

+ #: tools/sss_useradd.c:120

+ msgid "Groups"

+ msgstr "Grup"

+ 

+ #: tools/sss_useradd.c:121

+ msgid "Create user's directory if it does not exist"

+ msgstr "Buat direktori pengguna jika tidak ada"

+ 

+ #: tools/sss_useradd.c:122

+ msgid "Never create user's directory, overrides config"

+ msgstr "Jangan pernah buat direktori pengguna, timpa konfigurasi"

+ 

+ #: tools/sss_useradd.c:123

+ msgid "Specify an alternative skeleton directory"

+ msgstr "Tentukan direktori kerangka alternatif"

+ 

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:172

+ msgid "Specify user to add\n"

+ msgstr "Tentukan pengguna untuk ditambahkan\n"

+ 

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr "Gagal saat menginisialisasi perkakas\n"

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr "Domain yang ditentukan dalam FQDN tidak valid\n"

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr "Terjadi kesalahan internal ketika mengurai parameter\n"

+ 

+ #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

+ msgid "Groups must be in the same domain as user\n"

+ msgstr "Grup harus berada dalam domain yang sama dengan pengguna\n"

+ 

+ #: tools/sss_useradd.c:219

+ #, c-format

+ msgid "Cannot find group %s in local domain\n"

+ msgstr "Tidak dapat menemukan grup %s dalam domain lokal\n"

+ 

+ #: tools/sss_useradd.c:229

+ msgid "Cannot get group information for the user\n"

+ msgstr "Tidak bisa mendapatkan informasi grup untuk pengguna\n"

+ 

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr "Tidak dapat menetapkan nilai default\n"

+ 

+ #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

+ msgid "The selected UID is outside the allowed range\n"

+ msgstr "UID yang dipilih berada di luar rentang yang diizinkan\n"

+ 

+ #: tools/sss_useradd.c:285

+ msgid "Cannot get info about the user\n"

+ msgstr "Tidak bisa mendapatkan info tentang pengguna\n"

+ 

+ #: tools/sss_useradd.c:299

+ msgid "User's home directory already exists, not copying data from skeldir\n"

+ msgstr ""

+ "Direktori home milik pengguna sudah ada, tidak menyalin data dari skeldir\n"

+ 

+ #: tools/sss_useradd.c:302

+ #, c-format

+ msgid "Cannot create user's home directory: %s\n"

+ msgstr "Tidak dapat membuat direktori home milik pengguna: %s\n"

+ 

+ #: tools/sss_useradd.c:313

+ #, c-format

+ msgid "Cannot create user's mail spool: %s\n"

+ msgstr "Tidak dapat membuat spool mail milik pengguna: %s\n"

+ 

+ #: tools/sss_useradd.c:325

+ msgid "Could not allocate ID for the user - domain full?\n"

+ msgstr "Tidak dapat mengalokasikan ID untuk pengguna - domain penuh?\n"

+ 

+ #: tools/sss_useradd.c:329

+ msgid "A user or group with the same name or ID already exists\n"

+ msgstr "Pengguna atau grup dengan nama atau ID yang sama sudah ada\n"

+ 

+ #: tools/sss_useradd.c:335

+ msgid "Transaction error. Could not add user.\n"

+ msgstr "Kesalahan transaksi. Tidak dapat menambahkan pengguna.\n"

+ 

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr "GID grup"

+ 

+ #: tools/sss_groupadd.c:75

+ msgid "Specify group to add\n"

+ msgstr "Tentukan grup untuk ditambahkan\n"

+ 

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr "GID yang dipilih berada di luar rentang yang diizinkan\n"

+ 

+ #: tools/sss_groupadd.c:133

+ msgid "Could not allocate ID for the group - domain full?\n"

+ msgstr "Tidak dapat mengalokasikan ID untuk grup - domain penuh?\n"

+ 

+ #: tools/sss_groupadd.c:137

+ msgid "A group with the same name or GID already exists\n"

+ msgstr "Grup dengan nama atau GID yang sama sudah ada\n"

+ 

+ #: tools/sss_groupadd.c:142

+ msgid "Transaction error. Could not add group.\n"

+ msgstr "Kesalahan transaksi. Tidak dapat menambahkan grup.\n"

+ 

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr ""

+ "Grup %s berada di luar rentang ID yang telah didefinisikan untuk domain\n"

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "Tidak ada grup seperti itu di domain lokal. Menghapus grup hanya "

+ "diperbolehkan dalam domain lokal.\n"

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr "Kesalahan internal. Tidak dapat menghapus grup.\n"

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr "Tentukan grup untuk dimodifikasi\n"

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ "Tidak dapat menemukan grup di domain lokal, memodifikasi grup hanya "

+ "diperbolehkan dalam domain lokal\n"

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr ""

+ "Anggota kelompok harus berada dalam domain yang sama sebagaimana kelompok "

+ "induknya\n"

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ "Tidak dapat menemukan grup %s di domain lokal, hanya grup dalam domain lokal "

+ "yang diperbolehkan\n"

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ "Tidak bisa memodifikasi grup - periksa apakah nama grup anggota sudah benar\n"

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr "Tidak bisa memodifikasi grup - periksa apakah groupname sudah benar\n"

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr "Kesalahan transaksi. Tidak bisa memodifikasi grup.\n"

+ 

+ #: tools/sss_groupshow.c:954

+ #, fuzzy, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr "Grup"

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1045

+ #, fuzzy

+ msgid "Specify group to show\n"

+ msgstr "Tentukan grup untuk ditambahkan\n"

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ #, fuzzy

+ msgid "Cannot initiate search\n"

+ msgstr "Tidak bisa mendapatkan info tentang pengguna\n"

+ 

+ #: tools/sss_groupshow.c:1115

+ #, fuzzy

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "Tidak ada grup seperti itu di domain lokal. Menghapus grup hanya "

+ "diperbolehkan dalam domain lokal.\n"

+ 

+ #: tools/sss_groupshow.c:1120

+ #, fuzzy

+ msgid "Internal error. Could not print group.\n"

+ msgstr "Kesalahan internal. Tidak dapat menghapus grup.\n"

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr "Hapus direktori home, dan spool mail"

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr "Jangan hapus direktori home dan spool mail"

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr "Paksa penghapusan berkas yang tidak dimiliki oleh pengguna"

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr "Tentukan pengguna yang akan dihapus\n"

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr ""

+ "Pengguna %s berada di luar rentang ID yang telah didefinisikan untuk domain\n"

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr "Tidak menghapus home dir - tidak dimiliki oleh pengguna\n"

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr "Tidak dapat menghapus homedir: %s\n"

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ "Tidak ada pengguna seperti itu di domain lokal. Menghapus pengguna hanya "

+ "diperbolehkan dalam domain lokal.\n"

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr "Kesalahan internal. Tidak dapat menghapus pengguna.\n"

+ 

+ #: tools/sss_usermod.c:48

+ msgid "The GID of the user"

+ msgstr "GID pengguna"

+ 

+ #: tools/sss_usermod.c:52

+ msgid "Groups to add this user to"

+ msgstr "Pengguna ini akan ditambahkan ke grup"

+ 

+ #: tools/sss_usermod.c:53

+ msgid "Groups to remove this user from"

+ msgstr "Pengguna ini akan dihapus dari grup"

+ 

+ #: tools/sss_usermod.c:54

+ msgid "Lock the account"

+ msgstr "Kunci akun"

+ 

+ #: tools/sss_usermod.c:55

+ msgid "Unlock the account"

+ msgstr "Buka kunci akun"

+ 

+ #: tools/sss_usermod.c:115

+ msgid "Specify user to modify\n"

+ msgstr "Tentukan pengguna untuk dimodifikasi\n"

+ 

+ #: tools/sss_usermod.c:146

+ msgid ""

+ "Cannot find user in local domain, modifying users is allowed only in local "

+ "domain\n"

+ msgstr ""

+ "Tidak dapat menemukan pengguna dalam domain lokal, memodifikasi pengguna "

+ "hanya diperbolehkan dalam domain lokal\n"

+ 

+ #: tools/sss_usermod.c:241

+ msgid "Could not modify user - check if group names are correct\n"

+ msgstr ""

+ "Tidak bisa memodifikasi pengguna - periksa apakah nama grup sudah benar\n"

+ 

+ #: tools/sss_usermod.c:245

+ msgid "Could not modify user - user already member of groups?\n"

+ msgstr ""

+ "Tidak bisa memodifikasi pengguna - pengguna sudah menjadi anggota kelompok?\n"

+ 

+ #: tools/sss_usermod.c:249

+ msgid "Transaction error. Could not modify user.\n"

+ msgstr "Kesalahan transaksi. Pengguna tidak dapat dimodifikasi.\n"

+ 

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

+ msgstr "Kehabisan memori\n"

+ 

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

+ msgstr "%s harus dijalankan sebagai root\n"

+ 

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

+ msgstr ""

file modified
+334 -199
@@ -7,7 +7,7 @@

  msgstr ""

  "Project-Id-Version: it\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

  "PO-Revision-Date: \n"

  "Last-Translator: Marina Latini <deneb.alphacygni@gmail.com>\n"

  "Language-Team: Italian <fedora-trans-it@redhat.com>\n"
@@ -173,11 +173,11 @@

  msgid "IPA client hostname"

  msgstr ""

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr "Indirizzi del server Kerberos"

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr ""

  
@@ -205,318 +205,282 @@

  msgid "The principal of the change password service"

  msgstr ""

  

- #: config/SSSDConfig.py:105

- msgid "ldap_uri, The URI of the LDAP server"

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

  msgstr ""

  

  #: config/SSSDConfig.py:106

- msgid "The default base DN"

+ msgid "ldap_uri, The URI of the LDAP server"

  msgstr ""

  

  #: config/SSSDConfig.py:107

- msgid "The Schema Type in use on the LDAP server, rfc2307"

+ msgid "The default base DN"

  msgstr ""

  

  #: config/SSSDConfig.py:108

- msgid "The default bind DN"

+ msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr ""

  

  #: config/SSSDConfig.py:109

- msgid "The type of the authentication token of the default bind DN"

+ msgid "The default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:110

- msgid "The authentication token of the default bind DN"

+ msgid "The type of the authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:111

- msgid "Length of time to attempt connection"

+ msgid "The authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:112

- msgid "Length of time to attempt synchronous LDAP operations"

+ msgid "Length of time to attempt connection"

  msgstr ""

  

  #: config/SSSDConfig.py:113

- msgid "Length of time between attempts to reconnect while offline"

+ msgid "Length of time to attempt synchronous LDAP operations"

  msgstr ""

  

  #: config/SSSDConfig.py:114

+ msgid "Length of time between attempts to reconnect while offline"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:115

  msgid "file that contains CA certificates"

  msgstr "file che contiene certificati CA"

  

- #: config/SSSDConfig.py:115

+ #: config/SSSDConfig.py:116

  msgid "Require TLS certificate verification"

  msgstr "Richiedere la verifica del certificato TLS"

  

- #: config/SSSDConfig.py:116

+ #: config/SSSDConfig.py:117

  msgid "Specify the sasl mechanism to use"

  msgstr "Specificare il meccanismo sasl da usare"

  

- #: config/SSSDConfig.py:117

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr "Specificare l'id di autorizzazione sasl da usare"

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr ""

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr ""

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr ""

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr ""

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr ""

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr ""

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr "Ambito di applicazione della ricerca degli utenti"

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr ""

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr "Attributo del nome utente"

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr "Attributo UID"

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr "Attributo del GID primario"

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr "Attributo GECOS"

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr "Attributo UUID"

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr ""

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr ""

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr "Politica per controllare la scadenza della password"

  

- #: config/SSSDConfig.py:148

+ #: config/SSSDConfig.py:149

+ msgid "Comma separated list of allowed users"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:153

  msgid "Default shell, /bin/bash"

  msgstr ""

  

- #: config/SSSDConfig.py:149

+ #: config/SSSDConfig.py:154

  msgid "Base for home directories"

  msgstr ""

  

- #: config/SSSDConfig.py:152

+ #: config/SSSDConfig.py:157

  msgid "The name of the NSS library to use"

  msgstr ""

  

- #: config/SSSDConfig.py:155

+ #: config/SSSDConfig.py:160

  msgid "PAM stack to use"

  msgstr "Stack PAM da usare"

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

  msgstr ""

  

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

- msgstr "Errore di impostazione della località\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

+ msgstr ""

  

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

- msgstr "Specificare il gruppo da eliminare\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

+ msgstr ""

  

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

+ #: monitor/monitor.c:2217

  #, fuzzy

- msgid "Error initializing the tools - no local domain\n"

- msgstr "Errore durante l'inizializzazione degli strumenti\n"

- 

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

- msgstr "Errore durante l'inizializzazione degli strumenti\n"

+ msgid "sssd must be run as root\n"

+ msgstr "%s deve essere eseguito come root\n"

  

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

+ #: monitor/monitor.c:2252

+ msgid ""

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

  msgstr ""

  

- #: tools/sss_groupdel.c:107

+ #: monitor/monitor.c:2262

  #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

- msgstr ""

- 

- #: tools/sss_groupdel.c:136

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

  

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr "Errore interno. Impossibile rimuovere il gruppo.\n"

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

  msgstr ""

  

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr "Il GID del gruppo"

- 

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

- msgstr "Specificare il gruppo da modificare\n"

- 

- #: tools/sss_groupmod.c:130

- msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

  msgstr ""

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

- msgstr "Errore interno nell'analisi dei parametri\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ #, fuzzy

+ msgid "An open file descriptor for the debug logs"

+ msgstr "Impostare il livello di dettaglio dello storico dei file di log"

  

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

  msgstr ""

  

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

- msgstr ""

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "Le password non coincidono"

  

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

  msgstr ""

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

  msgstr ""

- "Impossibile modificare il gruppo - controllare che i nomi dei gruppi siano "

- "corretti\n"

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

  msgstr ""

- "Impossibile modificare il gruppo - controllare che il nome del gruppo sia "

- "corretto\n"

- 

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

- msgstr "Errore della transazione. Impossibile modificare il gruppo.\n"

  

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

  msgstr ""

  

- #: tools/sss_userdel.c:47

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

  #, fuzzy

- msgid "Do not remove home directory and mail spool"

- msgstr "Non rimuovere la cartella home e la coda di posta"

- 

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

- msgstr "Forza la rimozione dei file non di proprietà dell'utente"

- 

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

- msgstr "Specificare l'utente da cancellare\n"

- 

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

- msgstr "Impossibile impostare i valori predefiniti\n"

+ msgid "Password change failed. "

+ msgstr "La password è scaduta."

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

  msgstr ""

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

- msgstr ""

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "Nuova password: "

  

- #: tools/sss_userdel.c:174

- #, fuzzy, c-format

- msgid "Cannot remove homedir: %s\n"

- msgstr "Impossibile rimuovere la cartella home: %s\n"

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "reinserire la nuova password: "

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

- msgstr ""

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "Password: "

  

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

- msgstr "errore interno. Impossibile rimuovere l'utente.\n"

+ #: sss_client/pam_sss.c:1006

+ #, fuzzy

+ msgid "Current Password: "

+ msgstr "Nuova password: "

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

  msgstr ""

  

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

- msgstr "%s deve essere eseguito come root\n"

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

+ msgstr ""

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47

  msgid "The UID of the user"
@@ -554,10 +518,40 @@

  msgid "Specify an alternative skeleton directory"

  msgstr ""

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr "Errore di impostazione della località\n"

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr "Specificare un utente da aggiungere\n"

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ #, fuzzy

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr "Errore durante l'inizializzazione degli strumenti\n"

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr "Errore durante l'inizializzazione degli strumenti\n"

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr "Errore interno nell'analisi dei parametri\n"

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr ""
@@ -571,6 +565,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr "Impossibile impostare i valori predefiniti\n"

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr ""
@@ -605,10 +603,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr "Il GID del gruppo"

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr "Specificare un gruppo da aggiungere\n"

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr ""
@@ -621,6 +627,168 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr "Errore della transazione. Impossibile aggiungere il gruppo.\n"

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr "Specificare il gruppo da eliminare\n"

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr "Errore interno. Impossibile rimuovere il gruppo.\n"

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr "Specificare il gruppo da modificare\n"

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ "Impossibile modificare il gruppo - controllare che i nomi dei gruppi siano "

+ "corretti\n"

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ "Impossibile modificare il gruppo - controllare che il nome del gruppo sia "

+ "corretto\n"

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr "Errore della transazione. Impossibile modificare il gruppo.\n"

+ 

+ #: tools/sss_groupshow.c:954

+ #, fuzzy, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr "Gruppi"

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1045

+ #, fuzzy

+ msgid "Specify group to show\n"

+ msgstr "Specificare un gruppo da aggiungere\n"

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1120

+ #, fuzzy

+ msgid "Internal error. Could not print group.\n"

+ msgstr "Errore interno. Impossibile rimuovere il gruppo.\n"

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:47

+ #, fuzzy

+ msgid "Do not remove home directory and mail spool"

+ msgstr "Non rimuovere la cartella home e la coda di posta"

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr "Forza la rimozione dei file non di proprietà dell'utente"

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr "Specificare l'utente da cancellare\n"

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:174

+ #, fuzzy, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr "Impossibile rimuovere la cartella home: %s\n"

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr "errore interno. Impossibile rimuovere l'utente.\n"

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr "Il GID dell'utente"
@@ -665,51 +833,18 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr "Errore della transazione. Impossibile modificare l'utente.\n"

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr "Le password non coincidono"

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr ""

- 

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:526

- #, fuzzy

- msgid "Password change failed. "

- msgstr "La password è scaduta."

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

+ msgstr "%s deve essere eseguito come root\n"

  

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

  msgstr ""

  

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr "Nuova password: "

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

- msgstr "reinserire la nuova password: "

- 

- #: sss_client/pam_sss.c:953

- msgid "Password: "

- msgstr "Password: "

- 

- #: sss_client/pam_sss.c:983

- #, fuzzy

- msgid "Current Password: "

- msgstr "Nuova password: "

- 

  #~ msgid "Password has expired."

  #~ msgstr "La password è scaduta."

file modified
+311 -180
@@ -7,7 +7,7 @@

  msgstr ""

  "Project-Id-Version: sss_daemon_ja\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

  "PO-Revision-Date: 2009-11-18 09:48+1000\n"

  "Last-Translator: Noriko Mizumoto <noriko@fedoraproject.org>\n"

  "Language-Team: Japanese <fedora-trans-ja@redhat.com>\n"
@@ -172,11 +172,11 @@

  msgid "IPA client hostname"

  msgstr ""

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr ""

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr ""

  
@@ -204,311 +204,277 @@

  msgid "The principal of the change password service"

  msgstr ""

  

- #: config/SSSDConfig.py:105

- msgid "ldap_uri, The URI of the LDAP server"

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

  msgstr ""

  

  #: config/SSSDConfig.py:106

- msgid "The default base DN"

+ msgid "ldap_uri, The URI of the LDAP server"

  msgstr ""

  

  #: config/SSSDConfig.py:107

- msgid "The Schema Type in use on the LDAP server, rfc2307"

+ msgid "The default base DN"

  msgstr ""

  

  #: config/SSSDConfig.py:108

- msgid "The default bind DN"

+ msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr ""

  

  #: config/SSSDConfig.py:109

- msgid "The type of the authentication token of the default bind DN"

+ msgid "The default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:110

- msgid "The authentication token of the default bind DN"

+ msgid "The type of the authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:111

- msgid "Length of time to attempt connection"

+ msgid "The authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:112

- msgid "Length of time to attempt synchronous LDAP operations"

+ msgid "Length of time to attempt connection"

  msgstr ""

  

  #: config/SSSDConfig.py:113

- msgid "Length of time between attempts to reconnect while offline"

+ msgid "Length of time to attempt synchronous LDAP operations"

  msgstr ""

  

  #: config/SSSDConfig.py:114

- msgid "file that contains CA certificates"

+ msgid "Length of time between attempts to reconnect while offline"

  msgstr ""

  

  #: config/SSSDConfig.py:115

- msgid "Require TLS certificate verification"

+ msgid "file that contains CA certificates"

  msgstr ""

  

  #: config/SSSDConfig.py:116

- msgid "Specify the sasl mechanism to use"

+ msgid "Require TLS certificate verification"

  msgstr ""

  

  #: config/SSSDConfig.py:117

+ msgid "Specify the sasl mechanism to use"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr ""

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr ""

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr ""

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr ""

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr ""

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr ""

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr ""

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr ""

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr ""

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr ""

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr ""

  

- #: config/SSSDConfig.py:148

- msgid "Default shell, /bin/bash"

- msgstr ""

- 

  #: config/SSSDConfig.py:149

- msgid "Base for home directories"

+ msgid "Comma separated list of allowed users"

  msgstr ""

  

- #: config/SSSDConfig.py:152

- msgid "The name of the NSS library to use"

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

  msgstr ""

  

- #: config/SSSDConfig.py:155

- msgid "PAM stack to use"

+ #: config/SSSDConfig.py:153

+ msgid "Default shell, /bin/bash"

  msgstr ""

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

+ #: config/SSSDConfig.py:154

+ msgid "Base for home directories"

  msgstr ""

  

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

+ #: config/SSSDConfig.py:157

+ msgid "The name of the NSS library to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

+ #: config/SSSDConfig.py:160

+ msgid "PAM stack to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

- msgid "Error initializing the tools - no local domain\n"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

  msgstr ""

  

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

  msgstr ""

  

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

  msgstr ""

  

- #: tools/sss_groupdel.c:107

- #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

  msgstr ""

  

- #: tools/sss_groupdel.c:136

+ #: monitor/monitor.c:2252

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

- msgstr ""

- 

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

- msgstr ""

- 

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr ""

- 

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:130

+ #: monitor/monitor.c:2262

+ #, c-format

  msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

  msgstr ""

  

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

  msgstr ""

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ msgid "An open file descriptor for the debug logs"

  msgstr ""

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

  msgstr ""

  

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

  msgstr ""

  

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

  msgstr ""

  

- #: tools/sss_userdel.c:47

- msgid "Do not remove home directory and mail spool"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

  msgstr ""

  

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

  msgstr ""

  

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

  msgstr ""

  

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ msgid "Password change failed. "

  msgstr ""

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

  msgstr ""

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

  msgstr ""

  

- #: tools/sss_userdel.c:174

- #, c-format

- msgid "Cannot remove homedir: %s\n"

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

  msgstr ""

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

  msgstr ""

  

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

+ #: sss_client/pam_sss.c:1006

+ msgid "Current Password: "

  msgstr ""

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

  msgstr ""

  

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

  msgstr ""

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47
@@ -547,10 +513,39 @@

  msgid "Specify an alternative skeleton directory"

  msgstr ""

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr ""
@@ -564,6 +559,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr ""
@@ -598,10 +597,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr ""
@@ -614,6 +621,161 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr ""

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:954

+ #, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr ""

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr ""
@@ -656,46 +818,15 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr ""

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr ""

- 

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

- msgstr ""

- 

- #: sss_client/pam_sss.c:526

- msgid "Password change failed. "

- msgstr ""

- 

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:953

- msgid "Password: "

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:983

- msgid "Current Password: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

  msgstr ""

file modified
+319 -188
@@ -7,7 +7,7 @@

  msgstr ""

  "Project-Id-Version: sssd.master.sss_daemon\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

  "PO-Revision-Date: 2009-11-19 12:19+0100\n"

  "Last-Translator: Richard van der Luit <nippur@fedoraproject.org>\n"

  "Language-Team: Dutch <nl@li.org>\n"
@@ -172,11 +172,11 @@

  msgid "IPA client hostname"

  msgstr ""

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr ""

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr ""

  
@@ -204,311 +204,279 @@

  msgid "The principal of the change password service"

  msgstr ""

  

- #: config/SSSDConfig.py:105

- msgid "ldap_uri, The URI of the LDAP server"

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

  msgstr ""

  

  #: config/SSSDConfig.py:106

- msgid "The default base DN"

+ msgid "ldap_uri, The URI of the LDAP server"

  msgstr ""

  

  #: config/SSSDConfig.py:107

- msgid "The Schema Type in use on the LDAP server, rfc2307"

+ msgid "The default base DN"

  msgstr ""

  

  #: config/SSSDConfig.py:108

- msgid "The default bind DN"

+ msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr ""

  

  #: config/SSSDConfig.py:109

- msgid "The type of the authentication token of the default bind DN"

+ msgid "The default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:110

- msgid "The authentication token of the default bind DN"

+ msgid "The type of the authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:111

- msgid "Length of time to attempt connection"

+ msgid "The authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:112

- msgid "Length of time to attempt synchronous LDAP operations"

+ msgid "Length of time to attempt connection"

  msgstr ""

  

  #: config/SSSDConfig.py:113

- msgid "Length of time between attempts to reconnect while offline"

+ msgid "Length of time to attempt synchronous LDAP operations"

  msgstr ""

  

  #: config/SSSDConfig.py:114

- msgid "file that contains CA certificates"

+ msgid "Length of time between attempts to reconnect while offline"

  msgstr ""

  

  #: config/SSSDConfig.py:115

- msgid "Require TLS certificate verification"

+ msgid "file that contains CA certificates"

  msgstr ""

  

  #: config/SSSDConfig.py:116

- msgid "Specify the sasl mechanism to use"

+ msgid "Require TLS certificate verification"

  msgstr ""

  

  #: config/SSSDConfig.py:117

+ msgid "Specify the sasl mechanism to use"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr ""

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr ""

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr ""

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr ""

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr ""

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr ""

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr ""

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr ""

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr ""

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr ""

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr ""

  

- #: config/SSSDConfig.py:148

- msgid "Default shell, /bin/bash"

- msgstr ""

- 

  #: config/SSSDConfig.py:149

- msgid "Base for home directories"

+ msgid "Comma separated list of allowed users"

  msgstr ""

  

- #: config/SSSDConfig.py:152

- msgid "The name of the NSS library to use"

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

  msgstr ""

  

- #: config/SSSDConfig.py:155

- msgid "PAM stack to use"

+ #: config/SSSDConfig.py:153

+ msgid "Default shell, /bin/bash"

  msgstr ""

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

+ #: config/SSSDConfig.py:154

+ msgid "Base for home directories"

  msgstr ""

  

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

+ #: config/SSSDConfig.py:157

+ msgid "The name of the NSS library to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

+ #: config/SSSDConfig.py:160

+ msgid "PAM stack to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

- msgid "Error initializing the tools - no local domain\n"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

  msgstr ""

  

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

  msgstr ""

  

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

  msgstr ""

  

- #: tools/sss_groupdel.c:107

- #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

  msgstr ""

  

- #: tools/sss_groupdel.c:136

+ #: monitor/monitor.c:2252

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

- msgstr ""

- 

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

- msgstr ""

- 

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

- msgstr ""

- 

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr ""

- 

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:130

+ #: monitor/monitor.c:2262

+ #, c-format

  msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

  msgstr ""

  

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

  msgstr ""

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ msgid "An open file descriptor for the debug logs"

  msgstr ""

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

  msgstr ""

  

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

- msgstr ""

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "Wachtwoorden komen niet overeen"

  

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

  msgstr ""

  

- #: tools/sss_userdel.c:47

- msgid "Do not remove home directory and mail spool"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

  msgstr ""

  

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

  msgstr ""

  

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

  msgstr ""

  

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

- msgstr ""

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ #, fuzzy

+ msgid "Password change failed. "

+ msgstr "Wachtwoord is verlopen."

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

  msgstr ""

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

- msgstr ""

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "Nieuw Wachtwoord: "

  

- #: tools/sss_userdel.c:174

- #, c-format

- msgid "Cannot remove homedir: %s\n"

- msgstr ""

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "Voer nieuw wachtwoord nogmaals in: "

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

- msgstr ""

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "Wachtwoord: "

  

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

- msgstr ""

+ #: sss_client/pam_sss.c:1006

+ #, fuzzy

+ msgid "Current Password: "

+ msgstr "Nieuw Wachtwoord: "

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

  msgstr ""

  

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

  msgstr ""

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47
@@ -547,10 +515,39 @@

  msgid "Specify an alternative skeleton directory"

  msgstr ""

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr ""
@@ -564,6 +561,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr ""
@@ -598,10 +599,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr ""
@@ -614,6 +623,161 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr ""

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:954

+ #, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr ""

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr ""
@@ -656,51 +820,18 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr "Wachtwoorden komen niet overeen"

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr ""

- 

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:526

- #, fuzzy

- msgid "Password change failed. "

- msgstr "Wachtwoord is verlopen."

- 

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

  msgstr ""

  

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr "Nieuw Wachtwoord: "

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

- msgstr "Voer nieuw wachtwoord nogmaals in: "

- 

- #: sss_client/pam_sss.c:953

- msgid "Password: "

- msgstr "Wachtwoord: "

- 

- #: sss_client/pam_sss.c:983

- #, fuzzy

- msgid "Current Password: "

- msgstr "Nieuw Wachtwoord: "

- 

  #~ msgid "Password has expired."

  #~ msgstr "Wachtwoord is verlopen."

file modified
+365 -221
@@ -5,8 +5,8 @@

  msgstr ""

  "Project-Id-Version: pl\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

- "PO-Revision-Date: 2010-02-25 20:14+0100\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

+ "PO-Revision-Date: 2010-03-22 21:30+0100\n"

  "Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"

  "Language-Team: Polish <trans-pl@lists.fedoraproject.org>\n"

  "MIME-Version: 1.0\n"
@@ -176,11 +176,11 @@

  msgid "IPA client hostname"

  msgstr "Nazwa komputera klienta IPA"

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr "Adres serwera Kerberos"

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr "Obszar Kerberos"

  
@@ -209,326 +209,285 @@

  msgid "The principal of the change password service"

  msgstr "Główna usługa zmiany hasła"

  

- #: config/SSSDConfig.py:105

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

+ msgstr ""

+ "Serwer, w którym jest uruchomiona usługa zmiany haseł, jeśli nie znajduje "

+ "się w KDC"

+ 

+ #: config/SSSDConfig.py:106

  msgid "ldap_uri, The URI of the LDAP server"

  msgstr "ldap_uri, adres URI serwera LDAP"

  

- #: config/SSSDConfig.py:106

+ #: config/SSSDConfig.py:107

  msgid "The default base DN"

  msgstr "Domyślna podstawowa DN"

  

- #: config/SSSDConfig.py:107

+ #: config/SSSDConfig.py:108

  msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr "Typ Schema do użycia na serwerze LDAP, RFC2307"

  

- #: config/SSSDConfig.py:108

+ #: config/SSSDConfig.py:109

  msgid "The default bind DN"

  msgstr "Domyślne DN dowiązania"

  

- #: config/SSSDConfig.py:109

+ #: config/SSSDConfig.py:110

  msgid "The type of the authentication token of the default bind DN"

  msgstr "Typ tokenu uwierzytelniania domyślnego DN dowiązania"

  

- #: config/SSSDConfig.py:110

+ #: config/SSSDConfig.py:111

  msgid "The authentication token of the default bind DN"

  msgstr "Token uwierzytelniania domyślnego DN dowiązania"

  

- #: config/SSSDConfig.py:111

+ #: config/SSSDConfig.py:112

  msgid "Length of time to attempt connection"

  msgstr "Czas do próby połączenia"

  

- #: config/SSSDConfig.py:112

+ #: config/SSSDConfig.py:113

  msgid "Length of time to attempt synchronous LDAP operations"

  msgstr "Czas do próby synchronicznych działań LDAP"

  

- #: config/SSSDConfig.py:113

+ #: config/SSSDConfig.py:114

  msgid "Length of time between attempts to reconnect while offline"

  msgstr "Czas między próbami ponownego połączenia w trybie offline"

  

- #: config/SSSDConfig.py:114

+ #: config/SSSDConfig.py:115

  msgid "file that contains CA certificates"

  msgstr "plik zawierający certyfikaty CA"

  

- #: config/SSSDConfig.py:115

+ #: config/SSSDConfig.py:116

  msgid "Require TLS certificate verification"

  msgstr "Wymaga sprawdzenia certyfikatu TLS"

  

- #: config/SSSDConfig.py:116

+ #: config/SSSDConfig.py:117

  msgid "Specify the sasl mechanism to use"

  msgstr "Podaje używany mechanizm SASL"

  

- #: config/SSSDConfig.py:117

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr "Podaje używany identyfikator upoważnienia SASL"

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr "Tablica kluczy usługi Kerberos"

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr "Używa uwierzytelniania Kerberos dla połączenia LDAP"

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr "Podąża za odsyłaniami LDAP"

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr "Czas oczekiwania na żądanie wyszukiwania"

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr "Czas między aktualizacjami wyliczania"

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr "Wymaga TLS dla wyszukiwania identyfikatorów, fałsz"

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr "Podstawowe DN dla wyszukiwania użytkowników"

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr "Zakres wyszukiwania użytkowników"

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr "Filtruje wyszukiwania użytkowników"

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr "Klasa obiektów dla użytkowników"

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr "Atrybut nazwy użytkownika"

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr "Atrybut UID"

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr "Pierwszy atrybut GID"

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr "Atrybut GECOS"

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr "Atrybut katalogu domowego"

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr "Atrybut powłoki"

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr "Atrybut UUID"

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr "Atrybut głównego użytkownika (dla Kerberos)"

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr "Imię i nazwisko"

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr "Atrybut memberOf"

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr "Atrybut czasu modyfikacji"

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr "Polityka do oszacowania wygaszenia hasła"

  

- #: config/SSSDConfig.py:148

+ #: config/SSSDConfig.py:149

+ msgid "Comma separated list of allowed users"

+ msgstr "Lista dozwolonych użytkowników oddzielonych przecinkami"

+ 

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

+ msgstr "Lista zabronionych użytkowników oddzielonych przecinkami"

+ 

+ #: config/SSSDConfig.py:153

  msgid "Default shell, /bin/bash"

  msgstr "Domyślna powłoka, /bin/bash"

  

- #: config/SSSDConfig.py:149

+ #: config/SSSDConfig.py:154

  msgid "Base for home directories"

  msgstr "Podstawa katalogów domowych"

  

- #: config/SSSDConfig.py:152

+ #: config/SSSDConfig.py:157

  msgid "The name of the NSS library to use"

  msgstr "Nazwa używanej biblioteki NSS"

  

- #: config/SSSDConfig.py:155

+ #: config/SSSDConfig.py:160

  msgid "PAM stack to use"

  msgstr "Używany stos PAM"

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

- msgstr "Poziom debugowania, z jakim uruchomić"

- 

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

- msgstr "Błąd podczas ustawiania lokalizacji\n"

- 

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

- msgstr "Proszę podać grupę do usunięcia\n"

- 

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

- msgid "Error initializing the tools - no local domain\n"

- msgstr "Błąd podczas inicjowania narzędzi - brak lokalnej domeny\n"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

+ msgstr "Uruchamia jako demon (domyślnie)"

  

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

- msgstr "Błąd podczas inicjowania narzędzi\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

+ msgstr "Uruchamia interaktywnie (nie jako demon)"

  

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

- msgstr "Podano nieprawidłową domenę w FQDN\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

+ msgstr "Podaje niedomyślny plik konfiguracji"

  

- #: tools/sss_groupdel.c:107

- #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

- msgstr "Grupa %s jest poza określonym zakresem identyfikatorów dla domeny\n"

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

+ msgstr "sssd musi zostać uruchomione jako root\n"

  

- #: tools/sss_groupdel.c:136

+ #: monitor/monitor.c:2252

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

  msgstr ""

- "Nie ma takiej grupy w lokalnej domenie. Usuwanie grup jest dozwolone tylko w "

- "lokalnej domenie.\n"

- 

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr "Wewnętrzny błąd. Nie można usunąć grupy.\n"

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

- msgstr "Grupy, do których dodać tę grupę"

- 

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

- msgstr "Grupy, z których usunąć tę grupę"

- 

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr "GID grupy"

+ "Wykryto gniazdo nscd. Możliwości pamięci podręcznej nscd mogą konfliktować z "

+ "SSSD, więc nie jest zalecane uruchamianie nscd jednocześnie z SSSD\n"

  

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

- msgstr "Proszę podać grupę do zmodyfikowania\n"

- 

- #: tools/sss_groupmod.c:130

+ #: monitor/monitor.c:2262

+ #, c-format

  msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

- "Nie można odnaleźć grupy w lokalnej domenie, modyfikowanie grup jest "

- "dozwolone tylko w lokalnej domenie\n"

+ "Nie można odczytać pliku konfiguracji %s. Proszę sprawdzić, czy uprawnienia "

+ "wynoszą 0600, a właścicielem pliku jest root.root\n"

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

- msgstr "Wewnętrzny błąd podczas przetwarzania parametrów\n"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

+ msgstr "Nie można wczytać bazy danych konfiguracji\n"

  

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

- msgstr "Członkowie grupy muszą być w tej samej domenie co grupa nadrzędna\n"

- 

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

- msgstr ""

- "Nie można odnaleźć grupy %s w lokalnej domenie, tylko grupy w lokalnej "

- "domenie są dozwolone\n"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

+ msgstr "Poziom debugowania"

  

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

- msgstr "Wybrany GID jest spoza dozwolonego zakresu\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

+ msgstr "Dodaje czasy debugowania"

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

- msgstr ""

- "Nie można zmodyfikować grupy - proszę sprawdzić, czy nazwy członków grupy są "

- "poprawne\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ msgid "An open file descriptor for the debug logs"

+ msgstr "Otwiera deskryptor pliku dla dzienników debugowania"

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

- msgstr ""

- "Nie można zmodyfikować grupy - proszę sprawdzić, czy nazwa grupy jest "

- "poprawna\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

+ msgstr "Domena dostawcy informacji (wymagane)"

  

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

- msgstr "Błąd transakcji. Nie można zmodyfikować grupy.\n"

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "Hasła nie zgadzają się"

  

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

- msgstr "Usuwa katalog domowy i bufor poczty"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

+ msgstr "Uwierzytelnienie w trybie offline"

  

- #: tools/sss_userdel.c:47

- msgid "Do not remove home directory and mail spool"

- msgstr "Nie usuwa katalogu domowego i bufora poczty"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

+ msgstr ", hasło w pamięci podręcznej wygaśnie za: "

  

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

- msgstr "Wymusza usunięcie plików, których właścicielem nie jest użytkownik"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

+ msgstr ""

+ "Uwierzytelnianie w trybie offline, uwierzytelnianie jest zabronione do: "

  

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

- msgstr "Proszę podać użytkownika do usunięcia\n"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

+ msgstr "System jest w trybie offline, zmiana hasła nie jest możliwa"

  

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

- msgstr "Nie można ustawić domyślnych wartości\n"

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ msgid "Password change failed. "

+ msgstr "Zmiana hasła nie powiodła się. "

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

- msgstr ""

- "Użytkownik %s jest poza określonym zakresem identyfikatorów dla domeny\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

+ msgstr "Komunikat serwera: "

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

- msgstr ""

- "Katalog domowy nie zostanie usunięty - użytkownik nie jest właścicielem\n"

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "Nowe hasło: "

  

- #: tools/sss_userdel.c:174

- #, c-format

- msgid "Cannot remove homedir: %s\n"

- msgstr "Nie można usunąć katalogu domowego: %s\n"

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "Proszę ponownie podać nowe hasło: "

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

- msgstr ""

- "Nie ma takiego użytkownika w lokalnej domenie. Usuwanie użytkowników jest "

- "dozwolone tylko w lokalnej domenie.\n"

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "Hasło: "

  

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

- msgstr "Wewnętrzny błąd. Nie można usunąć użytkownika.\n"

+ #: sss_client/pam_sss.c:1006

+ msgid "Current Password: "

+ msgstr "Bieżące hasło: "

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

- msgstr "Brak pamięci\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

+ msgstr "Hasło wygasło. Proszę je zmienić teraz."

  

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

- msgstr "%s musi zostać uruchomione jako root\n"

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

+ msgstr "Poziom debugowania, z jakim uruchomić"

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47

  msgid "The UID of the user"
@@ -566,10 +525,39 @@

  msgid "Specify an alternative skeleton directory"

  msgstr "Proszę podać alternatywny katalog szkieletu"

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr "Błąd podczas ustawiania lokalizacji\n"

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr "Proszę podać użytkownika do dodania\n"

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr "Błąd podczas inicjowania narzędzi - brak lokalnej domeny\n"

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr "Błąd podczas inicjowania narzędzi\n"

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr "Podano nieprawidłową domenę w FQDN\n"

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr "Wewnętrzny błąd podczas przetwarzania parametrów\n"

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr "Grupy muszą być w tej samej domenie co użytkownik\n"
@@ -583,6 +571,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr "Nie można uzyskać informacji o grupie dla użytkownika\n"

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr "Nie można ustawić domyślnych wartości\n"

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr "Wybrany UID jest spoza dozwolonego zakresu\n"
@@ -621,10 +613,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr "Błąd transakcji. Nie można dodać użytkownika.\n"

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr "GID grupy"

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr "Proszę podać grupę do dodania\n"

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr "Wybrany GID jest spoza dozwolonego zakresu\n"

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr "Nie można przydzielić identyfikatora grupie - czy domena jest pełna?\n"
@@ -637,6 +637,181 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr "Błąd transakcji. Nie można dodać grupy.\n"

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr "Proszę podać grupę do usunięcia\n"

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr "Grupa %s jest poza określonym zakresem identyfikatorów dla domeny\n"

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "Nie ma takiej grupy w lokalnej domenie. Usuwanie grup jest dozwolone tylko w "

+ "lokalnej domenie.\n"

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr "Wewnętrzny błąd. Nie można usunąć grupy.\n"

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr "Grupy, do których dodać tę grupę"

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr "Grupy, z których usunąć tę grupę"

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr "Proszę podać grupę do zmodyfikowania\n"

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ "Nie można odnaleźć grupy w lokalnej domenie, modyfikowanie grup jest "

+ "dozwolone tylko w lokalnej domenie\n"

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr "Członkowie grupy muszą być w tej samej domenie co grupa nadrzędna\n"

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ "Nie można odnaleźć grupy %s w lokalnej domenie, tylko grupy w lokalnej "

+ "domenie są dozwolone\n"

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ "Nie można zmodyfikować grupy - proszę sprawdzić, czy nazwy członków grupy są "

+ "poprawne\n"

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ "Nie można zmodyfikować grupy - proszę sprawdzić, czy nazwa grupy jest "

+ "poprawna\n"

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr "Błąd transakcji. Nie można zmodyfikować grupy.\n"

+ 

+ #: tools/sss_groupshow.c:954

+ #, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr "%s%sGrupa: %s\n"

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr "Prywatne magic "

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr "%sNumer GID: %d\n"

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr "%sUżytkownicy będący członkami: "

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ "\n"

+ "%sJest członkiem: "

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ "\n"

+ "%sGrupy będące członkami: "

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr "Rekursywnie drukuje niebezpośrednich członków grupy"

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr "Proszę podać grupę do wyświetlenia\n"

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr "Nie można zainicjować wyszukiwania\n"

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "Nie ma takiej grupy w lokalnej domenie. Drukowanie grup jest dozwolone tylko "

+ "w lokalnej domenie.\n"

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr "Wewnętrzny błąd. Nie można wydrukować grupy.\n"

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr "Usuwa katalog domowy i bufor poczty"

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr "Nie usuwa katalogu domowego i bufora poczty"

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr "Wymusza usunięcie plików, których właścicielem nie jest użytkownik"

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr "Proszę podać użytkownika do usunięcia\n"

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr ""

+ "Użytkownik %s jest poza określonym zakresem identyfikatorów dla domeny\n"

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr ""

+ "Katalog domowy nie zostanie usunięty - użytkownik nie jest właścicielem\n"

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr "Nie można usunąć katalogu domowego: %s\n"

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ "Nie ma takiego użytkownika w lokalnej domenie. Usuwanie użytkowników jest "

+ "dozwolone tylko w lokalnej domenie.\n"

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr "Wewnętrzny błąd. Nie można usunąć użytkownika.\n"

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr "GID użytkownika"
@@ -685,47 +860,16 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr "Błąd transakcji. Nie można zmodyfikować użytkownika.\n"

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr "Hasła nie zgadzają się"

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr "Uwierzytelnienie w trybie offline"

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

+ msgstr "Brak pamięci\n"

  

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ", hasło w pamięci podręcznej wygaśnie za: "

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

+ msgstr "%s musi zostać uruchomione jako root\n"

  

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

  msgstr ""

- "Uwierzytelnianie w trybie offline, uwierzytelnianie jest zabronione do: "

- 

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

- msgstr "System jest w trybie offline, zmiana hasła nie jest możliwa"

- 

- #: sss_client/pam_sss.c:526

- msgid "Password change failed. "

- msgstr "Zmiana hasła nie powiodła się. "

- 

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

- msgstr "Komunikat serwera: "

- 

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr "Nowe hasło: "

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

- msgstr "Proszę ponownie podać nowe hasło: "

- 

- #: sss_client/pam_sss.c:953

- msgid "Password: "

- msgstr "Hasło: "

- 

- #: sss_client/pam_sss.c:983

- msgid "Current Password: "

- msgstr "Bieżące hasło: "

+ "Wysyła wyjście debugowania do plików, zamiast do standardowego wyjścia błędów"

file modified
+365 -221
@@ -6,7 +6,7 @@

  msgstr ""

  "Project-Id-Version: sssd.master.sss_daemon\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

  "PO-Revision-Date: 2010-02-23 13:59+0100\n"

  "Last-Translator: Rui Gouveia <rui.gouveia@gmail.com>\n"

  "Language-Team: fedora-trans-pt@redhat.com\n"
@@ -15,9 +15,9 @@

  "Content-Transfer-Encoding: 8bit\n"

  "Language: pt\n"

  "Plural-Forms: nplurals=2; plural=(n != 1);\n"

- "X-Generator: Virtaal 0.5.2\n"

  "X-Poedit-Language: Portuguese\n"

  "X-Poedit-Country: PORTUGAL\n"

+ "X-Generator: Virtaal 0.5.2\n"

  

  #: config/SSSDConfig.py:39

  msgid "Set the verbosity of the debug logging"
@@ -162,13 +162,14 @@

  msgid ""

  "Restrict or prefer a specific address family when performing DNS lookups"

  msgstr ""

+ "Restringir ou preferir famílias de endereços especificas quando efectua "

+ "consultas DNS"

  

  #: config/SSSDConfig.py:83

- #, fuzzy

  msgid "How long to keep cached entries after last successful login (days)"

  msgstr ""

  "Durante quanto tempo devem ser permitidas as caches de sessões entre sessões "

- "online (dias)"

+ "bem sucedidas (dias)"

  

  #: config/SSSDConfig.py:86

  msgid "IPA domain"
@@ -182,11 +183,11 @@

  msgid "IPA client hostname"

  msgstr "Nome da máquina do cliente IPA"

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr "Endereço do servidor Kerberos"

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr "Reino Kerberos"

  
@@ -214,323 +215,285 @@

  msgid "The principal of the change password service"

  msgstr "O principal do serviço de alteração de senha"

  

- #: config/SSSDConfig.py:105

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

+ msgstr ""

+ "Servidor onde está em execução o serviço de alteração de senha, se não "

+ "coincide com o KDC"

+ 

+ #: config/SSSDConfig.py:106

  msgid "ldap_uri, The URI of the LDAP server"

  msgstr "ldap_uri, O URI do servidor LDAP"

  

- #: config/SSSDConfig.py:106

+ #: config/SSSDConfig.py:107

  msgid "The default base DN"

  msgstr "A base DN por omissão"

  

- #: config/SSSDConfig.py:107

+ #: config/SSSDConfig.py:108

  msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr "O tipo de Schema em utilização no servidor LDAP, rfc2307"

  

- #: config/SSSDConfig.py:108

+ #: config/SSSDConfig.py:109

  msgid "The default bind DN"

  msgstr "O DN por omissão para a ligação"

  

- #: config/SSSDConfig.py:109

+ #: config/SSSDConfig.py:110

  msgid "The type of the authentication token of the default bind DN"

  msgstr "O tipo de token de autenticação do bind DN por omissão"

  

- #: config/SSSDConfig.py:110

+ #: config/SSSDConfig.py:111

  msgid "The authentication token of the default bind DN"

  msgstr "O token de autenticação do bind DN por omissão"

  

- #: config/SSSDConfig.py:111

+ #: config/SSSDConfig.py:112

  msgid "Length of time to attempt connection"

  msgstr "Período de tempo para tentar ligação"

  

- #: config/SSSDConfig.py:112

+ #: config/SSSDConfig.py:113

  msgid "Length of time to attempt synchronous LDAP operations"

  msgstr "Tempo de espera para tentar operações LDAP síncronas"

  

- #: config/SSSDConfig.py:113

+ #: config/SSSDConfig.py:114

  msgid "Length of time between attempts to reconnect while offline"

  msgstr "Tempo de espera entre tentativas para re-conectar quando desligado"

  

- #: config/SSSDConfig.py:114

+ #: config/SSSDConfig.py:115

  msgid "file that contains CA certificates"

  msgstr "ficheiro que contêm os certificados CA"

  

- #: config/SSSDConfig.py:115

+ #: config/SSSDConfig.py:116

  msgid "Require TLS certificate verification"

  msgstr "Obriga a verificação de certificados TLS"

  

- #: config/SSSDConfig.py:116

+ #: config/SSSDConfig.py:117

  msgid "Specify the sasl mechanism to use"

  msgstr "Especificar mecanismo sasl a utilizar"

  

- #: config/SSSDConfig.py:117

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr "Especifique o id sasl para utilizar na autorização"

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr "Separador chave do serviço Kerberos"

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr "Utilizar autenticação Kerberos para ligações LDAP"

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr "Seguir os referrals LDAP"

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr "Tempo de espera por um pedido de pesquisa"

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr "Período de tempo entre enumeração de actualizações"

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr "Requer TLS para consultas de ID, falso"

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr "DN base para pesquisa de utilizadores"

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr "Âmbito das pesquisas do utilizador"

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr "Filtro para as pesquisas do utilizador"

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr "Objectclass para utilizadores"

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr "Atributo do nome do utilizador"

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr "Atributo UID"

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr "Atributo GID primário"

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr "Atributo GECOS"

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr "Atributo da pasta pessoal"

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr "Atributo da Shell"

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr "Atributo UUID"

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr "Atributo principal do utilizador (para Kerberos)"

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr "Nome Completo"

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr "Atributo memberOf"

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr "Atributo da alteração da data"

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr "Politica para avaliar a expiração da senha"

  

- #: config/SSSDConfig.py:148

+ #: config/SSSDConfig.py:149

+ msgid "Comma separated list of allowed users"

+ msgstr "Lista de utilizadores autorizados separados por vírgulas"

+ 

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

+ msgstr "Lista de utilizadores não autorizados separados por vírgulas"

+ 

+ #: config/SSSDConfig.py:153

  msgid "Default shell, /bin/bash"

  msgstr "Shell pré-definida, /bin/bash"

  

- #: config/SSSDConfig.py:149

+ #: config/SSSDConfig.py:154

  msgid "Base for home directories"

  msgstr "Directório base para as pastas pessoais"

  

- #: config/SSSDConfig.py:152

+ #: config/SSSDConfig.py:157

  msgid "The name of the NSS library to use"

  msgstr "O nome da biblioteca NSS a utilizar"

  

- #: config/SSSDConfig.py:155

+ #: config/SSSDConfig.py:160

  msgid "PAM stack to use"

  msgstr "Stack PAM a utilizar"

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

- msgstr "O nível de depuração a utilizar durante a execução"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

+ msgstr "Tornar-se num serviço (omissão)"

  

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

- msgstr "Erro ao definir a configuração regional\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

+ msgstr "Executar interactivamente (não como serviço)"

  

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

- msgstr "Especifique grupo a remover\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

+ msgstr "Especificar um ficheiro de configuração não standard"

  

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

- msgid "Error initializing the tools - no local domain\n"

- msgstr "Erro ao inicializar as ferramentas - não existe domínio local\n"

- 

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

- msgstr "Erro ao inicializar a ferramenta\n"

- 

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

- msgstr "Domínio inválido especificado no FQDN\n"

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

+ msgstr "sssd tem de executar como root\n"

  

- #: tools/sss_groupdel.c:107

- #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

- msgstr "O grupo %s está fora do intervalo de IDs para o domínio\n"

- 

- #: tools/sss_groupdel.c:136

+ #: monitor/monitor.c:2252

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

  msgstr ""

- "Grupo não existe no domínio local. Apenas é permitido remover grupos no "

- "domínio local.\n"

- 

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr "Erro interno. Incapaz de remover grupo.\n"

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

- msgstr "Grupos para adicionar este grupo"

+ "foi detectado um socket nscd. As capacidades de caching do nscd podem entrar "

+ "em conflito com o SSSD. Não é recomendado executar o nscd em paralelo com o "

+ "SSSD\n"

  

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

- msgstr "Grupos para remover este projecto"

- 

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr "O GID do grupo"

- 

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

- msgstr "Especifique grupo a modificar\n"

- 

- #: tools/sss_groupmod.c:130

+ #: monitor/monitor.c:2262

+ #, c-format

  msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

- "Grupo não foi encontrado no domínio local. Apenas é permitido modificar "

- "grupos no domínio local\n"

+ "Incapaz de ler o ficheiro de configuração %s. Por favor, verifique se as "

+ "permissões são 0600 e se o ficheiro pertence a root.root\n"

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

- msgstr "Erro interno ao processar parâmetros\n"

- 

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

- msgstr "Grupos membro têm de estar no mesmo domínio do grupo pai\n"

- 

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

  msgstr ""

- "Grupo %s não foi encontrado no domínio local. Apenas são permitidos grupos "

- "no domínio local\n"

  

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

- msgstr "O GID seleccionado está fora do intervalo permitido\n"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

+ msgstr "Nível de depuração"

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

- msgstr ""

- "Incapaz de modificar grupo - verifique que o nome do grupo membro está "

- "correcto\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

+ msgstr "Adicionar tempos na depuração"

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

- msgstr ""

- "Incapaz de modificar grupo - verifique que o nome do grupo está correcto\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ msgid "An open file descriptor for the debug logs"

+ msgstr "Um descritor de ficheiro aberto para os registos de depuração"

  

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

- msgstr "Erro de transacção. Não foi possível modificar o grupo.\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

+ msgstr "Domínio do fornecedor de informação (obrigatório)"

  

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

- msgstr "Remover pasta pessoal e spool de correio"

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "Senhas não coincidem"

  

- #: tools/sss_userdel.c:47

- msgid "Do not remove home directory and mail spool"

- msgstr "Não remover pasta pessoal e spool de correio"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

+ msgstr "Autenticação offline"

  

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

- msgstr "Forçar a remoção de ficheiros não pertencentes ao utilizador"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

+ msgstr ", a sua senha guardada em cache irá expirar em: "

  

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

- msgstr "Especificar o utilizador a remover\n"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

+ msgstr "Autenticação offline, a autenticação é negada até: "

  

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

- msgstr "Incapaz de definir valores por omissão\n"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

+ msgstr "O sistema está offline, a mudança de senha não é possível"

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

- msgstr "O utilizador %s está fora do intervalo de IDs para o domínio\n"

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ msgid "Password change failed. "

+ msgstr "Alteração da senha falhou."

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

- msgstr "Pasta pessoal não removida - não pertence ao utilizador\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

+ msgstr "Mensagem do Servidor: "

  

- #: tools/sss_userdel.c:174

- #, c-format

- msgid "Cannot remove homedir: %s\n"

- msgstr "Incapaz de remover pasta pessoal: %s\n"

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "Nova Senha: "

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

- msgstr ""

- "Utilizador não existe no domínio local. Apenas é permitido remover "

- "utilizadores no domínio local.\n"

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "Digite a senha novamente: "

  

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

- msgstr "Erro interno. Incapaz de remover utilizador.\n"

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "Senha: "

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

- msgstr "Memória esgotada\n"

+ #: sss_client/pam_sss.c:1006

+ msgid "Current Password: "

+ msgstr "Senha actual: "

  

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

- msgstr "%s tem de executar como root\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

+ msgstr "A senha expirou. Altere a sua senha agora."

+ 

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

+ msgstr "O nível de depuração a utilizar durante a execução"

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47

  msgid "The UID of the user"
@@ -568,10 +531,39 @@

  msgid "Specify an alternative skeleton directory"

  msgstr "Indique um directório skeleton alternativo"

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr "Erro ao definir a configuração regional\n"

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr "Indique utilizador a adicionar\n"

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr "Erro ao inicializar as ferramentas - não existe domínio local\n"

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr "Erro ao inicializar as ferramentas\n"

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr "Domínio inválido especificado no FQDN\n"

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr "Erro interno ao processar parâmetros\n"

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr "Os grupos têm de pertencer ao mesmo domínio que o utilizador\n"
@@ -585,6 +577,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr "Incapaz de obter informação do grupo para o utilizador\n"

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr "Incapaz de definir valores por omissão\n"

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr "O UID seleccionado está fora do intervalo permitido\n"
@@ -620,10 +616,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr "Erro na transacção. Não foi possível adicionar o utilizador.\n"

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr "O GID do grupo"

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr "Indique grupo a adicionar\n"

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr "O GID seleccionado está fora do intervalo permitido\n"

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr "Incapaz de alocar um ID para o grupo - domínio cheio?\n"
@@ -636,6 +640,178 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr "Erro de transacção. Não foi possível adicionar o grupo.\n"

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr "Especifique grupo a remover\n"

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr "O grupo %s está fora do intervalo de IDs para o domínio\n"

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "Grupo não existe no domínio local. Apenas é permitido remover grupos no "

+ "domínio local.\n"

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr "Erro interno. Incapaz de remover grupo.\n"

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr "Grupos para adicionar este grupo"

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr "Grupos para remover este projecto"

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr "Especifique grupo a modificar\n"

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ "Grupo não foi encontrado no domínio local. Apenas é permitido modificar "

+ "grupos no domínio local\n"

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr "Grupos membro têm de estar no mesmo domínio do grupo pai\n"

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ "Grupo %s não foi encontrado no domínio local. Apenas são permitidos grupos "

+ "no domínio local\n"

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ "Incapaz de modificar grupo - verifique que o nome do grupo membro está "

+ "correcto\n"

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ "Incapaz de modificar grupo - verifique que o nome do grupo está correcto\n"

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr "Erro de transacção. Não foi possível modificar o grupo.\n"

+ 

+ #: tools/sss_groupshow.c:954

+ #, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr "%s%sGrupo: %s\n"

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr "\"Magic\" Privada"

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr "%sNúmero GID: %d\n"

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr "%sUtilizadores Membros: "

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ "\n"

+ "%sIs um membro de: "

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ "\n"

+ "%sGrupos Membros: "

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr "Imprimir membros de grupos indirectos recursivamente"

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr "Especifique grupo a apresentar\n"

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr "Incapaz de iniciar pesquisa\n"

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "Grupo não existe no domínio local. Grupos de impressão apenas permitidos no "

+ "domínio local.\n"

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr "Erro interno. Incapaz de imprimir grupo.\n"

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr "Remover pasta pessoal e spool de correio"

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr "Não remover pasta pessoal e spool de correio"

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr "Forçar a remoção de ficheiros não pertencentes ao utilizador"

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr "Especificar o utilizador a remover\n"

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr "O utilizador %s está fora do intervalo de IDs para o domínio\n"

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr "Pasta pessoal não removida - não pertence ao utilizador\n"

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr "Incapaz de remover pasta pessoal: %s\n"

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ "Utilizador não existe no domínio local. Apenas é permitido remover "

+ "utilizadores no domínio local.\n"

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr "Erro interno. Incapaz de remover utilizador.\n"

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr "O GID do utilizador"
@@ -682,50 +858,18 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr "Erro na transacção. Não foi possível modificar o utilizador.\n"

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr "Senhas não coincidem"

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr "Autenticação offline"

- 

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ", a sua senha guardada em cache irá expirar em: "

- 

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

- msgstr "Autenticação offline, a autenticação é negada até: "

- 

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

- msgstr "O sistema está offline, a mudança de senha não é possível"

- 

- #: sss_client/pam_sss.c:526

- msgid "Password change failed. "

- msgstr "Alteração da senha falhou."

- 

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

- msgstr "Mensagem do Servidor: "

- 

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr "Nova Senha: "

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

- msgstr "Digite a senha novamente: "

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

+ msgstr "Memória esgotada\n"

  

- #: sss_client/pam_sss.c:953

- msgid "Password: "

- msgstr "Senha: "

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

+ msgstr "%s tem de executar como root\n"

  

- #: sss_client/pam_sss.c:983

- #, fuzzy

- msgid "Current Password: "

- msgstr "Nova Senha: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

+ msgstr "Enviar o resultado de depuração para ficheiro em vez do stderr"

  

  #~ msgid "Password has expired."

  #~ msgstr "Senha expirou."

file modified
+311 -180
@@ -8,7 +8,7 @@

  msgstr ""

  "Project-Id-Version: PACKAGE VERSION\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"

  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"

  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -171,11 +171,11 @@

  msgid "IPA client hostname"

  msgstr ""

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr ""

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr ""

  
@@ -203,311 +203,277 @@

  msgid "The principal of the change password service"

  msgstr ""

  

- #: config/SSSDConfig.py:105

- msgid "ldap_uri, The URI of the LDAP server"

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

  msgstr ""

  

  #: config/SSSDConfig.py:106

- msgid "The default base DN"

+ msgid "ldap_uri, The URI of the LDAP server"

  msgstr ""

  

  #: config/SSSDConfig.py:107

- msgid "The Schema Type in use on the LDAP server, rfc2307"

+ msgid "The default base DN"

  msgstr ""

  

  #: config/SSSDConfig.py:108

- msgid "The default bind DN"

+ msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr ""

  

  #: config/SSSDConfig.py:109

- msgid "The type of the authentication token of the default bind DN"

+ msgid "The default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:110

- msgid "The authentication token of the default bind DN"

+ msgid "The type of the authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:111

- msgid "Length of time to attempt connection"

+ msgid "The authentication token of the default bind DN"

  msgstr ""

  

  #: config/SSSDConfig.py:112

- msgid "Length of time to attempt synchronous LDAP operations"

+ msgid "Length of time to attempt connection"

  msgstr ""

  

  #: config/SSSDConfig.py:113

- msgid "Length of time between attempts to reconnect while offline"

+ msgid "Length of time to attempt synchronous LDAP operations"

  msgstr ""

  

  #: config/SSSDConfig.py:114

- msgid "file that contains CA certificates"

+ msgid "Length of time between attempts to reconnect while offline"

  msgstr ""

  

  #: config/SSSDConfig.py:115

- msgid "Require TLS certificate verification"

+ msgid "file that contains CA certificates"

  msgstr ""

  

  #: config/SSSDConfig.py:116

- msgid "Specify the sasl mechanism to use"

+ msgid "Require TLS certificate verification"

  msgstr ""

  

  #: config/SSSDConfig.py:117

+ msgid "Specify the sasl mechanism to use"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr ""

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr ""

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr ""

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr ""

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr ""

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr ""

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr ""

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr ""

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr ""

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr ""

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr ""

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr ""

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr ""

  

- #: config/SSSDConfig.py:148

- msgid "Default shell, /bin/bash"

- msgstr ""

- 

  #: config/SSSDConfig.py:149

- msgid "Base for home directories"

+ msgid "Comma separated list of allowed users"

  msgstr ""

  

- #: config/SSSDConfig.py:152

- msgid "The name of the NSS library to use"

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

  msgstr ""

  

- #: config/SSSDConfig.py:155

- msgid "PAM stack to use"

+ #: config/SSSDConfig.py:153

+ msgid "Default shell, /bin/bash"

  msgstr ""

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

+ #: config/SSSDConfig.py:154

+ msgid "Base for home directories"

  msgstr ""

  

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

+ #: config/SSSDConfig.py:157

+ msgid "The name of the NSS library to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

+ #: config/SSSDConfig.py:160

+ msgid "PAM stack to use"

  msgstr ""

  

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

- msgid "Error initializing the tools - no local domain\n"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

  msgstr ""

  

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

  msgstr ""

  

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

  msgstr ""

  

- #: tools/sss_groupdel.c:107

- #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

  msgstr ""

  

- #: tools/sss_groupdel.c:136

+ #: monitor/monitor.c:2252

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

- msgstr ""

- 

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

- msgstr ""

- 

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr ""

- 

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:130

+ #: monitor/monitor.c:2262

+ #, c-format

  msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

  msgstr ""

  

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

  msgstr ""

  

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

- msgstr ""

- 

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

  msgstr ""

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ msgid "An open file descriptor for the debug logs"

  msgstr ""

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

  msgstr ""

  

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

  msgstr ""

  

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

  msgstr ""

  

- #: tools/sss_userdel.c:47

- msgid "Do not remove home directory and mail spool"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

  msgstr ""

  

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

  msgstr ""

  

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

  msgstr ""

  

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ msgid "Password change failed. "

  msgstr ""

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

  msgstr ""

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

  msgstr ""

  

- #: tools/sss_userdel.c:174

- #, c-format

- msgid "Cannot remove homedir: %s\n"

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

  msgstr ""

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

  msgstr ""

  

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

+ #: sss_client/pam_sss.c:1006

+ msgid "Current Password: "

  msgstr ""

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

  msgstr ""

  

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

  msgstr ""

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47
@@ -546,10 +512,39 @@

  msgid "Specify an alternative skeleton directory"

  msgstr ""

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr ""

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr ""
@@ -563,6 +558,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr ""

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr ""

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr ""
@@ -597,10 +596,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr ""

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr ""

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr ""
@@ -613,6 +620,161 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr ""

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:954

+ #, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr ""

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr ""
@@ -655,46 +817,15 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr ""

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr ""

- 

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

- msgstr ""

- 

- #: sss_client/pam_sss.c:526

- msgid "Password change failed. "

- msgstr ""

- 

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:953

- msgid "Password: "

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

  msgstr ""

  

- #: sss_client/pam_sss.c:983

- msgid "Current Password: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

  msgstr ""

file modified
+353 -214
@@ -8,7 +8,7 @@

  msgstr ""

  "Project-Id-Version: sss_server\n"

  "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

- "POT-Creation-Date: 2010-02-25 11:08-0500\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

  "PO-Revision-Date: 2009-12-30 17:58+0100\n"

  "Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"

  "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@@ -174,11 +174,11 @@

  msgid "IPA client hostname"

  msgstr "IPA-klienvärdnamn"

  

- #: config/SSSDConfig.py:91 config/SSSDConfig.py:118

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

  msgid "Kerberos server address"

  msgstr "Kerberosserveradress"

  

- #: config/SSSDConfig.py:92 config/SSSDConfig.py:119

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

  msgid "Kerberos realm"

  msgstr "Kerberosrike"

  
@@ -206,324 +206,282 @@

  msgid "The principal of the change password service"

  msgstr "Huvudmannen för tjänsten att ändra lösenord"

  

- #: config/SSSDConfig.py:105

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:106

  msgid "ldap_uri, The URI of the LDAP server"

  msgstr "ldap_uri, URI:n för LDAP-servern"

  

- #: config/SSSDConfig.py:106

+ #: config/SSSDConfig.py:107

  msgid "The default base DN"

  msgstr "Standard bas-DN"

  

- #: config/SSSDConfig.py:107

+ #: config/SSSDConfig.py:108

  msgid "The Schema Type in use on the LDAP server, rfc2307"

  msgstr "Schematypen som används i LDAP-servern, rfc2307"

  

- #: config/SSSDConfig.py:108

+ #: config/SSSDConfig.py:109

  msgid "The default bind DN"

  msgstr "Standard bindnings-DN"

  

- #: config/SSSDConfig.py:109

+ #: config/SSSDConfig.py:110

  msgid "The type of the authentication token of the default bind DN"

  msgstr "Typen på autenticerings-token för standard bindnings-DN"

  

- #: config/SSSDConfig.py:110

+ #: config/SSSDConfig.py:111

  msgid "The authentication token of the default bind DN"

  msgstr "Autenticerings-token för standard bindnings-DN"

  

- #: config/SSSDConfig.py:111

+ #: config/SSSDConfig.py:112

  msgid "Length of time to attempt connection"

  msgstr "Tidslängd att försöka ansluta"

  

- #: config/SSSDConfig.py:112

+ #: config/SSSDConfig.py:113

  msgid "Length of time to attempt synchronous LDAP operations"

  msgstr "Tidslängd att försök synkrona LDAP-operationer"

  

- #: config/SSSDConfig.py:113

+ #: config/SSSDConfig.py:114

  msgid "Length of time between attempts to reconnect while offline"

  msgstr "Tidslängd mellan försök att återansluta under frånkoppling"

  

- #: config/SSSDConfig.py:114

+ #: config/SSSDConfig.py:115

  msgid "file that contains CA certificates"

  msgstr "fil som innehåller CA-certifikat"

  

- #: config/SSSDConfig.py:115

+ #: config/SSSDConfig.py:116

  msgid "Require TLS certificate verification"

  msgstr "Kräv TLS-certifikatverifiering"

  

- #: config/SSSDConfig.py:116

+ #: config/SSSDConfig.py:117

  msgid "Specify the sasl mechanism to use"

  msgstr "Ange sasl-mekanismen att använda"

  

- #: config/SSSDConfig.py:117

+ #: config/SSSDConfig.py:118

  msgid "Specify the sasl authorization id to use"

  msgstr "Ange sasl-auktorisering-id att använda"

  

- #: config/SSSDConfig.py:120

+ #: config/SSSDConfig.py:121

  msgid "Kerberos service keytab"

  msgstr "Kerberostjänstens nyckeltabell"

  

- #: config/SSSDConfig.py:121

+ #: config/SSSDConfig.py:122

  msgid "Use Kerberos auth for LDAP connection"

  msgstr "Avnänd Kerberosautenticering för LDAP-anslutning"

  

- #: config/SSSDConfig.py:122

+ #: config/SSSDConfig.py:123

  msgid "Follow LDAP referrals"

  msgstr ""

  

- #: config/SSSDConfig.py:125

+ #: config/SSSDConfig.py:126

  msgid "Length of time to wait for a search request"

  msgstr "Tidslängd att vänta på en sökbegäran"

  

- #: config/SSSDConfig.py:126

+ #: config/SSSDConfig.py:127

  msgid "Length of time between enumeration updates"

  msgstr "Tidslängd mellan uppräkningsuppdateringar"

  

- #: config/SSSDConfig.py:127

+ #: config/SSSDConfig.py:128

  msgid "Require TLS for ID lookups, false"

  msgstr "Kräv TLS för ID-uppslagningar, falsk"

  

- #: config/SSSDConfig.py:128

+ #: config/SSSDConfig.py:129

  msgid "Base DN for user lookups"

  msgstr "Bas-DN för användaruppslagningar"

  

- #: config/SSSDConfig.py:129

+ #: config/SSSDConfig.py:130

  msgid "Scope of user lookups"

  msgstr "Omfång av användaruppslagningar"

  

- #: config/SSSDConfig.py:130

+ #: config/SSSDConfig.py:131

  msgid "Filter for user lookups"

  msgstr "Filter för användaruppslagningar"

  

- #: config/SSSDConfig.py:131

+ #: config/SSSDConfig.py:132

  msgid "Objectclass for users"

  msgstr "Objektklass för användare"

  

- #: config/SSSDConfig.py:132

+ #: config/SSSDConfig.py:133

  msgid "Username attribute"

  msgstr "Användarnamnsattribut"

  

- #: config/SSSDConfig.py:133

+ #: config/SSSDConfig.py:134

  msgid "UID attribute"

  msgstr "UID-attribut"

  

- #: config/SSSDConfig.py:134

+ #: config/SSSDConfig.py:135

  msgid "Primary GID attribute"

  msgstr "Primärt GID-attribut"

  

- #: config/SSSDConfig.py:135

+ #: config/SSSDConfig.py:136

  msgid "GECOS attribute"

  msgstr "GECOS-attribut"

  

- #: config/SSSDConfig.py:136

+ #: config/SSSDConfig.py:137

  msgid "Home directory attribute"

  msgstr "Hemkatalogattribut"

  

- #: config/SSSDConfig.py:137

+ #: config/SSSDConfig.py:138

  msgid "Shell attribute"

  msgstr "Skalattribut"

  

- #: config/SSSDConfig.py:138

+ #: config/SSSDConfig.py:139

  msgid "UUID attribute"

  msgstr "UUID-attribut"

  

- #: config/SSSDConfig.py:139

+ #: config/SSSDConfig.py:140

  msgid "User principal attribute (for Kerberos)"

  msgstr "Användarens huvudmansattribut (för Kerberos)"

  

- #: config/SSSDConfig.py:140

+ #: config/SSSDConfig.py:141

  msgid "Full Name"

  msgstr "Fullständigt namn"

  

- #: config/SSSDConfig.py:141

+ #: config/SSSDConfig.py:142

  msgid "memberOf attribute"

  msgstr "medlemAv-attribut"

  

- #: config/SSSDConfig.py:142

+ #: config/SSSDConfig.py:143

  msgid "Modification time attribute"

  msgstr "Modifieringstidsattribut"

  

- #: config/SSSDConfig.py:145

+ #: config/SSSDConfig.py:146

  msgid "Policy to evaluate the password expiration"

  msgstr "Policy för att utvärdera utgång av lösenord"

  

- #: config/SSSDConfig.py:148

+ #: config/SSSDConfig.py:149

+ msgid "Comma separated list of allowed users"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:153

  msgid "Default shell, /bin/bash"

  msgstr "Standardskal, /bin/bash"

  

- #: config/SSSDConfig.py:149

+ #: config/SSSDConfig.py:154

  msgid "Base for home directories"

  msgstr "Bas för hemkataloger"

  

- #: config/SSSDConfig.py:152

+ #: config/SSSDConfig.py:157

  msgid "The name of the NSS library to use"

  msgstr "Namnet på NSS-biblioteket att använda"

  

- #: config/SSSDConfig.py:155

+ #: config/SSSDConfig.py:160

  msgid "PAM stack to use"

  msgstr "PAM-stack att använda"

  

- #: tools/sss_groupdel.c:43 tools/sss_groupmod.c:42 tools/sss_userdel.c:45

- #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_usermod.c:46

- msgid "The debug level to run with"

- msgstr "Felsökningsnivå att köra med"

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

+ msgstr ""

  

- #: tools/sss_groupdel.c:52 tools/sss_groupmod.c:63 tools/sss_userdel.c:57

- #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_usermod.c:70

- msgid "Error setting the locale\n"

- msgstr "Fel när lokalen sattes\n"

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

+ msgstr ""

  

- #: tools/sss_groupdel.c:70

- msgid "Specify group to delete\n"

- msgstr "Ange grupp att ta bort\n"

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

+ msgstr ""

  

- #: tools/sss_groupdel.c:81 tools/sss_groupmod.c:111 tools/sss_userdel.c:102

- #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_usermod.c:126

+ #: monitor/monitor.c:2217

  #, fuzzy

- msgid "Error initializing the tools - no local domain\n"

- msgstr "Fel vid initiering av verktygen\n"

- 

- #: tools/sss_groupdel.c:83 tools/sss_groupmod.c:113 tools/sss_userdel.c:104

- #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_usermod.c:128

- msgid "Error initializing the tools\n"

- msgstr "Fel vid initiering av verktygen\n"

+ msgid "sssd must be run as root\n"

+ msgstr "%s måste köras som root\n"

  

- #: tools/sss_groupdel.c:92 tools/sss_groupmod.c:121 tools/sss_userdel.c:113

- #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_usermod.c:137

- msgid "Invalid domain specified in FQDN\n"

- msgstr "Ogiltig domän angiven i FQDN\n"

+ #: monitor/monitor.c:2252

+ msgid ""

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

+ msgstr ""

  

- #: tools/sss_groupdel.c:107

+ #: monitor/monitor.c:2262

  #, c-format

- msgid "Group %s is outside the defined ID range for domain\n"

- msgstr "Grupp %s är utanför det definierade ID-intervallet för domänen\n"

- 

- #: tools/sss_groupdel.c:136

  msgid ""

- "No such group in local domain. Removing groups only allowed in local "

- "domain.\n"

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

  msgstr ""

- "Ingen sådan grupp i den lokala domänen.  Att ta bort grupper är endast "

- "tillåtet i den lokala domänen.\n"

- 

- #: tools/sss_groupdel.c:141

- msgid "Internal error. Could not remove group.\n"

- msgstr "Internt fel.  Det gick inte att ta bort gruppen.\n"

- 

- #: tools/sss_groupmod.c:44

- msgid "Groups to add this group to"

- msgstr "Grupper att lägga till denna grupp till"

- 

- #: tools/sss_groupmod.c:46

- msgid "Groups to remove this group from"

- msgstr "Grupper att ta bort denna grupp från"

  

- #: tools/sss_groupmod.c:48 tools/sss_groupadd.c:43

- msgid "The GID of the group"

- msgstr "GID:t för gruppen"

- 

- #: tools/sss_groupmod.c:98

- msgid "Specify group to modify\n"

- msgstr "Ange grupp att ändra\n"

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

+ msgstr ""

  

- #: tools/sss_groupmod.c:130

- msgid ""

- "Cannot find group in local domain, modifying groups is allowed only in local "

- "domain\n"

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

  msgstr ""

- "Ken inte hitta gruppen i den lokala domänen, att ändra grupper är endast "

- "tillåtet i den lokala domänen\n"

  

- #: tools/sss_groupmod.c:143 tools/sss_groupmod.c:170 tools/sss_useradd.c:203

- #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

- msgid "Internal error while parsing parameters\n"

- msgstr "Internt fel vid tolkning av parametrar\n"

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

+ msgstr ""

  

- #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

- msgid "Member groups must be in the same domain as parent group\n"

- msgstr "Medlemsgrupper måster ligga i samma domän som föräldragrupper\n"

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ #, fuzzy

+ msgid "An open file descriptor for the debug logs"

+ msgstr "Ange pratsamhet för felsökningsloggning"

  

- #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

- #: tools/sss_usermod.c:205

- #, c-format

- msgid ""

- "Cannot find group %s in local domain, only groups in local domain are "

- "allowed\n"

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

  msgstr ""

- "Kan inte hitta grupp %s i den lokala domänen, endast grupper i den lokala "

- "domänen är tillåtna\n"

  

- #: tools/sss_groupmod.c:194 tools/sss_groupadd.c:106

- msgid "The selected GID is outside the allowed range\n"

- msgstr "Den valda GID:n är utanför det tillåtna intervallet\n"

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "Lösenorden stämmer inte överens"

  

- #: tools/sss_groupmod.c:222

- msgid "Could not modify group - check if member group names are correct\n"

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

  msgstr ""

- "Det gick inte att ändra gruppen - kontrollera om medlemsgruppsnamnen är "

- "riktiga\n"

  

- #: tools/sss_groupmod.c:226

- msgid "Could not modify group - check if groupname is correct\n"

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

  msgstr ""

- "Det gick inte att ändra gruppen - kontrollera om gruppnamnet är riktigt\n"

  

- #: tools/sss_groupmod.c:230

- msgid "Transaction error. Could not modify group.\n"

- msgstr "Transaktionsfel.  Det gick inte att ändra gruppen.\n"

- 

- #: tools/sss_userdel.c:46

- msgid "Remove home directory and mail spool"

- msgstr "Ta bort hemkatalog och brevlåda"

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

+ msgstr ""

  

- #: tools/sss_userdel.c:47

- msgid "Do not remove home directory and mail spool"

- msgstr "Ta inte bort hemkatalog och brevlåda"

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

+ msgstr ""

  

- #: tools/sss_userdel.c:48

- msgid "Force removal of files not owned by the user"

- msgstr "Framtvinga borttagning av filer som inte ägs av användaren"

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ #, fuzzy

+ msgid "Password change failed. "

+ msgstr "Leverantör av lösenordsändringar"

  

- #: tools/sss_userdel.c:91

- msgid "Specify user to delete\n"

- msgstr "Ange användare att ta bort\n"

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

+ msgstr ""

  

- #: tools/sss_userdel.c:123 tools/sss_useradd.c:244

- msgid "Cannot set default values\n"

- msgstr "Kan inte sätta standardvärden\n"

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "Nytt lösenord: "

  

- #: tools/sss_userdel.c:141

- #, c-format

- msgid "User %s is outside the defined ID range for domain\n"

- msgstr "Användare %s är utanför det definierade ID-intervallet för domänen\n"

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "Skriv det nya lösenordet igen: "

  

- #: tools/sss_userdel.c:172

- msgid "Not removing home dir - not owned by user\n"

- msgstr "Tar inte bort hemkatalogen - ägs inte av användaren\n"

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "Lösenord: "

  

- #: tools/sss_userdel.c:174

- #, c-format

- msgid "Cannot remove homedir: %s\n"

- msgstr "Kan inte ta bort hemkatalogen: %s\n"

+ #: sss_client/pam_sss.c:1006

+ #, fuzzy

+ msgid "Current Password: "

+ msgstr "Nytt lösenord: "

  

- #: tools/sss_userdel.c:186

- msgid ""

- "No such user in local domain. Removing users only allowed in local domain.\n"

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

  msgstr ""

- "Ingen sådan användare i den lokala domänen.  Det går endast att ta bort "

- "användare i den lokala domänen.\n"

- 

- #: tools/sss_userdel.c:191

- msgid "Internal error. Could not remove user.\n"

- msgstr "Internt fel.  Det gick inte att ta bort användaren.\n"

  

- #: tools/tools_util.c:292

- msgid "Out of memory\n"

- msgstr "Slut på minne\n"

- 

- #: tools/tools_util.h:34

- #, c-format

- msgid "%s must be run as root\n"

- msgstr "%s måste köras som root\n"

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

+ msgstr "Felsökningsnivå att köra med"

  

  #: tools/sss_useradd.c:115 tools/sss_usermod.c:47

  msgid "The UID of the user"
@@ -561,10 +519,40 @@

  msgid "Specify an alternative skeleton directory"

  msgstr "Ange en alternativ skelettkatalog"

  

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr "Fel när lokalen sattes\n"

+ 

  #: tools/sss_useradd.c:172

  msgid "Specify user to add\n"

  msgstr "Ange en användare att lägga till\n"

  

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ #, fuzzy

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr "Fel vid initiering av verktygen\n"

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr "Fel vid initiering av verktygen\n"

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr "Ogiltig domän angiven i FQDN\n"

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr "Internt fel vid tolkning av parametrar\n"

+ 

  #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

  msgid "Groups must be in the same domain as user\n"

  msgstr "Grupper måste finnas i samma domän som användaren\n"
@@ -578,6 +566,10 @@

  msgid "Cannot get group information for the user\n"

  msgstr "Kan inte få gruppinformation för användaren\n"

  

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr "Kan inte sätta standardvärden\n"

+ 

  #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

  msgid "The selected UID is outside the allowed range\n"

  msgstr "Den valda UID:n är utanför det tillåtna intervallet\n"
@@ -614,10 +606,18 @@

  msgid "Transaction error. Could not add user.\n"

  msgstr "Transaktionsfel.  Det gick inte att lägga till användaren.\n"

  

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr "GID:t för gruppen"

+ 

  #: tools/sss_groupadd.c:75

  msgid "Specify group to add\n"

  msgstr "Ange en grupp att lägga till\n"

  

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr "Den valda GID:n är utanför det tillåtna intervallet\n"

+ 

  #: tools/sss_groupadd.c:133

  msgid "Could not allocate ID for the group - domain full?\n"

  msgstr "Det gick inte att allokera ID för gruppen - full domän?\n"
@@ -630,6 +630,178 @@

  msgid "Transaction error. Could not add group.\n"

  msgstr "Transaktionsfel.  Det gick inte att lägga till gruppen.\n"

  

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr "Ange grupp att ta bort\n"

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr "Grupp %s är utanför det definierade ID-intervallet för domänen\n"

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "Ingen sådan grupp i den lokala domänen.  Att ta bort grupper är endast "

+ "tillåtet i den lokala domänen.\n"

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr "Internt fel.  Det gick inte att ta bort gruppen.\n"

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr "Grupper att lägga till denna grupp till"

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr "Grupper att ta bort denna grupp från"

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr "Ange grupp att ändra\n"

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ "Ken inte hitta gruppen i den lokala domänen, att ändra grupper är endast "

+ "tillåtet i den lokala domänen\n"

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr "Medlemsgrupper måster ligga i samma domän som föräldragrupper\n"

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ "Kan inte hitta grupp %s i den lokala domänen, endast grupper i den lokala "

+ "domänen är tillåtna\n"

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ "Det gick inte att ändra gruppen - kontrollera om medlemsgruppsnamnen är "

+ "riktiga\n"

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ "Det gick inte att ändra gruppen - kontrollera om gruppnamnet är riktigt\n"

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr "Transaktionsfel.  Det gick inte att ändra gruppen.\n"

+ 

+ #: tools/sss_groupshow.c:954

+ #, fuzzy, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr "Grupper"

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr ""

+ 

+ #: tools/sss_groupshow.c:1045

+ #, fuzzy

+ msgid "Specify group to show\n"

+ msgstr "Ange en grupp att lägga till\n"

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ #, fuzzy

+ msgid "Cannot initiate search\n"

+ msgstr "Kan inte få information om användaren\n"

+ 

+ #: tools/sss_groupshow.c:1115

+ #, fuzzy

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "Ingen sådan grupp i den lokala domänen.  Att ta bort grupper är endast "

+ "tillåtet i den lokala domänen.\n"

+ 

+ #: tools/sss_groupshow.c:1120

+ #, fuzzy

+ msgid "Internal error. Could not print group.\n"

+ msgstr "Internt fel.  Det gick inte att ta bort gruppen.\n"

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr "Ta bort hemkatalog och brevlåda"

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr "Ta inte bort hemkatalog och brevlåda"

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr "Framtvinga borttagning av filer som inte ägs av användaren"

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr "Ange användare att ta bort\n"

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr "Användare %s är utanför det definierade ID-intervallet för domänen\n"

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr "Tar inte bort hemkatalogen - ägs inte av användaren\n"

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr "Kan inte ta bort hemkatalogen: %s\n"

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ "Ingen sådan användare i den lokala domänen.  Det går endast att ta bort "

+ "användare i den lokala domänen.\n"

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr "Internt fel.  Det gick inte att ta bort användaren.\n"

+ 

  #: tools/sss_usermod.c:48

  msgid "The GID of the user"

  msgstr "Användarens GID"
@@ -676,51 +848,18 @@

  msgid "Transaction error. Could not modify user.\n"

  msgstr "Transaktionsfel.  Det gick inte att ändra användaren.\n"

  

- #: sss_client/pam_sss.c:349

- msgid "Passwords do not match"

- msgstr "Lösenorden stämmer inte överens"

- 

- #: sss_client/pam_sss.c:418

- msgid "Offline authentication"

- msgstr ""

- 

- #: sss_client/pam_sss.c:419

- msgid ", your cached password will expire at: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:469

- msgid "Offline authentication, authentication is denied until: "

- msgstr ""

- 

- #: sss_client/pam_sss.c:496

- msgid "System is offline, password change not possible"

- msgstr ""

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

+ msgstr "Slut på minne\n"

  

- #: sss_client/pam_sss.c:526

- #, fuzzy

- msgid "Password change failed. "

- msgstr "Leverantör av lösenordsändringar"

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

+ msgstr "%s måste köras som root\n"

  

- #: sss_client/pam_sss.c:527

- msgid "Server message: "

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

  msgstr ""

  

- #: sss_client/pam_sss.c:894

- msgid "New Password: "

- msgstr "Nytt lösenord: "

- 

- #: sss_client/pam_sss.c:895

- msgid "Reenter new Password: "

- msgstr "Skriv det nya lösenordet igen: "

- 

- #: sss_client/pam_sss.c:953

- msgid "Password: "

- msgstr "Lösenord: "

- 

- #: sss_client/pam_sss.c:983

- #, fuzzy

- msgid "Current Password: "

- msgstr "Nytt lösenord: "

- 

  #~ msgid "Password has expired."

  #~ msgstr "Lösenordet har gått ut."

file added
+880
@@ -0,0 +1,880 @@

+ # Copyright (C) YEAR Red Hat, Inc.

+ # This file is distributed under the same license as the PACKAGE package.

+ #

+ # Yuri Chornoivan <yurchor@ukr.net>, 2010.

+ msgid ""

+ msgstr ""

+ "Project-Id-Version: \n"

+ "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

+ "PO-Revision-Date: 2010-03-17 19:38+0200\n"

+ "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"

+ "Language-Team: Ukrainian <translation@linux.org.ua>\n"

+ "MIME-Version: 1.0\n"

+ "Content-Type: text/plain; charset=UTF-8\n"

+ "Content-Transfer-Encoding: 8bit\n"

+ "X-Generator: Lokalize 1.0\n"

+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"

+ "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

+ 

+ #: config/SSSDConfig.py:39

+ msgid "Set the verbosity of the debug logging"

+ msgstr "Встановити рівень докладності діагностичних записів журналу"

+ 

+ #: config/SSSDConfig.py:40

+ msgid "Include timestamps in debug logs"

+ msgstr "Додати до діагностичних журналів позначки часу"

+ 

+ #: config/SSSDConfig.py:41

+ msgid "Write debug messages to logfiles"

+ msgstr "Записувати діагностичні повідомлення до файлів журналу"

+ 

+ #: config/SSSDConfig.py:42

+ msgid "Ping timeout before restarting service"

+ msgstr "Час очікування відповіді на пінг перед перезапуском служби"

+ 

+ #: config/SSSDConfig.py:43

+ msgid "Command to start service"

+ msgstr "Команда запуску служби"

+ 

+ #: config/SSSDConfig.py:44

+ msgid "Number of times to attempt connection to Data Providers"

+ msgstr "Кількість повторних спроб встановлення з’єднання з надавачами даних"

+ 

+ #: config/SSSDConfig.py:47

+ msgid "SSSD Services to start"

+ msgstr "Служби SSSD, які слід запустити"

+ 

+ #: config/SSSDConfig.py:48

+ msgid "SSSD Domains to start"

+ msgstr "Домени SSSD, які слід запустити"

+ 

+ #: config/SSSDConfig.py:49

+ msgid "Timeout for messages sent over the SBUS"

+ msgstr "Час очікування для повідомлень, надісланих за допомогою SBUS"

+ 

+ #: config/SSSDConfig.py:50

+ msgid "Regex to parse username and domain"

+ msgstr "Формальний вираз для обробки імені користувача і домену"

+ 

+ #: config/SSSDConfig.py:51

+ msgid "Printf-compatible format for displaying fully-qualified names"

+ msgstr "Сумісний з printf формат показу повних назв"

+ 

+ #: config/SSSDConfig.py:54

+ msgid "Enumeration cache timeout length (seconds)"

+ msgstr "Тривалість часу очікування на дані кешу нумерування (у секундах)"

+ 

+ #: config/SSSDConfig.py:55

+ msgid "Entry cache background update timeout length (seconds)"

+ msgstr "Час очікування на фонове оновлення кешу записів (у секундах)"

+ 

+ #: config/SSSDConfig.py:56

+ msgid "Negative cache timeout length (seconds)"

+ msgstr "Від’ємний час очікування на дані з кешу (у секундах)"

+ 

+ #: config/SSSDConfig.py:57

+ msgid "Users that SSSD should explicitly ignore"

+ msgstr "Користувачі, яких SSSD має явно ігнорувати"

+ 

+ #: config/SSSDConfig.py:58

+ msgid "Groups that SSSD should explicitly ignore"

+ msgstr "Групи користувачів, які SSSD має явно ігнорувати"

+ 

+ #: config/SSSDConfig.py:59

+ msgid "Should filtered users appear in groups"

+ msgstr "Чи слід показувати відфільтрованих користувачів у групах"

+ 

+ #: config/SSSDConfig.py:60

+ msgid "The value of the password field the NSS provider should return"

+ msgstr "Значення поля пароля, яке має повертати постачальник даних NSS"

+ 

+ #: config/SSSDConfig.py:63

+ msgid "How long to allow cached logins between online logins (days)"

+ msgstr ""

+ "Тривалість зберігання кешованих реєстраційних даних між входами до системи "

+ "(у днях)"

+ 

+ #: config/SSSDConfig.py:64

+ msgid "How many failed logins attempts are allowed when offline"

+ msgstr "Макс. дозволена кількість помилкових спроб входу у автономному режимі"

+ 

+ #: config/SSSDConfig.py:65

+ msgid ""

+ "How long (minutes) to deny login after offline_failed_login_attempts has "

+ "been reached"

+ msgstr ""

+ "Тривалість (у хвилинах) заборони входу після досягнення значення "

+ "offline_failed_login_attempts"

+ 

+ #: config/SSSDConfig.py:68

+ msgid "Identity provider"

+ msgstr "Служба профілів"

+ 

+ #: config/SSSDConfig.py:69

+ msgid "Authentication provider"

+ msgstr "Служба розпізнавання"

+ 

+ #: config/SSSDConfig.py:70

+ msgid "Access control provider"

+ msgstr "Служба керування доступом"

+ 

+ #: config/SSSDConfig.py:71

+ msgid "Password change provider"

+ msgstr "Служба зміни паролів"

+ 

+ #: config/SSSDConfig.py:74

+ msgid "Minimum user ID"

+ msgstr "Мін. ідентифікатор користувача"

+ 

+ #: config/SSSDConfig.py:75

+ msgid "Maximum user ID"

+ msgstr "Макс. ідентифікатор користувача"

+ 

+ #: config/SSSDConfig.py:76

+ msgid "Ping timeout before restarting domain"

+ msgstr "Час очікування відповіді на пінг перед перезапуском домену"

+ 

+ #: config/SSSDConfig.py:77

+ msgid "Enable enumerating all users/groups"

+ msgstr "Увімкнути нумерацію всіх користувачів/груп"

+ 

+ #: config/SSSDConfig.py:78

+ msgid "Cache credentials for offline login"

+ msgstr "Кешувати реєстраційні дані для автономного входу"

+ 

+ #: config/SSSDConfig.py:79

+ msgid "Store password hashes"

+ msgstr "Зберігати хеші паролів"

+ 

+ #: config/SSSDConfig.py:80

+ msgid "Display users/groups in fully-qualified form"

+ msgstr "Показувати записи користувачів/груп повністю"

+ 

+ #: config/SSSDConfig.py:81

+ msgid "Entry cache timeout length (seconds)"

+ msgstr "Тривалість кешування записів (у секундах)"

+ 

+ #: config/SSSDConfig.py:82

+ msgid ""

+ "Restrict or prefer a specific address family when performing DNS lookups"

+ msgstr ""

+ "Обмежити або надавати перевагу певному сімейству адрес під час виконання "

+ "пошуків DNS"

+ 

+ #: config/SSSDConfig.py:83

+ msgid "How long to keep cached entries after last successful login (days)"

+ msgstr ""

+ "Тривалість зберігання кешованих записів після останнього успішного входу (у "

+ "днях)"

+ 

+ #: config/SSSDConfig.py:86

+ msgid "IPA domain"

+ msgstr "Домен IPA"

+ 

+ #: config/SSSDConfig.py:87

+ msgid "IPA server address"

+ msgstr "Адреса сервера IPA"

+ 

+ #: config/SSSDConfig.py:88

+ msgid "IPA client hostname"

+ msgstr "Назва вузла клієнта IPA"

+ 

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

+ msgid "Kerberos server address"

+ msgstr "Адреса сервера Kerberos"

+ 

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

+ msgid "Kerberos realm"

+ msgstr "Область Kerberos"

+ 

+ #: config/SSSDConfig.py:93

+ msgid "Authentication timeout"

+ msgstr "Час очікування на розпізнавання"

+ 

+ #: config/SSSDConfig.py:96

+ msgid "Directory to store credential caches"

+ msgstr "Каталог, де зберігатиметься кеш реєстраційних даних"

+ 

+ #: config/SSSDConfig.py:97

+ msgid "Location of the user's credential cache"

+ msgstr "Адреса кешу реєстраційних даних користувача"

+ 

+ #: config/SSSDConfig.py:98

+ msgid "Location of the keytab to validate credentials"

+ msgstr "Адреса таблиці ключів для перевірки реєстраційних даних"

+ 

+ #: config/SSSDConfig.py:99

+ msgid "Enable credential validation"

+ msgstr "Увімкнути перевірку реєстраційних даних"

+ 

+ #: config/SSSDConfig.py:102

+ msgid "The principal of the change password service"

+ msgstr "Реєстраційний запис служби зміни паролів"

+ 

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

+ msgstr ""

+ "Сервер, на якому запущено службу зміни паролів, якщо такий не вдасться "

+ "виявити у KDC"

+ 

+ #: config/SSSDConfig.py:106

+ msgid "ldap_uri, The URI of the LDAP server"

+ msgstr "ldap_uri, адреса URI сервера LDAP"

+ 

+ #: config/SSSDConfig.py:107

+ msgid "The default base DN"

+ msgstr "Типова базова назва домену"

+ 

+ #: config/SSSDConfig.py:108

+ msgid "The Schema Type in use on the LDAP server, rfc2307"

+ msgstr "Тип схеми, використаний на сервері LDAP, rfc2307"

+ 

+ #: config/SSSDConfig.py:109

+ msgid "The default bind DN"

+ msgstr "Типова назва домену прив’язки"

+ 

+ #: config/SSSDConfig.py:110

+ msgid "The type of the authentication token of the default bind DN"

+ msgstr "Тип розпізнавання для типової назви сервера прив’язки"

+ 

+ #: config/SSSDConfig.py:111

+ msgid "The authentication token of the default bind DN"

+ msgstr "Лексема розпізнавання типової назви сервера прив’язки"

+ 

+ #: config/SSSDConfig.py:112

+ msgid "Length of time to attempt connection"

+ msgstr "Проміжок часу між спробами встановлення з’єднання"

+ 

+ #: config/SSSDConfig.py:113

+ msgid "Length of time to attempt synchronous LDAP operations"

+ msgstr "Проміжок часу між спробами виконання синхронних операцій LDAP"

+ 

+ #: config/SSSDConfig.py:114

+ msgid "Length of time between attempts to reconnect while offline"

+ msgstr ""

+ "Проміжок часу між повторними спробами встановлення з’єднання у автономному "

+ "режимі"

+ 

+ #: config/SSSDConfig.py:115

+ msgid "file that contains CA certificates"

+ msgstr "файл, що містить сертифікати CA"

+ 

+ #: config/SSSDConfig.py:116

+ msgid "Require TLS certificate verification"

+ msgstr "Потрібна перевірка сертифіката TLS"

+ 

+ #: config/SSSDConfig.py:117

+ msgid "Specify the sasl mechanism to use"

+ msgstr "Вкажіть механізм SASL, який слід використовувати"

+ 

+ #: config/SSSDConfig.py:118

+ msgid "Specify the sasl authorization id to use"

+ msgstr "Вкажіть ідентифікатор уповноваження SASL, який слід використовувати"

+ 

+ #: config/SSSDConfig.py:121

+ msgid "Kerberos service keytab"

+ msgstr "Таблиця ключів служби Kerberos"

+ 

+ #: config/SSSDConfig.py:122

+ msgid "Use Kerberos auth for LDAP connection"

+ msgstr "Розпізнавання Kerberos для з’єднання LDAP"

+ 

+ #: config/SSSDConfig.py:123

+ msgid "Follow LDAP referrals"

+ msgstr "Переходити за посиланнями LDAP"

+ 

+ #: config/SSSDConfig.py:126

+ msgid "Length of time to wait for a search request"

+ msgstr "Тривалість очікування на дані запиту пошуку"

+ 

+ #: config/SSSDConfig.py:127

+ msgid "Length of time between enumeration updates"

+ msgstr "Проміжок часу між оновленнями нумерації"

+ 

+ #: config/SSSDConfig.py:128

+ msgid "Require TLS for ID lookups, false"

+ msgstr "Вимагати TLS для пошуків ідентифікаторів, вимкнено"

+ 

+ #: config/SSSDConfig.py:129

+ msgid "Base DN for user lookups"

+ msgstr "Базова назва домену для пошуків користувачів"

+ 

+ #: config/SSSDConfig.py:130

+ msgid "Scope of user lookups"

+ msgstr "Діапазон пошуків користувачів"

+ 

+ #: config/SSSDConfig.py:131

+ msgid "Filter for user lookups"

+ msgstr "Фільтр пошуку користувачів"

+ 

+ #: config/SSSDConfig.py:132

+ msgid "Objectclass for users"

+ msgstr "Клас об’єктів для користувачів"

+ 

+ #: config/SSSDConfig.py:133

+ msgid "Username attribute"

+ msgstr "Атрибут імені користувача"

+ 

+ #: config/SSSDConfig.py:134

+ msgid "UID attribute"

+ msgstr "Атрибут UID"

+ 

+ #: config/SSSDConfig.py:135

+ msgid "Primary GID attribute"

+ msgstr "Головний атрибут GID"

+ 

+ #: config/SSSDConfig.py:136

+ msgid "GECOS attribute"

+ msgstr "Атрибут GECOS"

+ 

+ #: config/SSSDConfig.py:137

+ msgid "Home directory attribute"

+ msgstr "Атрибут домашнього каталогу"

+ 

+ #: config/SSSDConfig.py:138

+ msgid "Shell attribute"

+ msgstr "Атрибут оболонки"

+ 

+ #: config/SSSDConfig.py:139

+ msgid "UUID attribute"

+ msgstr "Атрибут UUID"

+ 

+ #: config/SSSDConfig.py:140

+ msgid "User principal attribute (for Kerberos)"

+ msgstr "Атрибут реєстраційного запису користувача (для Kerberos)"

+ 

+ #: config/SSSDConfig.py:141

+ msgid "Full Name"

+ msgstr "Повне ім'я"

+ 

+ #: config/SSSDConfig.py:142

+ msgid "memberOf attribute"

+ msgstr "Атрибут memberOf"

+ 

+ #: config/SSSDConfig.py:143

+ msgid "Modification time attribute"

+ msgstr "Атрибут часу зміни"

+ 

+ #: config/SSSDConfig.py:146

+ msgid "Policy to evaluate the password expiration"

+ msgstr "Правила оцінки завершення строку дії пароля"

+ 

+ #: config/SSSDConfig.py:149

+ msgid "Comma separated list of allowed users"

+ msgstr "Відокремлений комами список дозволених користувачів"

+ 

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

+ msgstr "Відокремлений комами список заборонених користувачів"

+ 

+ #: config/SSSDConfig.py:153

+ msgid "Default shell, /bin/bash"

+ msgstr "Типова оболонка, /bin/bash"

+ 

+ #: config/SSSDConfig.py:154

+ msgid "Base for home directories"

+ msgstr "Базова адреса домашніх каталогів"

+ 

+ #: config/SSSDConfig.py:157

+ msgid "The name of the NSS library to use"

+ msgstr "Назва бібліотеки NSS, яку слід використовувати"

+ 

+ #: config/SSSDConfig.py:160

+ msgid "PAM stack to use"

+ msgstr "Стек PAM, який слід використовувати"

+ 

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

+ msgstr "Запуститися фонову службу (типова поведінка)"

+ 

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

+ msgstr "Запустити у інтерактивному режимі (без фонової служби)"

+ 

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

+ msgstr "Вказати нетиповий файл налаштувань"

+ 

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

+ msgstr "sssd слід запускати від імені користувача root\n"

+ 

+ #: monitor/monitor.c:2252

+ msgid ""

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

+ msgstr ""

+ "Було виявлено сокет nscd. Можливості з кешування nscd можуть конфліктувати з "

+ "SSSD. Не рекомендуємо вам користуватися nscd паралельно з SSSD\n"

+ 

+ #: monitor/monitor.c:2262

+ #, c-format

+ msgid ""

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

+ msgstr ""

+ "Не вдалося прочитати файл налаштувань %s, будь ласка, перевірте, чи "

+ "встановлено для цього файла права доступу 0600 і чи є парою власник-група "

+ "файла root.root\n"

+ 

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

+ msgstr ""

+ 

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

+ msgstr "Рівень зневаджування"

+ 

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

+ msgstr "Додавати діагностичні часові позначки"

+ 

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ msgid "An open file descriptor for the debug logs"

+ msgstr "Дескриптор відкритого файла для запису журналів діагностики"

+ 

+ #: providers/data_provider_be.c:1156

+ msgid "Domain of the information provider (mandatory)"

+ msgstr "Домен надання відомостей (обов’язковий)"

+ 

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "Паролі не збігаються"

+ 

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

+ msgstr "Автономне розпізнавання"

+ 

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

+ msgstr ", строк дії вашого кешованого пароля завершиться: "

+ 

+ #: sss_client/pam_sss.c:473

+ msgid "Offline authentication, authentication is denied until: "

+ msgstr "Автономне розпізнавання, розпізнавання заборонено до: "

+ 

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

+ msgstr "Система працює у автономному режимі, зміна пароля неможлива"

+ 

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ msgid "Password change failed. "

+ msgstr "Спроба зміни пароля зазнала невдачі. "

+ 

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

+ msgstr "Повідомлення сервера: "

+ 

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "Новий пароль: "

+ 

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "Ще раз введіть новий пароль: "

+ 

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "Пароль: "

+ 

+ #: sss_client/pam_sss.c:1006

+ msgid "Current Password: "

+ msgstr "Поточний пароль: "

+ 

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

+ msgstr "Строк дії пароля вичерпано. Змініть ваш пароль."

+ 

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ msgid "The debug level to run with"

+ msgstr "Рівень діагностики під час запуску"

+ 

+ #: tools/sss_useradd.c:115 tools/sss_usermod.c:47

+ msgid "The UID of the user"

+ msgstr "Ідентифікатор користувача"

+ 

+ #: tools/sss_useradd.c:116

+ msgid "The GID or group name of the user"

+ msgstr "Ідентифікатор або назва групи користувача"

+ 

+ #: tools/sss_useradd.c:117 tools/sss_usermod.c:49

+ msgid "The comment string"

+ msgstr "Рядок коментаря"

+ 

+ #: tools/sss_useradd.c:118 tools/sss_usermod.c:50

+ msgid "Home directory"

+ msgstr "Домашній каталог"

+ 

+ #: tools/sss_useradd.c:119 tools/sss_usermod.c:51

+ msgid "Login shell"

+ msgstr "Оболонка входу"

+ 

+ #: tools/sss_useradd.c:120

+ msgid "Groups"

+ msgstr "Групи"

+ 

+ #: tools/sss_useradd.c:121

+ msgid "Create user's directory if it does not exist"

+ msgstr "Створити каталог користувача, якщо його ще не існує"

+ 

+ #: tools/sss_useradd.c:122

+ msgid "Never create user's directory, overrides config"

+ msgstr "Ніколи не створювати каталог користувача, перевизначає налаштування"

+ 

+ #: tools/sss_useradd.c:123

+ msgid "Specify an alternative skeleton directory"

+ msgstr "Вказати альтернативний основний каталог"

+ 

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr "Помилка під час спроби встановити локаль\n"

+ 

+ #: tools/sss_useradd.c:172

+ msgid "Specify user to add\n"

+ msgstr "Вкажіть користувача, запис якого слід додати\n"

+ 

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr "Помилка ініціалізації інструментів: немає локального домену\n"

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr "Помилка ініціалізації інструментів\n"

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr "У FQDN вказано некоректний домен\n"

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr "Внутрішня помилка під час обробки параметрів\n"

+ 

+ #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

+ msgid "Groups must be in the same domain as user\n"

+ msgstr "Групи мають належати до того самого домену, що і користувач\n"

+ 

+ #: tools/sss_useradd.c:219

+ #, c-format

+ msgid "Cannot find group %s in local domain\n"

+ msgstr "Не вдалося знайти групу %s у локальному домені\n"

+ 

+ #: tools/sss_useradd.c:229

+ msgid "Cannot get group information for the user\n"

+ msgstr "Не вдалося отримати відомості щодо групи користувача\n"

+ 

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr "Не вдалося встановити типові значення\n"

+ 

+ #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

+ msgid "The selected UID is outside the allowed range\n"

+ msgstr ""

+ "Вибраний ідентифікатор користувача не належить до діапазону дозволених\n"

+ 

+ #: tools/sss_useradd.c:285

+ msgid "Cannot get info about the user\n"

+ msgstr "Не вдалося отримати відомості щодо користувача\n"

+ 

+ #: tools/sss_useradd.c:299

+ msgid "User's home directory already exists, not copying data from skeldir\n"

+ msgstr ""

+ "Домашній каталог користувача вже існує, копіювання даних з каталогу skel не "

+ "виконуватиметься\n"

+ 

+ #: tools/sss_useradd.c:302

+ #, c-format

+ msgid "Cannot create user's home directory: %s\n"

+ msgstr "Не вдалося створити домашній каталог користувача: %s\n"

+ 

+ #: tools/sss_useradd.c:313

+ #, c-format

+ msgid "Cannot create user's mail spool: %s\n"

+ msgstr "Не вдалося створити поштовий буфер користувача: %s\n"

+ 

+ #: tools/sss_useradd.c:325

+ msgid "Could not allocate ID for the user - domain full?\n"

+ msgstr ""

+ "Не вдалося отримати ідентифікатор для користувача. Домен переповнено?\n"

+ 

+ #: tools/sss_useradd.c:329

+ msgid "A user or group with the same name or ID already exists\n"

+ msgstr ""

+ "Вже існує користувач або група з таким самим іменем, назвою або "

+ "ідентифікатором\n"

+ 

+ #: tools/sss_useradd.c:335

+ msgid "Transaction error. Could not add user.\n"

+ msgstr "Помилка під час виконання операції. Не вдалося додати користувача.\n"

+ 

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr "Ідентифікатор групи"

+ 

+ #: tools/sss_groupadd.c:75

+ msgid "Specify group to add\n"

+ msgstr "Вкажіть групу, яку слід додати\n"

+ 

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr "Вибраний ідентифікатор групи не належить до діапазону дозволених\n"

+ 

+ #: tools/sss_groupadd.c:133

+ msgid "Could not allocate ID for the group - domain full?\n"

+ msgstr "Не вдалося отримати ідентифікатор для групи. Домен переповнено?\n"

+ 

+ #: tools/sss_groupadd.c:137

+ msgid "A group with the same name or GID already exists\n"

+ msgstr "Вже існує група з такою самою назвою або ідентифікатором\n"

+ 

+ #: tools/sss_groupadd.c:142

+ msgid "Transaction error. Could not add group.\n"

+ msgstr "Помилка під час виконання операції Не вдалося додати групу.\n"

+ 

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr "Вкажіть групу, яку слід вилучити\n"

+ 

+ #: tools/sss_groupdel.c:107

+ #, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr "Група %s не належить визначеному діапазону ідентифікаторів домену\n"

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "У локальному домені немає такої групи. Вилучення груп можливе лише у межах "

+ "локального домену.\n"

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr "Внутрішня помилка. Не вдалося вилучити запис групи.\n"

+ 

+ #: tools/sss_groupmod.c:44

+ msgid "Groups to add this group to"

+ msgstr "Групи, до яких слід додати цю групу"

+ 

+ #: tools/sss_groupmod.c:46

+ msgid "Groups to remove this group from"

+ msgstr "Групи, з яких слід вилучити цю групу"

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr "Вкажіть групу, запис якої слід змінити\n"

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr ""

+ "Не вдалося знайти групу у локальному домені. Зміну записів груп можна "

+ "виконувати лише у межах локального домену\n"

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr ""

+ "Групи-учасники мають належати до того самого домену, що і основна група\n"

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr ""

+ "Не вдалося знайти групу %s у локальному домені, можна використовувати лише "

+ "групи з локального домену\n"

+ 

+ #: tools/sss_groupmod.c:222

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr ""

+ "Не вдалося змінити запис групи. Перевірте, чи правильно вказано назви груп-"

+ "учасників\n"

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr ""

+ "Не вдалося змінити запис групи. Перевірте, чи правильно вказано назву групи\n"

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr "Помилка під час виконання операції Не вдалося змінити групу.\n"

+ 

+ #: tools/sss_groupshow.c:954

+ #, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr "%s%sГрупа: %s\n"

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr "Магічна приватна "

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr "%sНомер GID: %d\n"

+ 

+ #: tools/sss_groupshow.c:959

+ #, c-format

+ msgid "%sMember users: "

+ msgstr "%sКористувачі-учасники: "

+ 

+ #: tools/sss_groupshow.c:966

+ #, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ "\n"

+ "%sє учасником: "

+ 

+ #: tools/sss_groupshow.c:973

+ #, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ "\n"

+ "%sГрупи-учасники: "

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr "Виводити дані щодо непрямих учасників групи рекурсивно"

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr "Вкажіть групу, дані якої слід показати\n"

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr "Не вдалося започаткувати пошук\n"

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr ""

+ "У локальному домені немає такої групи. Вивід даних груп можливий лише у "

+ "межах локального домену.\n"

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr "Внутрішня помилка. Не вдалося вивести дані групи.\n"

+ 

+ #: tools/sss_userdel.c:46

+ msgid "Remove home directory and mail spool"

+ msgstr "Вилучити домашній каталог і поштовий буфер"

+ 

+ #: tools/sss_userdel.c:47

+ msgid "Do not remove home directory and mail spool"

+ msgstr "Не вилучати домашній каталог і поштовий буфер"

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr "Примусово вилучити файли, які не належать користувачеві"

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr "Вкажіть користувача, запис якого слід вилучити\n"

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr ""

+ "Користувач %s не належить визначеному діапазону ідентифікаторів домену\n"

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr "Домашній каталог не буде вилучено. Він не належить користувачеві.\n"

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr "Не вдалося вилучити домашній каталог: %s\n"

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr ""

+ "У локальному домені немає такого користувача. Вилучення користувачів можливе "

+ "лише у межах локального домену.\n"

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr "Внутрішня помилка Не вдалося вилучити запис користувача.\n"

+ 

+ #: tools/sss_usermod.c:48

+ msgid "The GID of the user"

+ msgstr "Ідентифікатор групи користувача"

+ 

+ #: tools/sss_usermod.c:52

+ msgid "Groups to add this user to"

+ msgstr "Групи, до яких слід додати цього користувача"

+ 

+ #: tools/sss_usermod.c:53

+ msgid "Groups to remove this user from"

+ msgstr "Групи, з яких слід вилучити цього користувача"

+ 

+ #: tools/sss_usermod.c:54

+ msgid "Lock the account"

+ msgstr "Заблокувати обліковий запис"

+ 

+ #: tools/sss_usermod.c:55

+ msgid "Unlock the account"

+ msgstr "Розблокувати обліковий запис"

+ 

+ #: tools/sss_usermod.c:115

+ msgid "Specify user to modify\n"

+ msgstr "Вкажіть користувача, запис якого слід змінити\n"

+ 

+ #: tools/sss_usermod.c:146

+ msgid ""

+ "Cannot find user in local domain, modifying users is allowed only in local "

+ "domain\n"

+ msgstr ""

+ "Не вдалося знайти користувача у локальному домені. Зміну записів "

+ "користувачів можна виконувати лише у межах локального домену\n"

+ 

+ #: tools/sss_usermod.c:241

+ msgid "Could not modify user - check if group names are correct\n"

+ msgstr ""

+ "Не вдалося змінити запис користувача. Перевірте, чи правильно вказано назви "

+ "груп\n"

+ 

+ #: tools/sss_usermod.c:245

+ msgid "Could not modify user - user already member of groups?\n"

+ msgstr ""

+ "Не вдалося змінити запис користувача. Користувач вже є учасником груп?\n"

+ 

+ #: tools/sss_usermod.c:249

+ msgid "Transaction error. Could not modify user.\n"

+ msgstr ""

+ "Помилка під час виконання операції. Не вдалося змінити запис користувача.\n"

+ 

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

+ msgstr "Не вистачає пам'яті\n"

+ 

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

+ msgstr "%s слід виконувати від імені користувача root\n"

+ 

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

+ msgstr "Надіслати діагностичні дані до файлів, а не до stderr"

file added
+873
@@ -0,0 +1,873 @@

+ # Traditional Chinese translation of SSSD

+ # Copyright (C) YEAR Red Hat, Inc.

+ # This file is distributed under the same license as the PACKAGE package.

+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.

+ #

+ msgid ""

+ msgstr ""

+ "Project-Id-Version: sss_daemon 1.1.0\n"

+ "Report-Msgid-Bugs-To: sssd-devel@lists.fedorahosted.org\n"

+ "POT-Creation-Date: 2010-04-01 09:55-0400\n"

+ "PO-Revision-Date: 2010-03-22 22:00+0800\n"

+ "Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"

+ "Language-Team: Fedora-trans-zh_tw <trans-zh_tw@lists.fedoraproject.org>\n"

+ "MIME-Version: 1.0\n"

+ "Content-Type: text/plain; charset=utf-8\n"

+ "Content-Transfer-Encoding: 8bit\n"

+ "Plural-Forms: nplurals=2; plural=n!=1;\n"

+ "X-Poedit-Language: Chinese\n"

+ "X-Poedit-Country: TAIWAN\n"

+ "X-Poedit-SourceCharset: utf-8\n"

+ 

+ #: config/SSSDConfig.py:39

+ #, fuzzy

+ msgid "Set the verbosity of the debug logging"

+ msgstr "設定除錯日誌功能的冗長度"

+ 

+ #: config/SSSDConfig.py:40

+ msgid "Include timestamps in debug logs"

+ msgstr "在除錯日誌內加入時間戳記"

+ 

+ #: config/SSSDConfig.py:41

+ msgid "Write debug messages to logfiles"

+ msgstr "將除錯訊息寫入日誌檔"

+ 

+ #: config/SSSDConfig.py:42

+ #, fuzzy

+ msgid "Ping timeout before restarting service"

+ msgstr "在重新啟動服務之前 ping 逾時"

+ 

+ #: config/SSSDConfig.py:43

+ msgid "Command to start service"

+ msgstr "啟動服務的指令"

+ 

+ #: config/SSSDConfig.py:44

+ #, fuzzy

+ msgid "Number of times to attempt connection to Data Providers"

+ msgstr "試圖連線到資料提供者的次數"

+ 

+ #: config/SSSDConfig.py:47

+ msgid "SSSD Services to start"

+ msgstr "要啟動的 SSSD 服務"

+ 

+ #: config/SSSDConfig.py:48

+ msgid "SSSD Domains to start"

+ msgstr "要啟動的 SSSD 網域"

+ 

+ #: config/SSSDConfig.py:49

+ #, fuzzy

+ msgid "Timeout for messages sent over the SBUS"

+ msgstr "透過 SBUS 送出的訊息逾時"

+ 

+ #: config/SSSDConfig.py:50

+ msgid "Regex to parse username and domain"

+ msgstr "用來解析使用者名稱與網域的正規表示式"

+ 

+ #: config/SSSDConfig.py:51

+ msgid "Printf-compatible format for displaying fully-qualified names"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:54

+ #, fuzzy

+ msgid "Enumeration cache timeout length (seconds)"

+ msgstr "列表快取的逾時長度(秒)"

+ 

+ #: config/SSSDConfig.py:55

+ msgid "Entry cache background update timeout length (seconds)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:56

+ msgid "Negative cache timeout length (seconds)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:57

+ msgid "Users that SSSD should explicitly ignore"

+ msgstr "SSSD 應該明確忽略的使用者"

+ 

+ #: config/SSSDConfig.py:58

+ msgid "Groups that SSSD should explicitly ignore"

+ msgstr "SSSD 應該明確忽略的群組"

+ 

+ #: config/SSSDConfig.py:59

+ msgid "Should filtered users appear in groups"

+ msgstr "過濾的使用者是否應該顯現在群組內"

+ 

+ #: config/SSSDConfig.py:60

+ #, fuzzy

+ msgid "The value of the password field the NSS provider should return"

+ msgstr "NSS 提供者應該回傳的密碼的值"

+ 

+ #: config/SSSDConfig.py:63

+ msgid "How long to allow cached logins between online logins (days)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:64

+ #, fuzzy

+ msgid "How many failed logins attempts are allowed when offline"

+ msgstr "當離線時所許可的試圖登入失敗次數"

+ 

+ #: config/SSSDConfig.py:65

+ msgid ""

+ "How long (minutes) to deny login after offline_failed_login_attempts has "

+ "been reached"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:68

+ msgid "Identity provider"

+ msgstr "身分提供者"

+ 

+ #: config/SSSDConfig.py:69

+ msgid "Authentication provider"

+ msgstr "認證提供者"

+ 

+ #: config/SSSDConfig.py:70

+ msgid "Access control provider"

+ msgstr "存取控制提供者"

+ 

+ #: config/SSSDConfig.py:71

+ msgid "Password change provider"

+ msgstr "密碼變更提供者"

+ 

+ #: config/SSSDConfig.py:74

+ msgid "Minimum user ID"

+ msgstr "最小的使用者 ID"

+ 

+ #: config/SSSDConfig.py:75

+ msgid "Maximum user ID"

+ msgstr "最大的使用者 ID"

+ 

+ #: config/SSSDConfig.py:76

+ msgid "Ping timeout before restarting domain"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:77

+ msgid "Enable enumerating all users/groups"

+ msgstr "啟用所有使用者或群組的列舉"

+ 

+ #: config/SSSDConfig.py:78

+ msgid "Cache credentials for offline login"

+ msgstr "供離線登入使用的快取憑證"

+ 

+ #: config/SSSDConfig.py:79

+ #, fuzzy

+ msgid "Store password hashes"

+ msgstr "儲存密碼雜湊"

+ 

+ #: config/SSSDConfig.py:80

+ msgid "Display users/groups in fully-qualified form"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:81

+ msgid "Entry cache timeout length (seconds)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:82

+ msgid ""

+ "Restrict or prefer a specific address family when performing DNS lookups"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:83

+ msgid "How long to keep cached entries after last successful login (days)"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:86

+ msgid "IPA domain"

+ msgstr "IPA 網域"

+ 

+ #: config/SSSDConfig.py:87

+ msgid "IPA server address"

+ msgstr "IPA 伺服器位址"

+ 

+ #: config/SSSDConfig.py:88

+ msgid "IPA client hostname"

+ msgstr "IPA 客戶端主機名稱"

+ 

+ #: config/SSSDConfig.py:91 config/SSSDConfig.py:119

+ msgid "Kerberos server address"

+ msgstr "Kerberos 伺服器位址"

+ 

+ #: config/SSSDConfig.py:92 config/SSSDConfig.py:120

+ msgid "Kerberos realm"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:93

+ msgid "Authentication timeout"

+ msgstr "認證逾時"

+ 

+ #: config/SSSDConfig.py:96

+ msgid "Directory to store credential caches"

+ msgstr "儲存憑證快取的目錄"

+ 

+ #: config/SSSDConfig.py:97

+ msgid "Location of the user's credential cache"

+ msgstr "使用者憑證快取的位置"

+ 

+ #: config/SSSDConfig.py:98

+ msgid "Location of the keytab to validate credentials"

+ msgstr "驗證憑證用的金鑰表格位置"

+ 

+ #: config/SSSDConfig.py:99

+ msgid "Enable credential validation"

+ msgstr "啟用憑證驗證"

+ 

+ #: config/SSSDConfig.py:102

+ msgid "The principal of the change password service"

+ msgstr "變更密碼的服務其原則"

+ 

+ #: config/SSSDConfig.py:103

+ msgid "Server where the change password service is running if not on the KDC"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:106

+ msgid "ldap_uri, The URI of the LDAP server"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:107

+ msgid "The default base DN"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:108

+ msgid "The Schema Type in use on the LDAP server, rfc2307"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:109

+ msgid "The default bind DN"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:110

+ msgid "The type of the authentication token of the default bind DN"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:111

+ msgid "The authentication token of the default bind DN"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:112

+ msgid "Length of time to attempt connection"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:113

+ msgid "Length of time to attempt synchronous LDAP operations"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:114

+ msgid "Length of time between attempts to reconnect while offline"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:115

+ #, fuzzy

+ msgid "file that contains CA certificates"

+ msgstr "含有 CA 憑證的檔案"

+ 

+ #: config/SSSDConfig.py:116

+ msgid "Require TLS certificate verification"

+ msgstr "需要 TLS 憑證驗證"

+ 

+ #: config/SSSDConfig.py:117

+ msgid "Specify the sasl mechanism to use"

+ msgstr "指定要使用的 sasl 機制"

+ 

+ #: config/SSSDConfig.py:118

+ msgid "Specify the sasl authorization id to use"

+ msgstr "指定要使用的 sasl 認證 id"

+ 

+ #: config/SSSDConfig.py:121

+ msgid "Kerberos service keytab"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:122

+ msgid "Use Kerberos auth for LDAP connection"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:123

+ msgid "Follow LDAP referrals"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:126

+ msgid "Length of time to wait for a search request"

+ msgstr "搜尋請求的等候時間長度"

+ 

+ #: config/SSSDConfig.py:127

+ #, fuzzy

+ msgid "Length of time between enumeration updates"

+ msgstr "在列舉更新之間的長度"

+ 

+ #: config/SSSDConfig.py:128

+ msgid "Require TLS for ID lookups, false"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:129

+ msgid "Base DN for user lookups"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:130

+ msgid "Scope of user lookups"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:131

+ msgid "Filter for user lookups"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:132

+ msgid "Objectclass for users"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:133

+ msgid "Username attribute"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:134

+ #, fuzzy

+ msgid "UID attribute"

+ msgstr "UID 屬性"

+ 

+ #: config/SSSDConfig.py:135

+ #, fuzzy

+ msgid "Primary GID attribute"

+ msgstr "主要 GID 屬性"

+ 

+ #: config/SSSDConfig.py:136

+ #, fuzzy

+ msgid "GECOS attribute"

+ msgstr "GEOS 屬性"

+ 

+ #: config/SSSDConfig.py:137

+ #, fuzzy

+ msgid "Home directory attribute"

+ msgstr "家目錄屬性"

+ 

+ #: config/SSSDConfig.py:138

+ #, fuzzy

+ msgid "Shell attribute"

+ msgstr "Shell 屬性"

+ 

+ #: config/SSSDConfig.py:139

+ #, fuzzy

+ msgid "UUID attribute"

+ msgstr "UUID 屬性"

+ 

+ #: config/SSSDConfig.py:140

+ #, fuzzy

+ msgid "User principal attribute (for Kerberos)"

+ msgstr "使用者原則屬性(供 Kerberos 使用)"

+ 

+ #: config/SSSDConfig.py:141

+ msgid "Full Name"

+ msgstr "全名"

+ 

+ #: config/SSSDConfig.py:142

+ msgid "memberOf attribute"

+ msgstr ""

+ 

+ #: config/SSSDConfig.py:143

+ #, fuzzy

+ msgid "Modification time attribute"

+ msgstr "修改時間屬性"

+ 

+ #: config/SSSDConfig.py:146

+ msgid "Policy to evaluate the password expiration"

+ msgstr "評估密碼過期時效的策略"

+ 

+ #: config/SSSDConfig.py:149

+ msgid "Comma separated list of allowed users"

+ msgstr "許可的使用者清單,請使用半形逗號作為分隔"

+ 

+ #: config/SSSDConfig.py:150

+ msgid "Comma separated list of prohibited users"

+ msgstr "被禁止的使用者清單,請使用半形逗號作為分隔"

+ 

+ #: config/SSSDConfig.py:153

+ msgid "Default shell, /bin/bash"

+ msgstr "預設 shell,/bin/bash"

+ 

+ #: config/SSSDConfig.py:154

+ #, fuzzy

+ msgid "Base for home directories"

+ msgstr "家目錄的基礎"

+ 

+ #: config/SSSDConfig.py:157

+ msgid "The name of the NSS library to use"

+ msgstr "要使用的 NSS 函式庫名稱"

+ 

+ #: config/SSSDConfig.py:160

+ msgid "PAM stack to use"

+ msgstr "要使用的 PAM 堆疊"

+ 

+ #: monitor/monitor.c:2187

+ msgid "Become a daemon (default)"

+ msgstr "作為幕後程式 (預設)"

+ 

+ #: monitor/monitor.c:2189

+ msgid "Run interactive (not a daemon)"

+ msgstr "以互動方式執行 (非幕後程式)"

+ 

+ #: monitor/monitor.c:2191

+ msgid "Specify a non-default config file"

+ msgstr "指定非預設的配置檔"

+ 

+ #: monitor/monitor.c:2217

+ msgid "sssd must be run as root\n"

+ msgstr "sssd 必須以 root 身分執行\n"

+ 

+ #: monitor/monitor.c:2252

+ msgid ""

+ "nscd socket was detected.  As nscd caching capabilities may conflict with "

+ "SSSD, it is recommended to not run nscd in parallel with SSSD\n"

+ msgstr ""

+ 

+ #: monitor/monitor.c:2262

+ #, c-format

+ msgid ""

+ "Cannot read config file %s, please check if permissions are 0600 and the "

+ "file is owned by root.root\n"

+ msgstr ""

+ "無法讀取配置檔 %s,請確認權限是否為 0600 並且檔案是由 root.root 所擁有\n"

+ 

+ #: monitor/monitor.c:2267

+ msgid "Cannot load configuration database\n"

+ msgstr ""

+ 

+ #: providers/krb5/krb5_child.c:916 providers/ldap/ldap_child.c:316

+ #: util/util.h:61

+ msgid "Debug level"

+ msgstr "除錯層級"

+ 

+ #: providers/krb5/krb5_child.c:918 providers/ldap/ldap_child.c:318

+ #: util/util.h:65

+ msgid "Add debug timestamps"

+ msgstr "加入除錯時間戳記"

+ 

+ #: providers/krb5/krb5_child.c:920 providers/ldap/ldap_child.c:320

+ #, fuzzy

+ msgid "An open file descriptor for the debug logs"

+ msgstr "供除錯日誌使用的開啟檔案描述符"

+ 

+ #: providers/data_provider_be.c:1156

+ #, fuzzy

+ msgid "Domain of the information provider (mandatory)"

+ msgstr "資訊提供者的網域(委任)"

+ 

+ #: sss_client/pam_sss.c:353

+ msgid "Passwords do not match"

+ msgstr "密碼不相符"

+ 

+ #: sss_client/pam_sss.c:422

+ msgid "Offline authentication"

+ msgstr "離線認證"

+ 

+ #: sss_client/pam_sss.c:423

+ msgid ", your cached password will expire at: "

+ msgstr ",您快取的密碼將在此刻過期:"

+ 

+ #: sss_client/pam_sss.c:473

+ #, fuzzy

+ msgid "Offline authentication, authentication is denied until: "

+ msgstr "離線認證,認證被定義到:"

+ 

+ #: sss_client/pam_sss.c:500

+ msgid "System is offline, password change not possible"

+ msgstr "系統已離線,不可能作密碼變更"

+ 

+ #: sss_client/pam_sss.c:530 sss_client/pam_sss.c:543

+ msgid "Password change failed. "

+ msgstr "密碼變更失敗。"

+ 

+ #: sss_client/pam_sss.c:533 sss_client/pam_sss.c:544

+ msgid "Server message: "

+ msgstr "伺服器訊息:"

+ 

+ #: sss_client/pam_sss.c:915

+ msgid "New Password: "

+ msgstr "新密碼:"

+ 

+ #: sss_client/pam_sss.c:916

+ msgid "Reenter new Password: "

+ msgstr "再次輸入新密碼:"

+ 

+ #: sss_client/pam_sss.c:974

+ msgid "Password: "

+ msgstr "密碼:"

+ 

+ #: sss_client/pam_sss.c:1006

+ msgid "Current Password: "

+ msgstr "目前的密碼:"

+ 

+ #: sss_client/pam_sss.c:1143

+ msgid "Password expired. Change your password now."

+ msgstr "密碼已過期。請立刻變更您的密碼。"

+ 

+ #: tools/sss_useradd.c:114 tools/sss_groupadd.c:41 tools/sss_groupdel.c:43

+ #: tools/sss_groupmod.c:42 tools/sss_groupshow.c:1008 tools/sss_userdel.c:45

+ #: tools/sss_usermod.c:46

+ #, fuzzy

+ msgid "The debug level to run with"

+ msgstr "要依那種除錯層級執行"

+ 

+ #: tools/sss_useradd.c:115 tools/sss_usermod.c:47

+ msgid "The UID of the user"

+ msgstr "使用者的 UID"

+ 

+ #: tools/sss_useradd.c:116

+ msgid "The GID or group name of the user"

+ msgstr "使用者的 GID 或群組名稱"

+ 

+ #: tools/sss_useradd.c:117 tools/sss_usermod.c:49

+ msgid "The comment string"

+ msgstr "註解字串"

+ 

+ #: tools/sss_useradd.c:118 tools/sss_usermod.c:50

+ msgid "Home directory"

+ msgstr "家目錄"

+ 

+ #: tools/sss_useradd.c:119 tools/sss_usermod.c:51

+ msgid "Login shell"

+ msgstr "登入用 shell"

+ 

+ #: tools/sss_useradd.c:120

+ msgid "Groups"

+ msgstr "群組"

+ 

+ #: tools/sss_useradd.c:121

+ msgid "Create user's directory if it does not exist"

+ msgstr "如果使用者的目錄不存在便將它建立"

+ 

+ #: tools/sss_useradd.c:122

+ msgid "Never create user's directory, overrides config"

+ msgstr "永遠不建立使用者的目錄,凌駕配置"

+ 

+ #: tools/sss_useradd.c:123

+ msgid "Specify an alternative skeleton directory"

+ msgstr "指定替代的骨幹目錄"

+ 

+ #: tools/sss_useradd.c:137 tools/sss_groupadd.c:56 tools/sss_groupdel.c:52

+ #: tools/sss_groupmod.c:63 tools/sss_groupshow.c:1019 tools/sss_userdel.c:57

+ #: tools/sss_usermod.c:70

+ msgid "Error setting the locale\n"

+ msgstr "設定區域設置時發生錯誤\n"

+ 

+ #: tools/sss_useradd.c:172

+ msgid "Specify user to add\n"

+ msgstr "指定要加入的使用者\n"

+ 

+ #: tools/sss_useradd.c:183 tools/sss_groupadd.c:86 tools/sss_groupdel.c:81

+ #: tools/sss_groupmod.c:111 tools/sss_groupshow.c:1056 tools/sss_userdel.c:102

+ #: tools/sss_usermod.c:126

+ msgid "Error initializing the tools - no local domain\n"

+ msgstr "初始化工具時發生錯誤 - 沒有本機網域\n"

+ 

+ #: tools/sss_useradd.c:185 tools/sss_groupadd.c:88 tools/sss_groupdel.c:83

+ #: tools/sss_groupmod.c:113 tools/sss_groupshow.c:1058 tools/sss_userdel.c:104

+ #: tools/sss_usermod.c:128

+ msgid "Error initializing the tools\n"

+ msgstr "初始化工具時發生錯誤\n"

+ 

+ #: tools/sss_useradd.c:194 tools/sss_groupadd.c:97 tools/sss_groupdel.c:92

+ #: tools/sss_groupmod.c:121 tools/sss_groupshow.c:1067 tools/sss_userdel.c:113

+ #: tools/sss_usermod.c:137

+ msgid "Invalid domain specified in FQDN\n"

+ msgstr "在 FQDN 內指定了無效的網域\n"

+ 

+ #: tools/sss_useradd.c:203 tools/sss_groupmod.c:143 tools/sss_groupmod.c:170

+ #: tools/sss_usermod.c:162 tools/sss_usermod.c:189

+ msgid "Internal error while parsing parameters\n"

+ msgstr "當解析參數時發生內部錯誤\n"

+ 

+ #: tools/sss_useradd.c:211 tools/sss_usermod.c:170 tools/sss_usermod.c:197

+ msgid "Groups must be in the same domain as user\n"

+ msgstr "群組必須位於與使用者相同的網域內\n"

+ 

+ #: tools/sss_useradd.c:219

+ #, c-format

+ msgid "Cannot find group %s in local domain\n"

+ msgstr "在本機網域內找不到 %s 群組\n"

+ 

+ #: tools/sss_useradd.c:229

+ msgid "Cannot get group information for the user\n"

+ msgstr "無法為這位使用者設定群組資訊\n"

+ 

+ #: tools/sss_useradd.c:244 tools/sss_userdel.c:123

+ msgid "Cannot set default values\n"

+ msgstr "無法設定預設值\n"

+ 

+ #: tools/sss_useradd.c:251 tools/sss_usermod.c:153

+ msgid "The selected UID is outside the allowed range\n"

+ msgstr "所選的 UID 位於許可的範圍外\n"

+ 

+ #: tools/sss_useradd.c:285

+ msgid "Cannot get info about the user\n"

+ msgstr "無法取得關於這位使用者的資訊\n"

+ 

+ #: tools/sss_useradd.c:299

+ msgid "User's home directory already exists, not copying data from skeldir\n"

+ msgstr "使用者的家目錄已經存在,不會從骨幹目錄複製資料\n"

+ 

+ #: tools/sss_useradd.c:302

+ #, c-format

+ msgid "Cannot create user's home directory: %s\n"

+ msgstr "無法建立使用者的家目錄:%s\n"

+ 

+ #: tools/sss_useradd.c:313

+ #, c-format

+ msgid "Cannot create user's mail spool: %s\n"

+ msgstr "無法建立使用者的郵件 spool:%s\n"

+ 

+ #: tools/sss_useradd.c:325

+ msgid "Could not allocate ID for the user - domain full?\n"

+ msgstr "無法為使用者分配 ID - 網域已滿?\n"

+ 

+ #: tools/sss_useradd.c:329

+ msgid "A user or group with the same name or ID already exists\n"

+ msgstr "已經存在相同名稱的使用者或群組\n"

+ 

+ #: tools/sss_useradd.c:335

+ msgid "Transaction error. Could not add user.\n"

+ msgstr "處理事項發生錯誤。無法加入使用者。\n"

+ 

+ #: tools/sss_groupadd.c:43 tools/sss_groupmod.c:48

+ msgid "The GID of the group"

+ msgstr "群組的 GID"

+ 

+ #: tools/sss_groupadd.c:75

+ msgid "Specify group to add\n"

+ msgstr "指定要加入的群組\n"

+ 

+ #: tools/sss_groupadd.c:106 tools/sss_groupmod.c:194

+ msgid "The selected GID is outside the allowed range\n"

+ msgstr "所選的 GID 位於許可的範圍外\n"

+ 

+ #: tools/sss_groupadd.c:133

+ msgid "Could not allocate ID for the group - domain full?\n"

+ msgstr "無法為群組分配 ID - 網域已滿?\n"

+ 

+ #: tools/sss_groupadd.c:137

+ msgid "A group with the same name or GID already exists\n"

+ msgstr "已經存在相同名稱的群組或 GID\n"

+ 

+ #: tools/sss_groupadd.c:142

+ msgid "Transaction error. Could not add group.\n"

+ msgstr "處理事項發生錯誤。無法加入群組。\n"

+ 

+ #: tools/sss_groupdel.c:70

+ msgid "Specify group to delete\n"

+ msgstr "指定要刪除的群組\n"

+ 

+ #: tools/sss_groupdel.c:107

+ #, fuzzy, c-format

+ msgid "Group %s is outside the defined ID range for domain\n"

+ msgstr "群組 %s 位於為網域所定義的 ID 範圍外\n"

+ 

+ #: tools/sss_groupdel.c:136

+ msgid ""

+ "No such group in local domain. Removing groups only allowed in local "

+ "domain.\n"

+ msgstr "在本機網域內沒有這樣的群組。只許可在本機網域內移除群組。\n"

+ 

+ #: tools/sss_groupdel.c:141

+ msgid "Internal error. Could not remove group.\n"

+ msgstr "內部錯誤。無法移除群組。\n"

+ 

+ #: tools/sss_groupmod.c:44

+ #, fuzzy

+ msgid "Groups to add this group to"

+ msgstr "要加入此群組的群組"

+ 

+ #: tools/sss_groupmod.c:46

+ #, fuzzy

+ msgid "Groups to remove this group from"

+ msgstr "要從哪些群組移除此群組"

+ 

+ #: tools/sss_groupmod.c:98

+ msgid "Specify group to modify\n"

+ msgstr "指定要修改的群組\n"

+ 

+ #: tools/sss_groupmod.c:130

+ msgid ""

+ "Cannot find group in local domain, modifying groups is allowed only in local "

+ "domain\n"

+ msgstr "在本機網域內找不到群組,只許可在本機網域內修改群組\n"

+ 

+ #: tools/sss_groupmod.c:151 tools/sss_groupmod.c:178

+ msgid "Member groups must be in the same domain as parent group\n"

+ msgstr "成員群組必須位於與親代群組相同的網域內\n"

+ 

+ #: tools/sss_groupmod.c:159 tools/sss_groupmod.c:186 tools/sss_usermod.c:178

+ #: tools/sss_usermod.c:205

+ #, c-format

+ msgid ""

+ "Cannot find group %s in local domain, only groups in local domain are "

+ "allowed\n"

+ msgstr "在本機網域內找不到 %s 群組,只許可本機網域內的群組\n"

+ 

+ #: tools/sss_groupmod.c:222

+ #, fuzzy

+ msgid "Could not modify group - check if member group names are correct\n"

+ msgstr "無法修改群組 - 請檢查成員群組名稱是否正確\n"

+ 

+ #: tools/sss_groupmod.c:226

+ msgid "Could not modify group - check if groupname is correct\n"

+ msgstr "無法修改群組 - 請檢查群組名稱是否正確\n"

+ 

+ #: tools/sss_groupmod.c:230

+ msgid "Transaction error. Could not modify group.\n"

+ msgstr "處理事項發生錯誤。無法修改群組。\n"

+ 

+ #: tools/sss_groupshow.c:954

+ #, c-format

+ msgid "%s%sGroup: %s\n"

+ msgstr "%s%s群組:%s\n"

+ 

+ #: tools/sss_groupshow.c:955

+ msgid "Magic Private "

+ msgstr "魔法隱私"

+ 

+ #: tools/sss_groupshow.c:957

+ #, c-format

+ msgid "%sGID number: %d\n"

+ msgstr "%sGID 編號:%d\n"

+ 

+ #: tools/sss_groupshow.c:959

+ #, fuzzy, c-format

+ msgid "%sMember users: "

+ msgstr "%s成員使用者:"

+ 

+ #: tools/sss_groupshow.c:966

+ #, fuzzy, c-format

+ msgid ""

+ "\n"

+ "%sIs a member of: "

+ msgstr ""

+ "\n"

+ "%s是該群組的成員:"

+ 

+ #: tools/sss_groupshow.c:973

+ #, fuzzy, c-format

+ msgid ""

+ "\n"

+ "%sMember groups: "

+ msgstr ""

+ "\n"

+ "%s成員群組: "

+ 

+ #: tools/sss_groupshow.c:1010

+ msgid "Print indirect group members recursively"

+ msgstr "遞迴地列出間接的群組成員"

+ 

+ #: tools/sss_groupshow.c:1045

+ msgid "Specify group to show\n"

+ msgstr "指定要顯示的群組\n"

+ 

+ #: tools/sss_groupshow.c:1081 tools/sss_groupshow.c:1099

+ msgid "Cannot initiate search\n"

+ msgstr "無法開始搜尋\n"

+ 

+ #: tools/sss_groupshow.c:1115

+ msgid ""

+ "No such group in local domain. Printing groups only allowed in local "

+ "domain.\n"

+ msgstr "本機網域內沒有這樣的群組。只許可在本機網域內列出群組。\n"

+ 

+ #: tools/sss_groupshow.c:1120

+ msgid "Internal error. Could not print group.\n"

+ msgstr "內部錯誤。無法列出群組。\n"

+ 

+ #: tools/sss_userdel.c:46

+ #, fuzzy

+ msgid "Remove home directory and mail spool"

+ msgstr "移除家目錄與郵件 spool"

+ 

+ #: tools/sss_userdel.c:47

+ #, fuzzy

+ msgid "Do not remove home directory and mail spool"

+ msgstr "不要移除家目錄與郵件 spool"

+ 

+ #: tools/sss_userdel.c:48

+ msgid "Force removal of files not owned by the user"

+ msgstr "強制檔案的移除並非由使用者所擁有"

+ 

+ #: tools/sss_userdel.c:91

+ msgid "Specify user to delete\n"

+ msgstr "指定要刪除的使用者\n"

+ 

+ #: tools/sss_userdel.c:141

+ #, c-format

+ msgid "User %s is outside the defined ID range for domain\n"

+ msgstr "使用者 %s 位於為網域所定義的 ID 範圍外\n"

+ 

+ #: tools/sss_userdel.c:172

+ msgid "Not removing home dir - not owned by user\n"

+ msgstr "不會移除家目錄 - 並非由使用者所擁有\n"

+ 

+ #: tools/sss_userdel.c:174

+ #, c-format

+ msgid "Cannot remove homedir: %s\n"

+ msgstr "無法移除家目錄:%s\n"

+ 

+ #: tools/sss_userdel.c:186

+ msgid ""

+ "No such user in local domain. Removing users only allowed in local domain.\n"

+ msgstr "在本機網域內沒有這樣的使用者。只許可在本機網域內移除使用者。\n"

+ 

+ #: tools/sss_userdel.c:191

+ msgid "Internal error. Could not remove user.\n"

+ msgstr "內部錯誤。無法移除使用者。\n"

+ 

+ #: tools/sss_usermod.c:48

+ msgid "The GID of the user"

+ msgstr "使用者的 GID"

+ 

+ #: tools/sss_usermod.c:52

+ #, fuzzy

+ msgid "Groups to add this user to"

+ msgstr "將此使用者加入何群組"

+ 

+ #: tools/sss_usermod.c:53

+ #, fuzzy

+ msgid "Groups to remove this user from"

+ msgstr "將此使用者從何群組移除"

+ 

+ #: tools/sss_usermod.c:54

+ msgid "Lock the account"

+ msgstr "鎖住這個帳號"

+ 

+ #: tools/sss_usermod.c:55

+ msgid "Unlock the account"

+ msgstr "解除這個帳號的鎖"

+ 

+ #: tools/sss_usermod.c:115

+ msgid "Specify user to modify\n"

+ msgstr "指定要修改的使用者\n"

+ 

+ #: tools/sss_usermod.c:146

+ msgid ""

+ "Cannot find user in local domain, modifying users is allowed only in local "

+ "domain\n"

+ msgstr "在本機網域內找不到使用者,只許可在本機網域內修改使用者\n"

+ 

+ #: tools/sss_usermod.c:241

+ msgid "Could not modify user - check if group names are correct\n"

+ msgstr "無法修改使用者 - 請檢查群組名稱是否正確\n"

+ 

+ #: tools/sss_usermod.c:245

+ msgid "Could not modify user - user already member of groups?\n"

+ msgstr "無法修改使用者 - 使用者是否已經是群組的成員?\n"

+ 

+ #: tools/sss_usermod.c:249

+ msgid "Transaction error. Could not modify user.\n"

+ msgstr "處理事項發生錯誤。無法修改使用者。\n"

+ 

+ #: tools/tools_util.c:292

+ msgid "Out of memory\n"

+ msgstr "記憶體耗盡\n"

+ 

+ #: tools/tools_util.h:34

+ #, c-format

+ msgid "%s must be run as root\n"

+ msgstr "%s 必須以 root 身分執行\n"

+ 

+ #: util/util.h:63

+ msgid "Send the debug output to files instead of stderr"

+ msgstr "傳送除錯輸出到檔案而不是標準輸出"

+ 

+ #, fuzzy

+ #~ msgid "Your password will expire in %d %s."

+ #~ msgstr ",您快取的密碼將在此刻過期:"

file modified
+12 -8
@@ -149,9 +149,8 @@

      if (req == NULL) return NULL;

  

      state->fd = fd;

-     state->buf = talloc_array(state, uint8_t, MAX_CHILD_MSG_SIZE);

+     state->buf = NULL;

      state->len = 0;

-     if (state->buf == NULL) goto fail;

  

      fde = tevent_add_fd(ev, state, fd, TEVENT_FD_READ,

                          read_pipe_handler, req);
@@ -176,6 +175,7 @@

                                                      struct read_pipe_state);

      ssize_t size;

      errno_t err;

+     uint8_t buf[CHILD_MSG_CHUNK];

  

      if (flags & TEVENT_FD_WRITE) {

          DEBUG(1, ("read_pipe_done called with TEVENT_FD_WRITE,"
@@ -185,8 +185,8 @@

      }

  

      size = read(state->fd,

-                 state->buf + state->len,

-                 MAX_CHILD_MSG_SIZE - state->len);

+                 buf,

+                 CHILD_MSG_CHUNK);

      if (size == -1) {

          err = errno;

          if (err == EAGAIN || err == EINTR) {
@@ -198,13 +198,17 @@

          return;

  

      } else if (size > 0) {

-         state->len += size;

-         if (state->len > MAX_CHILD_MSG_SIZE) {

-             DEBUG(1, ("read to much, this should never happen.\n"));

-             tevent_req_error(req, EINVAL);

+         state->buf = talloc_realloc(state, state->buf, uint8_t,

+                                     state->len + size);

+         if(!state->buf) {

+             tevent_req_error(req, ENOMEM);

              return;

          }

  

+         safealign_memcpy(&state->buf[state->len], buf,

+                          size, &state->len);

+         return;

+ 

      } else if (size == 0) {

          DEBUG(6, ("EOF received, client finished\n"));

          tevent_req_done(req);

file modified
+2 -3
@@ -33,12 +33,11 @@

  #include "util/util.h"

  

  #define IN_BUF_SIZE         512

- #define MAX_CHILD_MSG_SIZE  255

+ #define CHILD_MSG_CHUNK     256

  

  struct response {

-     size_t max_size;

-     size_t size;

      uint8_t *buf;

+     size_t size;

  };

  

  struct io_buffer {

@@ -60,6 +60,7 @@

      { MON_CLI_METHOD_PING, monitor_common_pong },

      { MON_CLI_METHOD_RES_INIT, data_provider_res_init },

      { MON_CLI_METHOD_OFFLINE, data_provider_go_offline },

+     { MON_CLI_METHOD_ROTATE, monitor_common_rotate_logs },

      { NULL, NULL }

  };

  

file modified
+3 -20
@@ -336,12 +336,9 @@

  int dp_common_send_id(struct sbus_connection *conn, uint16_t version,

                        const char *name)

  {

-     DBusPendingCall *pending_reply;

-     DBusConnection *dbus_conn;

      DBusMessage *msg;

      dbus_bool_t ret;

- 

-     dbus_conn = sbus_get_connection(conn);

+     int retval;

  

      /* create the message */

      msg = dbus_message_new_method_call(NULL,
@@ -365,23 +362,9 @@

          return EIO;

      }

  

-     ret = dbus_connection_send_with_reply(dbus_conn, msg, &pending_reply,

-                                           30000 /* TODO: set timeout */);

-     if (!ret || !pending_reply) {

-         /*

-          * Critical Failure

-          * We can't communicate on this connection

-          * We'll drop it using the default destructor.

-          */

-         DEBUG(0, ("D-BUS send failed.\n"));

-         dbus_message_unref(msg);

-         return EIO;

-     }

+     retval = sbus_conn_send(conn, msg, 30000, id_callback, NULL, NULL);

  

-     /* Set up the reply handler */

-     dbus_pending_call_set_notify(pending_reply, id_callback, NULL, NULL);

      dbus_message_unref(msg);

- 

-     return EOK;

+     return retval;

  }

  

file modified
+20 -15
@@ -48,8 +48,8 @@

  #define IPA_HOST_CATEGORY "hostCategory"

  #define IPA_CN "cn"

  

- #define IPA_HOST_BASE_TMPL "cn=computers,cn=accounts,dc=%s"

- #define IPA_HBAC_BASE_TMPL "cn=hbac,dc=%s"

+ #define IPA_HOST_BASE_TMPL "cn=computers,cn=accounts,%s"

+ #define IPA_HBAC_BASE_TMPL "cn=hbac,%s"

  

  #define SYSDB_HBAC_BASE_TMPL "cn=hbac,"SYSDB_TMPL_CUSTOM_BASE

  
@@ -340,7 +340,7 @@

                                                    bool offline,

                                                    struct sdap_id_ctx *sdap_ctx,

                                                    struct sysdb_ctx *sysdb,

-                                                   const char *ipa_domain,

+                                                   const char *basedn,

                                                    const char **hostnames)

  {

      struct tevent_req *req = NULL;
@@ -349,7 +349,7 @@

      int ret;

      int i;

  

-     if (hostnames == NULL || ipa_domain == NULL) {

+     if (hostnames == NULL || basedn == NULL) {

          DEBUG(1, ("Missing hostnames or domain.\n"));

          return NULL;

      }
@@ -394,7 +394,7 @@

      }

  

      state->host_search_base = talloc_asprintf(state, IPA_HOST_BASE_TMPL,

-                                               ipa_domain);

+                                               basedn);

      if (state->host_search_base == NULL) {

          DEBUG(1, ("Failed to create host search base.\n"));

          ret = ENOMEM;
@@ -832,7 +832,7 @@

                                               bool offline,

                                               struct sdap_id_ctx *sdap_ctx,

                                               struct sysdb_ctx *sysdb,

-                                              const char *ipa_domain,

+                                              const char *basedn,

                                               const char *host_dn,

                                               const char **memberof)

  {
@@ -842,7 +842,7 @@

      int ret;

      int i;

  

-     if (host_dn == NULL || ipa_domain == NULL) {

+     if (host_dn == NULL || basedn == NULL) {

          DEBUG(1, ("Missing host_dn or domain.\n"));

          return NULL;

      }
@@ -867,7 +867,7 @@

      state->current_item = 0;

  

      state->hbac_search_base = talloc_asprintf(state, IPA_HBAC_BASE_TMPL,

-                                               ipa_domain);

+                                               basedn);

      if (state->hbac_search_base == NULL) {

          DEBUG(1, ("Failed to create HBAC search base.\n"));

          ret = ENOMEM;
@@ -1642,6 +1642,7 @@

      int pam_status = PAM_SYSTEM_ERR;

      struct ipa_access_ctx *ipa_access_ctx;

      const char *hostlist[3];

+     int ret;

  

      pd = talloc_get_type(be_req->req_data, struct pam_data);

  
@@ -1658,6 +1659,13 @@

      hbac_ctx->sdap_ctx = ipa_access_ctx->sdap_ctx;

      hbac_ctx->ipa_options = ipa_access_ctx->ipa_options;

      hbac_ctx->tr_ctx = ipa_access_ctx->tr_ctx;

+     ret = domain_to_basedn(hbac_ctx,

+                            dp_opt_get_string(hbac_ctx->ipa_options, IPA_DOMAIN),

+                            &hbac_ctx->ldap_basedn);

+     if (ret != EOK) {

+         DEBUG(1, ("domain_to_basedn failed.\n"));

+         goto fail;

+     }

      hbac_ctx->offline = be_is_offline(be_req->be_ctx);

  

      DEBUG(9, ("Connection status is [%s].\n", hbac_ctx->offline ? "offline" :
@@ -1682,10 +1690,8 @@

      hostlist[2] = NULL;

  

      req = hbac_get_host_info_send(hbac_ctx, be_req->be_ctx->ev,

-                                   hbac_ctx->offline,

-                                   hbac_ctx->sdap_ctx, be_req->be_ctx->sysdb,

-                                   dp_opt_get_string(hbac_ctx->ipa_options,

-                                                     IPA_DOMAIN),

+                                   hbac_ctx->offline, hbac_ctx->sdap_ctx,

+                                   be_req->be_ctx->sysdb, hbac_ctx->ldap_basedn,

                                    hostlist);

      if (req == NULL) {

          DEBUG(1, ("hbac_get_host_info_send failed.\n"));
@@ -1744,9 +1750,8 @@

      }

      req = hbac_get_rules_send(hbac_ctx, be_req->be_ctx->ev, hbac_ctx->offline,

                                hbac_ctx->sdap_ctx, be_req->be_ctx->sysdb,

-                               dp_opt_get_string(hbac_ctx->ipa_options,

-                                                 IPA_DOMAIN),

-                               local_hhi->dn, local_hhi->memberof);

+                               hbac_ctx->ldap_basedn, local_hhi->dn,

+                               local_hhi->memberof);

      if (req == NULL) {

          DEBUG(1, ("hbac_get_rules_send failed.\n"));

          goto fail;

@@ -59,6 +59,7 @@

      size_t groups_count;

      const char **groups;

      bool offline;

+     char *ldap_basedn;

  };

  

  void ipa_access_handler(struct be_req *be_req);

file modified
+16 -38
@@ -24,6 +24,8 @@

  

  #include <netdb.h>

  #include <ctype.h>

+ #include <arpa/inet.h>

+ 

  #include "providers/ipa/ipa_common.h"

  

  struct dp_option ipa_basic_opts[] = {
@@ -117,36 +119,10 @@

      { "krb5_changepw_principal", DP_OPT_STRING, { "kadmin/changepw" }, NULL_STRING },

      { "krb5_auth_timeout", DP_OPT_NUMBER, { .number = 15 }, NULL_NUMBER },

      { "krb5_keytab", DP_OPT_STRING, { "/etc/krb5.keytab" }, NULL_STRING },

-     { "krb5_validate", DP_OPT_BOOL, BOOL_TRUE, BOOL_TRUE }

+     { "krb5_validate", DP_OPT_BOOL, BOOL_TRUE, BOOL_TRUE },

+     { "krb5_kpasswd", DP_OPT_STRING, NULL_STRING, NULL_STRING }

  };

  

- int domain_to_basedn(TALLOC_CTX *memctx, const char *domain, char **basedn)

- {

-     const char *s;

-     char *dn;

-     char *p;

-     int l;

- 

-     s = domain;

-     dn = talloc_strdup(memctx, "dc=");

- 

-     while ((p = strchr(s, '.'))) {

-         l = p - s;

-         dn = talloc_asprintf_append_buffer(dn, "%.*s,dc=", l, s);

-         if (!dn) {

-             return ENOMEM;

-         }

-         s = p + 1;

-     }

-     dn = talloc_strdup_append_buffer(dn, s);

-     if (!dn) {

-         return ENOMEM;

-     }

- 

-     *basedn = dn;

-     return EOK;

- }

- 

  int ipa_get_options(TALLOC_CTX *memctx,

                      struct confdb_ctx *cdb,

                      const char *conf_path,
@@ -386,11 +362,6 @@

      return ret;

  }

  

- /* the following define is used to keep track of * the options in the krb5

-  * module, so that if they change and ipa is not updated correspondingly

-  * this will trigger a runtime abort error */

- #define IPA_KRB5_OPTS_TEST 8

- 

  int ipa_get_auth_options(struct ipa_options *ipa_opts,

                           struct confdb_ctx *cdb,

                           const char *conf_path,
@@ -472,9 +443,15 @@

          return;

      }

  

-     address = talloc_asprintf(service, "%s", srvaddr->h_name);

-     if (!address) {

-         DEBUG(1, ("Failed to copy address ...\n"));

+     address = talloc_zero_size(service, 128);

+     if (address == NULL) {

+         DEBUG(1, ("talloc_zero failed.\n"));

+         return;

+     }

+ 

+     if (inet_ntop(srvaddr->h_addrtype, srvaddr->h_addr_list[0],

+                   address, 128) == NULL) {

+         DEBUG(1, ("inet_ntop failed [%d][%s].\n", errno, strerror(errno)));

          return;

      }

  
@@ -491,9 +468,10 @@

      talloc_zfree(service->krb5_service->address);

      service->krb5_service->address = address;

  

-     ret = write_kdcinfo_file(service->krb5_service->realm, address);

+     ret = write_krb5info_file(service->krb5_service->realm, address,

+                               SSS_KRB5KDC_FO_SRV);

      if (ret != EOK) {

-         DEBUG(2, ("write_kdcinfo_file failed, authentication might fail.\n"));

+         DEBUG(2, ("write_krb5info_file failed, authentication might fail.\n"));

      }

  

  }

@@ -32,11 +32,16 @@

      struct krb5_service *krb5_service;

  };

  

- /* the following define is used to keep track of the options in the ldap

+ /* the following defines are used to keep track of the options in the ldap

   * module, so that if they change and ipa is not updated correspondingly

   * this will trigger a runtime abort error */

  #define IPA_OPTS_BASIC_TEST 32

  

+ /* the following define is used to keep track of the options in the krb5

+  * module, so that if they change and ipa is not updated correspondingly

+  * this will trigger a runtime abort error */

+ #define IPA_KRB5_OPTS_TEST 9

+ 

  enum ipa_basic_opt {

      IPA_DOMAIN = 0,

      IPA_SERVER,
@@ -59,6 +64,8 @@

      struct krb5_ctx *auth_ctx;

  };

  

+ int domain_to_basedn(TALLOC_CTX *memctx, const char *domain, char **basedn);

+ 

  /* options parsers */

  int ipa_get_options(TALLOC_CTX *memctx,

                      struct confdb_ctx *cdb,

@@ -0,0 +1,57 @@

+ /*

+     SSSD

+ 

+     IPA Provider Utility Functions

+ 

+     Authors:

+         Simo Sorce <ssorce@redhat.com>, Sumit Bose <sbose@redhat.com>

+ 

+     Copyright (C) 2009-2010 Red Hat

+ 

+     This program is free software; you can redistribute it and/or modify

+     it under the terms of the GNU General Public License as published by

+     the Free Software Foundation; either version 3 of the License, or

+     (at your option) any later version.

+ 

+     This program 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 General Public License for more details.

+ 

+     You should have received a copy of the GNU General Public License

+     along with this program.  If not, see <http://www.gnu.org/licenses/>.

+ */

+ 

+ 

+ #include "providers/ipa/ipa_common.h"

+ 

+ int domain_to_basedn(TALLOC_CTX *memctx, const char *domain, char **basedn)

+ {

+     const char *s;

+     char *dn;

+     char *p;

+     int l;

+ 

+     if (!domain || !basedn) {

+         return EINVAL;

+     }

+ 

+     s = domain;

+     dn = talloc_strdup(memctx, "dc=");

+ 

+     while ((p = strchr(s, '.'))) {

+         l = p - s;

+         dn = talloc_asprintf_append_buffer(dn, "%.*s,dc=", l, s);

+         if (!dn) {

+             return ENOMEM;

+         }

+         s = p + 1;

+     }

+     dn = talloc_strdup_append_buffer(dn, s);

+     if (!dn) {

+         return ENOMEM;

+     }

+ 

+     *basedn = dn;

+     return EOK;

+ }

file modified
+87 -11
@@ -676,7 +676,9 @@

  }

  

  static void get_user_attr_done(void *pvt, int err, struct ldb_result *res);

- static void krb5_resolve_done(struct tevent_req *req);

+ static void krb5_resolve_kdc_done(struct tevent_req *req);

+ static void krb5_resolve_kpasswd_done(struct tevent_req *req);

+ static void krb5_find_ccache_step(struct krb5child_req *kr);

  static void krb5_save_ccname_done(struct tevent_req *req);

  static void krb5_child_done(struct tevent_req *req);

  static void krb5_pam_handler_cache_done(struct tevent_req *treq);
@@ -852,14 +854,16 @@

          break;

      }

  

+     kr->srv = NULL;

+     kr->kpasswd_srv = NULL;

      req = be_resolve_server_send(kr, be_req->be_ctx->ev, be_req->be_ctx,

                                   krb5_ctx->service->name);

      if (req == NULL) {

-         DEBUG(1, ("handle_child_send failed.\n"));

+         DEBUG(1, ("be_resolve_server_send failed.\n"));

          goto failed;

      }

  

-     tevent_req_set_callback(req, krb5_resolve_done, kr);

+     tevent_req_set_callback(req, krb5_resolve_kdc_done, kr);

  

      return;

  
@@ -870,17 +874,13 @@

      krb_reply(be_req, dp_err, pd->pam_status);

  }

  

- static void krb5_resolve_done(struct tevent_req *req)

+ static void krb5_resolve_kdc_done(struct tevent_req *req)

  {

      struct krb5child_req *kr = tevent_req_callback_data(req,

                                                          struct krb5child_req);

      int ret;

-     int pam_status = PAM_SYSTEM_ERR;

-     int dp_err = DP_ERR_FATAL;

      struct pam_data *pd = kr->pd;

      struct be_req *be_req = kr->req;

-     char *msg;

-     size_t offset = 0;

  

      ret = be_resolve_server_recv(req, &kr->srv);

      talloc_zfree(req);
@@ -891,8 +891,68 @@

           * the ccache file. */

          be_mark_offline(be_req->be_ctx);

          kr->is_offline = true;

+     } else {

+         if (pd->cmd == SSS_PAM_CHAUTHTOK &&

+             kr->krb5_ctx->kpasswd_service != NULL) {

+             req = be_resolve_server_send(kr, be_req->be_ctx->ev, be_req->be_ctx,

+                                          kr->krb5_ctx->kpasswd_service->name);

+             if (req == NULL) {

+                 DEBUG(1, ("be_resolve_server_send failed.\n"));

+                 goto failed;

+             }

+ 

+             tevent_req_set_callback(req, krb5_resolve_kpasswd_done, kr);

+ 

+             return;

+         }

      }

  

+     krb5_find_ccache_step(kr);

+     return;

+ 

+ failed:

+     talloc_free(kr);

+ 

+     pd->pam_status = PAM_SYSTEM_ERR;

+     krb_reply(be_req, DP_ERR_FATAL, pd->pam_status);

+ }

+ 

+ static void krb5_resolve_kpasswd_done(struct tevent_req *req)

+ {

+     struct krb5child_req *kr = tevent_req_callback_data(req,

+                                                         struct krb5child_req);

+     int ret;

+     struct pam_data *pd = kr->pd;

+     struct be_req *be_req = kr->req;

+ 

+     ret = be_resolve_server_recv(req, &kr->kpasswd_srv);

+     talloc_zfree(req);

+     if (ret) {

+         /* all kpasswd servers have been tried and none was found good, but the

+          * kdc seems ok. Password changes are not possible but

+          * authentication. We return an PAM error here, but do not mark the

+          * backend offline. */

+ 

+         talloc_free(kr);

+         pd->pam_status = PAM_AUTHTOK_LOCK_BUSY;

+         krb_reply(be_req, DP_ERR_OK, pd->pam_status);

+     }

+ 

+     krb5_find_ccache_step(kr);

+ }

+ 

+ static void krb5_find_ccache_step(struct krb5child_req *kr)

+ {

+     int ret;

+     int pam_status = PAM_SYSTEM_ERR;

+     int dp_err = DP_ERR_FATAL;

+     struct pam_data *pd = kr->pd;

+     struct be_req *be_req = kr->req;

+     char *msg;

+     size_t offset = 0;

+     bool private_path = false;

+     struct tevent_req *req = NULL;

+ 

      if (kr->ccname == NULL ||

          (be_is_offline(be_req->be_ctx) && !kr->active_ccache_present &&

              !kr->valid_tgt_present) ||
@@ -916,12 +976,20 @@

              }

              kr->ccname = expand_ccname_template(kr, kr,

                                            dp_opt_get_cstring(kr->krb5_ctx->opts,

-                                                              KRB5_CCNAME_TMPL)

-                                     );

+                                                              KRB5_CCNAME_TMPL),

+                                                 true, &private_path);

              if (kr->ccname == NULL) {

                  DEBUG(1, ("expand_ccname_template failed.\n"));

                  goto done;

              }

+ 

+             ret = create_ccache_dir(kr, kr->ccname,

+                                     kr->krb5_ctx->illegal_path_re,

+                                     kr->uid, kr->gid, private_path);

+             if (ret != EOK) {

+                 DEBUG(1, ("create_ccache_dir failed.\n"));

+                 goto done;

+             }

      }

  

      if (be_is_offline(be_req->be_ctx)) {
@@ -1023,7 +1091,7 @@

                                                  *msg_len));

  

      if ((p + *msg_len) != len) {

-         DEBUG(1, ("message format error.\n"));

+         DEBUG(1, ("message format error [%d] != [%d].\n", p+*msg_len, len));

          goto done;

      }

  
@@ -1072,6 +1140,14 @@

          fo_set_port_status(kr->srv, PORT_WORKING);

      }

  

+     if (kr->kpasswd_srv != NULL) {

+         if (*msg_status == PAM_AUTHTOK_LOCK_BUSY) {

+             fo_set_port_status(kr->kpasswd_srv, PORT_NOT_WORKING);

+         } else {

+             fo_set_port_status(kr->kpasswd_srv, PORT_WORKING);

+         }

+     }

+ 

      struct sysdb_attrs *attrs;

      attrs = sysdb_new_attrs(kr);

      ret = sysdb_attrs_add_string(attrs, SYSDB_CCACHE_FILE, kr->ccname);

@@ -26,6 +26,8 @@

  #ifndef __KRB5_AUTH_H__

  #define __KRB5_AUTH_H__

  

+ #include <pcre.h>

+ 

  #include "util/sss_krb5.h"

  #include "providers/dp_backend.h"

  #include "providers/krb5/krb5_common.h"
@@ -33,6 +35,8 @@

  #define CCACHE_ENV_NAME "KRB5CCNAME"

  #define SSSD_KRB5_CHANGEPW_PRINCIPLE "SSSD_KRB5_CHANGEPW_PRINCIPLE"

  

+ #define ILLEGAL_PATH_PATTERN "//|/\\./|/\\.\\./"

+ 

  typedef enum { INIT_PW, INIT_KT, RENEW, VALIDATE } action_type;

  

  struct krb5child_req {
@@ -53,6 +57,7 @@

      gid_t gid;

      bool is_offline;

      struct fo_server *srv;

+     struct fo_server *kpasswd_srv;

      bool active_ccache_present;

      bool valid_tgt_present;

  };
@@ -86,7 +91,10 @@

  

      struct dp_option *opts;

      struct krb5_service *service;

+     struct krb5_service *kpasswd_service;

      int child_debug_fd;

+ 

+     pcre *illegal_path_re;

  };

  

  void krb5_pam_handler(struct be_req *be_req);

file modified
+13 -19
@@ -247,27 +247,15 @@

      return kerr;

  }

  

- static struct response *init_response(TALLOC_CTX *mem_ctx) {

-     struct response *r;

-     r = talloc(mem_ctx, struct response);

-     r->buf = talloc_size(mem_ctx, MAX_CHILD_MSG_SIZE);

-     if (r->buf == NULL) {

-         DEBUG(1, ("talloc_size failed.\n"));

-         return NULL;

-     }

-     r->max_size = MAX_CHILD_MSG_SIZE;

-     r->size = 0;

- 

-     return r;

- }

- 

  static errno_t pack_response_packet(struct response *resp, int status, int type,

                                      size_t len, const uint8_t *data)

  {

      size_t p = 0;

  

-     if ((3*sizeof(int32_t) + len +1) > resp->max_size) {

-         DEBUG(1, ("response message too big.\n"));

+     resp->buf = talloc_array(resp, uint8_t,

+                              3*sizeof(int32_t) + len);

+     if (!resp->buf) {

+         DEBUG(1, ("Insufficient memory to create message.\n"));

          return ENOMEM;

      }

  
@@ -293,9 +281,9 @@

      size_t user_resp_len;

      uint8_t *user_resp;

  

-     resp = init_response(kr);

+     resp = talloc_zero(kr, struct response);

      if (resp == NULL) {

-         DEBUG(1, ("init_response failed.\n"));

+         DEBUG(1, ("Initializing response failed.\n"));

          return NULL;

      }

  
@@ -321,7 +309,6 @@

              talloc_zfree(msg);

          }

      } else {

- 

          if (user_error_message != NULL) {

              ret = pack_user_info_chpass_error(kr, user_error_message,

                                                &user_resp_len, &user_resp);
@@ -587,9 +574,16 @@

          goto sendresponse;

      }

  

+     memset(&result_code_string, 0, sizeof(krb5_data));

+     memset(&result_string, 0, sizeof(krb5_data));

      kerr = krb5_change_password(kr->ctx, kr->creds, newpass_str, &result_code,

                                  &result_code_string, &result_string);

  

+     if (kerr == KRB5_KDC_UNREACH) {

+         pam_status = PAM_AUTHTOK_LOCK_BUSY;

+         goto sendresponse;

+     }

+ 

      if (kerr != 0 || result_code != 0) {

          if (kerr != 0) {

              KRB5_DEBUG(1, kerr);

file modified
+103 -44
@@ -25,6 +25,8 @@

  #include <sys/stat.h>

  #include <unistd.h>

  #include <netdb.h>

+ #include <arpa/inet.h>

+ #include <ctype.h>

  

  #include "providers/dp_backend.h"

  #include "providers/krb5/krb5_common.h"
@@ -37,7 +39,8 @@

      { "krb5_changepw_principal", DP_OPT_STRING, { "kadmin/changepw" }, NULL_STRING },

      { "krb5_auth_timeout", DP_OPT_NUMBER, { .number = 15 }, NULL_NUMBER },

      { "krb5_keytab", DP_OPT_STRING, { "/etc/krb5.keytab" }, NULL_STRING },

-     { "krb5_validate", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }

+     { "krb5_validate", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE },

+     { "krb5_kpasswd", DP_OPT_STRING, NULL_STRING, NULL_STRING }

  };

  

  errno_t check_and_export_options(struct dp_option *opts,
@@ -47,8 +50,6 @@

      char *value;

      const char *realm;

      const char *dummy;

-     struct stat stat_buf;

-     char **list;

  

      realm = dp_opt_get_cstring(opts, KRB5_REALM);

      if (realm == NULL) {
@@ -68,31 +69,13 @@

  

      dummy = dp_opt_get_cstring(opts, KRB5_KDC);

      if (dummy == NULL) {

-         DEBUG(1, ("No KDC expicitly configured, using defaults"));

-     } else {

-         ret = split_on_separator(opts, dummy, ',', true, &list, NULL);

-         if (ret != EOK) {

-             DEBUG(1, ("Failed to parse server list!\n"));

-             return ret;

-         }

-         ret = write_kdcinfo_file(realm, list[0]);

-         if (ret != EOK) {

-             DEBUG(1, ("write_kdcinfo_file failed, "

-                       "using kerberos defaults from /etc/krb5.conf"));

-         }

-         talloc_free(list);

+         DEBUG(1, ("No KDC explicitly configured, using defaults"));

      }

  

-     dummy = dp_opt_get_cstring(opts, KRB5_CCACHEDIR);

-     ret = lstat(dummy, &stat_buf);

-     if (ret != EOK) {

-         DEBUG(1, ("lstat for [%s] failed: [%d][%s].\n", dummy, errno,

-                   strerror(errno)));

-         return ret;

-     }

-     if ( !S_ISDIR(stat_buf.st_mode) ) {

-         DEBUG(1, ("Value of krb5ccache_dir [%s] is not a directory.\n", dummy));

-         return EINVAL;

+     dummy = dp_opt_get_cstring(opts, KRB5_KPASSWD);

+     if (dummy == NULL) {

+         DEBUG(1, ("No kpasswd server explicitly configured, "

+                   "using the KDC or defaults"));

      }

  

      dummy = dp_opt_get_cstring(opts, KRB5_CCNAME_TMPL);
@@ -164,21 +147,33 @@

      return ret;

  }

  

- errno_t write_kdcinfo_file(const char *realm, const char *kdc)

+ errno_t write_krb5info_file(const char *realm, const char *server,

+                            const char *service)

  {

      int ret;

      int fd = -1;

      char *tmp_name = NULL;

-     char *kdcinfo_name = NULL;

+     char *krb5info_name = NULL;

      TALLOC_CTX *tmp_ctx = NULL;

-     int kdc_len;

+     const char *name_tmpl = NULL;

+     int server_len;

+ 

+     if (realm == NULL || *realm == '\0' || server == NULL || *server == '\0' ||

+         service == NULL || service == '\0') {

+         DEBUG(1, ("Missing or empty realm, server or service.\n"));

+         return EINVAL;

+     }

  

-     if (realm == NULL || *realm == '\0' || kdc == NULL || *kdc == '\0') {

-         DEBUG(1, ("Missing or empty realm or kdc.\n"));

+     if (strcmp(service, SSS_KRB5KDC_FO_SRV) == 0) {

+         name_tmpl = KDCINFO_TMPL;

+     } else if (strcmp(service, SSS_KRB5KPASSWD_FO_SRV) == 0) {

+         name_tmpl = KPASSWDINFO_TMPL;

+     } else {

+         DEBUG(1, ("Unsupported service [%s]\n.", service));

          return EINVAL;

      }

  

-     kdc_len = strlen(kdc);

+     server_len = strlen(server);

  

      tmp_ctx = talloc_new(NULL);

      if (tmp_ctx == NULL) {
@@ -186,15 +181,15 @@

          return ENOMEM;

      }

  

-     tmp_name = talloc_asprintf(tmp_ctx, PUBCONF_PATH"/.kdcinfo_dummy_XXXXXX");

+     tmp_name = talloc_asprintf(tmp_ctx, PUBCONF_PATH"/.krb5info_dummy_XXXXXX");

      if (tmp_name == NULL) {

          DEBUG(1, ("talloc_asprintf failed.\n"));

          ret = ENOMEM;

          goto done;

      }

  

-     kdcinfo_name = talloc_asprintf(tmp_ctx, KDCINFO_TMPL, realm);

-     if (kdcinfo_name == NULL) {

+     krb5info_name = talloc_asprintf(tmp_ctx, name_tmpl, realm);

+     if (krb5info_name == NULL) {

          DEBUG(1, ("talloc_asprintf failed.\n"));

          ret = ENOMEM;

          goto done;
@@ -207,12 +202,12 @@

          goto done;

      }

  

-     ret = write(fd, kdc, kdc_len);

+     ret = write(fd, server, server_len);

      if (ret == -1) {

          DEBUG(1, ("write failed [%d][%s].\n", errno, strerror(errno)));

          goto done;

      }

-     if (ret != kdc_len) {

+     if (ret != server_len) {

          DEBUG(1, ("Partial write occured, this should never happen.\n"));

          ret = EINTR;

          goto done;
@@ -230,7 +225,7 @@

          goto done;

      }

  

-     ret = rename(tmp_name, kdcinfo_name);

+     ret = rename(tmp_name, krb5info_name);

      if (ret == -1) {

          DEBUG(1, ("rename failed [%d][%s].\n", errno, strerror(errno)));

          goto done;
@@ -261,18 +256,32 @@

          return;

      }

  

-     address = talloc_asprintf(krb5_service, "%s", srvaddr->h_name);

-     if (!address) {

-         DEBUG(1, ("Failed to copy address ...\n"));

+     address = talloc_zero_size(krb5_service, 128);

+     if (address == NULL) {

+         DEBUG(1, ("talloc_zero failed.\n"));

+         return;

+     }

+ 

+     if (inet_ntop(srvaddr->h_addrtype, srvaddr->h_addr_list[0],

+                   address, 128) == NULL) {

+         DEBUG(1, ("inet_ntop failed [%d][%s].\n", errno, strerror(errno)));

+         return;

+     }

+ 

+     address = talloc_asprintf_append(address, ":%d",

+                                      fo_get_server_port(server));

+     if (address == NULL) {

+         DEBUG(1, ("talloc_asprintf_append failed.\n"));

          return;

      }

  

      talloc_zfree(krb5_service->address);

      krb5_service->address = address;

  

-     ret = write_kdcinfo_file(krb5_service->realm, address);

+     ret = write_krb5info_file(krb5_service->realm, address,

+                               krb5_service->name);

      if (ret != EOK) {

-         DEBUG(2, ("write_kdcinfo_file failed, authentication might fail.\n"));

+         DEBUG(2, ("write_krb5info_file failed, authentication might fail.\n"));

      }

  

      return;
@@ -288,6 +297,11 @@

      char **list = NULL;

      int ret;

      int i;

+     char *port_str;

+     long port;

+     char *server_spec;

+     char *endptr;

+     struct servent *servent;

  

      tmp_ctx = talloc_new(memctx);

      if (!tmp_ctx) {
@@ -327,8 +341,53 @@

      for (i = 0; list[i]; i++) {

  

          talloc_steal(service, list[i]);

+         server_spec = talloc_strdup(service, list[i]);

+         port_str = strrchr(server_spec, ':');

+         if (port_str == NULL) {

+             port = 0;

+         } else {

+             *port_str = '\0';

+             ++port_str;

+             if (isdigit(*port_str)) {

+                 errno = 0;

+                 port = strtol(port_str, &endptr, 10);

+                 if (errno != 0) {

+                     ret = errno;

+                     DEBUG(1, ("strtol failed on [%s]: [%d][%s].\n", port_str,

+                               ret, strerror(ret)));

+                     goto done;

+                 }

+                 if (*endptr != '\0') {

+                     DEBUG(1, ("Found additional characters [%s] in port number "

+                               "[%s].\n", endptr, port_str));

+                     ret = EINVAL;

+                     goto done;

+                 }

+ 

+                 if (port < 1 || port > 65535) {

+                     DEBUG(1, ("Illegal port number [%d].\n", port));

+                     ret = EINVAL;

+                     goto done;

+                 }

+             } else if (isalpha(*port_str)) {

+                 servent = getservbyname(port_str, NULL);

+                 if (servent == NULL) {

+                     DEBUG(1, ("getservbyname cannot find service [%s].\n",

+                               port_str));

+                     ret = EINVAL;

+                     goto done;

+                 }

+ 

+                 port = servent->s_port;

+             } else {

+                 DEBUG(1, ("Unsupported port specifier in [%s].\n", list[i]));

+                 ret = EINVAL;

+                 goto done;

+             }

+         }

  

-         ret = be_fo_add_server(ctx, service_name, list[i], 0, NULL);

+         ret = be_fo_add_server(ctx, service_name, server_spec, (int) port,

+                                list[i]);

          if (ret && ret != EEXIST) {

              DEBUG(0, ("Failed to add server\n"));

              goto done;

@@ -38,6 +38,10 @@

  #define SSSD_KRB5_CHANGEPW_PRINCIPLE "SSSD_KRB5_CHANGEPW_PRINCIPLE"

  

  #define KDCINFO_TMPL PUBCONF_PATH"/kdcinfo.%s"

+ #define KPASSWDINFO_TMPL PUBCONF_PATH"/kpasswdinfo.%s"

+ 

+ #define SSS_KRB5KDC_FO_SRV "KRB5KDC"

+ #define SSS_KRB5KPASSWD_FO_SRV "KRB5KPASSWD"

  

  enum krb5_opts {

      KRB5_KDC = 0,
@@ -48,6 +52,7 @@

      KRB5_AUTH_TIMEOUT,

      KRB5_KEYTAB,

      KRB5_VALIDATE,

+     KRB5_KPASSWD,

  

      KRB5_OPTS

  };
@@ -64,7 +69,8 @@

  errno_t krb5_get_options(TALLOC_CTX *memctx, struct confdb_ctx *cdb,

                           const char *conf_path, struct dp_option **_opts);

  

- errno_t write_kdcinfo_file(const char *realm, const char *kdc);

+ errno_t write_krb5info_file(const char *realm, const char *kdc,

+                             const char *service);

  

  int krb5_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx,

                        const char *service_name, const char *servers,

@@ -52,7 +52,11 @@

      unsigned v;

      FILE *debug_filep;

      const char *krb5_servers;

+     const char *krb5_kpasswd_servers;

      const char *krb5_realm;

+     const char *errstr;

+     int errval;

+     int errpos;

  

      if (krb5_options == NULL) {

          krb5_options = talloc_zero(bectx, struct krb5_options);
@@ -95,13 +99,27 @@

          return EINVAL;

      }

  

-     ret = krb5_service_init(ctx, bectx, "KRB5", krb5_servers, krb5_realm,

-                             &ctx->service);

+     ret = krb5_service_init(ctx, bectx, SSS_KRB5KDC_FO_SRV, krb5_servers,

+                             krb5_realm, &ctx->service);

      if (ret != EOK) {

-         DEBUG(0, ("Failed to init IPA failover service!\n"));

+         DEBUG(0, ("Failed to init KRB5 failover service!\n"));

          return ret;

      }

  

+     krb5_kpasswd_servers = dp_opt_get_string(ctx->opts, KRB5_KPASSWD);

+     if (krb5_kpasswd_servers == NULL) {

+         DEBUG(0, ("Missing krb5_kpasswd option, using KDC!\n"));

+         ctx->kpasswd_service = NULL;

+     } else {

+         ret = krb5_service_init(ctx, bectx, SSS_KRB5KPASSWD_FO_SRV,

+                                 krb5_kpasswd_servers, krb5_realm,

+                                 &ctx->kpasswd_service);

+         if (ret != EOK) {

+             DEBUG(0, ("Failed to init KRB5KPASSWD failover service!\n"));

+             return ret;

+         }

+     }

+ 

      ret = check_and_export_options(ctx->opts, bectx->domain);

      if (ret != EOK) {

          DEBUG(1, ("check_and_export_options failed.\n"));
@@ -135,6 +153,15 @@

          fcntl(ctx->child_debug_fd, F_SETFD, v & ~FD_CLOEXEC);

      }

  

+     ctx->illegal_path_re = pcre_compile2(ILLEGAL_PATH_PATTERN, 0,

+                                          &errval, &errstr, &errpos, NULL);

+     if (ctx->illegal_path_re == NULL) {

+         DEBUG(1, ("Invalid Regular Expression pattern at position %d. "

+                   "(Error: %d [%s])\n", errpos, errval, errstr));

+         ret = EFAULT;

+         goto fail;

+     }

+ 

      *ops = &krb5_auth_ops;

      *pvt_auth_data = ctx;

      return EOK;

file modified
+258 -5
@@ -29,13 +29,17 @@

  #include "util/util.h"

  

  char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct krb5child_req *kr,

-                              const char *template)

+                              const char *template, bool file_mode,

+                              bool *private_path)

  {

      char *copy;

      char *p;

      char *n;

      char *result = NULL;

      const char *dummy;

+     const char *cache_dir_tmpl;

+ 

+     *private_path = false;

  

      if (template == NULL) {

          DEBUG(1, ("Missing template.\n"));
@@ -72,6 +76,7 @@

                  }

                  result = talloc_asprintf_append(result, "%s%s", p,

                                                  kr->pd->user);

+                 if (!file_mode) *private_path = true;

                  break;

              case 'U':

                  if (kr->uid <= 0) {
@@ -81,6 +86,7 @@

                  }

                  result = talloc_asprintf_append(result, "%s%d", p,

                                                  kr->uid);

+                 if (!file_mode) *private_path = true;

                  break;

              case 'p':

                  if (kr->upn == NULL) {
@@ -89,6 +95,7 @@

                      return NULL;

                  }

                  result = talloc_asprintf_append(result, "%s%s", p, kr->upn);

+                 if (!file_mode) *private_path = true;

                  break;

              case '%':

                  result = talloc_asprintf_append(result, "%s%%", p);
@@ -108,16 +115,35 @@

                      return NULL;

                  }

                  result = talloc_asprintf_append(result, "%s%s", p, kr->homedir);

+                 if (!file_mode) *private_path = true;

                  break;

              case 'd':

-                 dummy = dp_opt_get_string(kr->krb5_ctx->opts, KRB5_CCACHEDIR);

-                 if (dummy == NULL) {

-                     DEBUG(1, ("Missing credential cache directory.\n"));

+                 if (file_mode) {

+                     cache_dir_tmpl = dp_opt_get_string(kr->krb5_ctx->opts,

+                                                        KRB5_CCACHEDIR);

+                     if (cache_dir_tmpl == NULL) {

+                         DEBUG(1, ("Missing credential cache directory.\n"));

+                         return NULL;

+                     }

+ 

+                     dummy = expand_ccname_template(mem_ctx, kr, cache_dir_tmpl,

+                                                    false, private_path);

+                     if (dummy == NULL) {

+                         DEBUG(1, ("Expanding credential cache directory "

+                                   "template failed.\n"));

+                         return NULL;

+                     }

+                     result = talloc_asprintf_append(result, "%s%s", p, dummy);

+                 } else {

+                     DEBUG(1, ("'%%d' is not allowed in this template.\n"));

                      return NULL;

                  }

-                 result = talloc_asprintf_append(result, "%s%s", p, dummy);

                  break;

              case 'P':

+                 if (!file_mode) {

+                     DEBUG(1, ("'%%P' is not allowed in this template.\n"));

+                     return NULL;

+                 }

                  if (kr->pd->cli_pid == 0) {

                      DEBUG(1, ("Cannot expand PID template "

                                "because PID is not available.\n"));
@@ -143,3 +169,230 @@

  

      return result;

  }

+ 

+ static errno_t check_parent_stat(bool private_path, struct stat *parent_stat,

+                                  uid_t uid, gid_t gid)

+ {

+     if (private_path) {

+         if (!((parent_stat->st_uid == 0 && parent_stat->st_gid == 0) ||

+                parent_stat->st_uid == uid)) {

+             DEBUG(1, ("Private directory can only be created below a "

+                       "directory belonging to root or to [%d][%d].\n",

+                       uid, gid));

+             return EINVAL;

+         }

+ 

+         if (parent_stat->st_uid == uid) {

+             if (!(parent_stat->st_mode & S_IXUSR)) {

+                 DEBUG(1, ("Parent directory does have the search bit set for "

+                           "the owner.\n"));

+                 return EINVAL;

+             }

+         } else {

+             if (!(parent_stat->st_mode & S_IXOTH)) {

+                 DEBUG(1, ("Parent directory does have the search bit set for "

+                         "others.\n"));

+                 return EINVAL;

+             }

+         }

+     } else {

+         if (parent_stat->st_uid != 0 || parent_stat->st_gid != 0) {

+             DEBUG(1, ("Public directory cannot be created below a user "

+                       "directory.\n"));

+             return EINVAL;

+         }

+ 

+         if (!(parent_stat->st_mode & S_IXOTH)) {

+             DEBUG(1, ("Parent directory does have the search bit set for "

+                       "others.\n"));

+             return EINVAL;

+         }

+     }

+ 

+     return EOK;

+ }

+ 

+ struct string_list {

+     struct string_list *next;

+     struct string_list *prev;

+     char *s;

+ };

+ 

+ static errno_t find_ccdir_parent_data(TALLOC_CTX *mem_ctx, const char *dirname,

+                                       struct stat *parent_stat,

+                                       struct string_list **missing_parents)

+ {

+     int ret = EFAULT;

+     char *parent = NULL;

+     char *end;

+     struct string_list *li;

+ 

+     ret = stat(dirname, parent_stat);

+     if (ret == EOK) {

+         if ( !S_ISDIR(parent_stat->st_mode) ) {

+             DEBUG(1, ("[%s] is not a directory.\n", dirname));

+             return EINVAL;

+         }

+         return EOK;

+     } else {

+         if (errno != ENOENT) {

+             ret = errno;

+             DEBUG(1, ("stat for [%s] failed: [%d][%s].\n", dirname, ret,

+                       strerror(ret)));

+             return ret;

+         }

+     }

+ 

+     li = talloc_zero(mem_ctx, struct string_list);

+     if (li == NULL) {

+         DEBUG(1, ("talloc_zero failed.\n"));

+         return ENOMEM;

+     }

+ 

+     li->s = talloc_strdup(li, dirname);

+     if (li->s == NULL) {

+         DEBUG(1, ("talloc_strdup failed.\n"));

+         return ENOMEM;

+     }

+ 

+     DLIST_ADD(*missing_parents, li);

+ 

+     parent = talloc_strdup(mem_ctx, dirname);

+     if (parent == NULL) {

+         DEBUG(1, ("talloc_strdup failed.\n"));

+         return ENOMEM;

+     }

+     end = strrchr(parent, '/');

+     if (end == NULL || end == parent) {

+         DEBUG(1, ("Cannot find parent directory of [%s], / is not allowed.\n",

+                    dirname));

+         ret = EINVAL;

+         goto done;

+     }

+     *end = '\0';

+ 

+     ret = find_ccdir_parent_data(mem_ctx, parent, parent_stat, missing_parents);

+ 

+ done:

+     talloc_free(parent);

+     return ret;

+ }

+ 

+ errno_t create_ccache_dir(TALLOC_CTX *mem_ctx, const char *filename,

+                           pcre *illegal_re, uid_t uid, gid_t gid,

+                           bool private_path)

+ {

+     int ret = EFAULT;

+     char *dirname;

+     char *end;

+     struct stat parent_stat;

+     struct string_list *missing_parents = NULL;

+     struct string_list *li = NULL;

+     mode_t old_umask;

+     mode_t new_dir_mode;

+     size_t offset = 0;

+     TALLOC_CTX *tmp_ctx = NULL;

+ 

+     tmp_ctx = talloc_new(mem_ctx);

+     if (tmp_ctx == NULL) {

+         DEBUG(1, ("talloc_new failed.\n"));

+         return ENOMEM;

+     }

+ 

+     if (strncmp(filename, "FILE:", 5) == 0) {

+         offset = 5;

+     }

+ 

+     dirname = talloc_strdup(tmp_ctx, filename + offset);

+     if (dirname == NULL) {

+         DEBUG(1, ("talloc_strndup failed.\n"));

+         ret = ENOMEM;

+         goto done;

+     }

+ 

+     if (*dirname != '/') {

+         DEBUG(1, ("Only absolute paths are allowed, not [%s] .\n", dirname));

+         ret = EINVAL;

+         goto done;

+     }

+ 

+     if (illegal_re != NULL) {

+         ret = pcre_exec(illegal_re, NULL, dirname, strlen(dirname),

+                         0, 0, NULL, 0);

+         if (ret == 0) {

+             DEBUG(1, ("Illegal pattern in ccache directory name [%s].\n",

+                       dirname));

+             ret = EINVAL;

+             goto done;

+         } else if ( ret == PCRE_ERROR_NOMATCH) {

+             DEBUG(9, ("Ccache directory name [%s] does not contain "

+                       "illegal patterns.\n", dirname));

+         } else {

+             DEBUG(1, ("pcre_exec failed [%d].\n", ret));

+             ret = EFAULT;

+             goto done;

+         }

+     }

+ 

+     end = strrchr(dirname, '/');

+     if (end == NULL || end == dirname) {

+         DEBUG(1, ("Missing filename in [%s].\n", dirname));

+         ret = EINVAL;

+         goto done;

+     }

+     *end = '\0';

+ 

+     ret = find_ccdir_parent_data(tmp_ctx, dirname, &parent_stat,

+                                  &missing_parents);

+     if (ret != EOK) {

+         DEBUG(1, ("find_ccdir_parent_data failed.\n"));

+         goto done;

+     }

+ 

+     ret = check_parent_stat(private_path, &parent_stat, uid, gid);

+     if (ret != EOK) {

+         DEBUG(1, ("check_parent_stat failed for %s directory [%s].\n",

+                   private_path ? "private" : "public", dirname));

+         goto done;

+     }

+ 

+     DLIST_FOR_EACH(li, missing_parents) {

+         DEBUG(9, ("Creating directory [%s].\n", li->s));

+         if (li->next == NULL) {

+             new_dir_mode = private_path ? 0700 : 01777;

+         } else {

+             if (private_path &&

+                 parent_stat.st_uid == uid && parent_stat.st_gid == gid) {

+                 new_dir_mode = 0700;

+             } else {

+                 new_dir_mode = 0755;

+             }

+         }

+ 

+         old_umask = umask(0000);

+         ret = mkdir(li->s, new_dir_mode);

+         umask(old_umask);

+         if (ret != EOK) {

+             ret = errno;

+             DEBUG(1, ("mkdir [%s] failed: [%d][%s].\n", li->s, ret,

+                       strerror(ret)));

+             goto done;

+         }

+         if (private_path &&

+             ((parent_stat.st_uid == uid && parent_stat.st_gid == gid) ||

+              li->next == NULL)) {

+             ret = chown(li->s, uid, gid);

+             if (ret != EOK) {

+                 ret = errno;

+                 DEBUG(1, ("chown failed [%d][%s].\n", ret, strerror(ret)));

+                 goto done;

+             }

+         }

+     }

+ 

+     ret = EOK;

+ 

+ done:

+     talloc_free(tmp_ctx);

+     return ret;

+ }

@@ -32,8 +32,12 @@

  #include "providers/data_provider.h"

  

  char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct krb5child_req *kr,

-                              const char *template);

+                              const char *template, bool file_mode,

+                              bool *private_path);

  

  errno_t become_user(uid_t uid, gid_t gid);

  

+ errno_t create_ccache_dir(TALLOC_CTX *mem_ctx, const char *filename,

+                           pcre *illegal_re, uid_t uid, gid_t gid,

+                           bool private_path);

  #endif /* __KRB5_UTILS_H__ */

@@ -459,6 +459,13 @@

      req = tevent_req_create(memctx, &state, struct auth_state);

      if (!req) return NULL;

  

+     /* Treat a zero-length password as a failure */

+     if (password.length == 0) {

+         state->result = SDAP_AUTH_FAILED;

+         tevent_req_done(req);

+         return tevent_req_post(req, ev);

+     }

+ 

      state->ev = ev;

      state->ctx = ctx;

      state->username = username;
@@ -721,7 +728,7 @@

          goto done;

      }

  

-     if (result == SDAP_AUTH_SUCCESS &&

+     if ( (result == SDAP_AUTH_SUCCESS || result == SDAP_AUTH_PW_EXPIRED ) &&

          state->pd->cmd == SSS_PAM_CHAUTHTOK_PRELIM) {

          DEBUG(9, ("Initial authentication for change password operation "

                    "successful.\n"));

@@ -97,6 +97,11 @@

      len = strlen(msg);

      r->size = 2 * sizeof(uint32_t) + len;

  

+     r->buf = talloc_array(r, uint8_t, r->size);

+     if(!r->buf) {

+         return ENOMEM;

+     }

+ 

      /* result */

      SAFEALIGN_SET_UINT32(&r->buf[p], result, &p);

  
@@ -265,12 +270,7 @@

      r = talloc_zero(mem_ctx, struct response);

      if (!r) return ENOMEM;

  

-     r->buf = talloc_size(mem_ctx, MAX_CHILD_MSG_SIZE);

-     if (r->buf == NULL) {

-         DEBUG(1, ("talloc_size failed.\n"));

-         return ENOMEM;

-     }

-     r->max_size = MAX_CHILD_MSG_SIZE;

+     r->buf = NULL;

      r->size = 0;

  

      if (kerr == 0) {

@@ -971,6 +971,11 @@

          DEBUG(6, ("Search result: %s(%d), %s\n",

                    ldap_err2string(result), result, errmsg));

  

+         if (result != LDAP_SUCCESS && result != LDAP_NO_SUCH_OBJECT) {

+             DEBUG(2, ("Unexpected result from ldap: %s(%d), %s\n",

+                       ldap_err2string(result), result, errmsg));

+         }

+ 

          tevent_req_done(req);

          return;

  

@@ -162,7 +162,7 @@

  

      lret = ldap_start_tls(state->sh->ldap, NULL, NULL, &msgid);

      if (lret != LDAP_SUCCESS) {

-         DEBUG(3, ("ldap_start_tls failed: [%s]", ldap_err2string(ret)));

+         DEBUG(3, ("ldap_start_tls failed: [%s]\n", ldap_err2string(lret)));

          goto fail;

      }

  
@@ -421,8 +421,10 @@

                            "error [%s].\n", pp_expire, pp_grace,

                            ldap_passwordpolicy_err2txt(pp_error)));

  

-                 if (state->result == LDAP_SUCCESS &&

-                     (pp_error == PP_changeAfterReset || pp_grace > 0)) {

+                 if ((state->result == LDAP_SUCCESS &&

+                         (pp_error == PP_changeAfterReset || pp_grace > 0)) ||

+                     (state->result == LDAP_INVALID_CREDENTIALS &&

+                         pp_error == PP_passwordExpired ) ) {

                      DEBUG(4, ("User must set a new password.\n"));

                      state->result = LDAP_X_SSSD_PASSWORD_EXPIRED;

                  }
@@ -495,6 +497,13 @@

      DEBUG(4, ("Executing sasl bind mech: %s, user: %s\n",

                sasl_mech, sasl_user));

  

+     /* Until ldap_sasl_interactive_bind_s() is async we may want to set

+      * LDAP_OPT_RESTART to handle EINTR during poll(). */

+     ret = ldap_set_option(state->sh->ldap, LDAP_OPT_RESTART, LDAP_OPT_ON);

+     if (ret != LDAP_OPT_SUCCESS) {

+         DEBUG(1, ("Failed to set restart option.\n"));

+     }

+ 

      /* FIXME: Warning, this is a sync call!

       * No async variant exist in openldap libraries yet */

  

@@ -0,0 +1,160 @@

+ /*

+    SSSD

+ 

+    Simple access control

+ 

+    Copyright (C) Sumit Bose <sbose@redhat.com> 2010

+ 

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; either version 3 of the License, or

+    (at your option) any later version.

+ 

+    This program 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 General Public License for more details.

+ 

+    You should have received a copy of the GNU General Public License

+    along with this program.  If not, see <http://www.gnu.org/licenses/>.

+ */

+ 

+ #include <errno.h>

+ 

+ #include <security/pam_modules.h>

+ 

+ #include "util/util.h"

+ #include "providers/dp_backend.h"

+ #include "db/sysdb.h"

+ #include "providers/simple/simple_access.h"

+ 

+ #define CONFDB_SIMPLE_ALLOW_USERS "simple_allow_users"

+ #define CONFDB_SIMPLE_DENY_USERS "simple_deny_users"

+ 

+ errno_t simple_access_check(struct simple_ctx *ctx, const char *username,

+                             bool *access_granted)

+ {

+     int i;

+ 

+     *access_granted = false;

+     if (ctx->allow_users != NULL) {

+         for(i = 0; ctx->allow_users[i] != NULL; i++) {

+             if (strcmp(username, ctx->allow_users[i]) == 0) {

+                 DEBUG(9, ("User [%s] found in allow list, access granted.\n",

+                       username));

+                 *access_granted = true;

+                 return EOK;

+             }

+         }

+     } else {

+         *access_granted = true;

+         if (ctx->deny_users != NULL) {

+             for(i = 0; ctx->deny_users[i] != NULL; i++) {

+                 if (strcmp(username, ctx->deny_users[i]) == 0) {

+                     DEBUG(9, ("User [%s] found in deny list, access denied.\n",

+                           username));

+                     *access_granted = false;

+                     return EOK;

+                 }

+             }

+         }

+     }

+ 

+     return EOK;

+ }

+ 

+ void simple_access_handler(struct be_req *be_req)

+ {

+     int ret;

+     bool access_granted = false;

+     struct pam_data *pd;

+     struct simple_ctx *ctx;

+ 

+     pd = talloc_get_type(be_req->req_data, struct pam_data);

+ 

+     pd->pam_status = PAM_SYSTEM_ERR;

+ 

+     if (pd->cmd != SSS_PAM_ACCT_MGMT) {

+         DEBUG(4, ("simple access does not handles pam task %d.\n", pd->cmd));

+         pd->pam_status = PAM_MODULE_UNKNOWN;

+         goto done;

+     }

+ 

+     ctx = talloc_get_type(be_req->be_ctx->bet_info[BET_ACCESS].pvt_bet_data,

+                           struct simple_ctx);

+ 

+     ret = simple_access_check(ctx, pd->user, &access_granted);

+     if (ret != EOK) {

+         pd->pam_status = PAM_SYSTEM_ERR;

+         goto done;

+     }

+ 

+     if (access_granted) {

+         pd->pam_status = PAM_SUCCESS;

+     } else {

+         pd->pam_status = PAM_PERM_DENIED;

+     }

+ 

+ done:

+     be_req->fn(be_req, DP_ERR_OK, pd->pam_status, NULL);

+ }

+ 

+ struct bet_ops simple_access_ops = {

+     .handler = simple_access_handler,

+     .finalize = NULL

+ };

+ 

+ int sssm_simple_access_init(struct be_ctx *bectx, struct bet_ops **ops,

+                             void **pvt_data)

+ {

+     int ret = EINVAL;

+     struct simple_ctx *ctx;

+ 

+     ctx = talloc_zero(bectx, struct simple_ctx);

+     if (ctx == NULL) {

+         DEBUG(1, ("talloc_zero failed.\n"));

+         return ENOMEM;

+     }

+ 

+     ret = confdb_get_string_as_list(bectx->cdb, ctx, bectx->conf_path,

+                                     CONFDB_SIMPLE_ALLOW_USERS,

+                                     &ctx->allow_users);

+     if (ret != EOK) {

+         if (ret == ENOENT) {

+             DEBUG(9, ("Allow user list is empty.\n"));

+             ctx->allow_users = NULL;

+         } else {

+             DEBUG(1, ("confdb_get_string_as_list failed.\n"));

+             goto failed;

+         }

+     }

+ 

+     ret = confdb_get_string_as_list(bectx->cdb, ctx, bectx->conf_path,

+                                     CONFDB_SIMPLE_DENY_USERS,

+                                     &ctx->deny_users);

+     if (ret != EOK) {

+         if (ret == ENOENT) {

+             DEBUG(9, ("Deny user list is empty.\n"));

+             ctx->deny_users = NULL;

+         } else {

+             DEBUG(1, ("confdb_get_string_as_list failed.\n"));

+             goto failed;

+         }

+     }

+ 

+     if (ctx->allow_users != NULL && ctx->deny_users != NULL) {

+         DEBUG(1, ("Access and deny list are defined, only one is allowed.\n"));

+         ret = EINVAL;

+         goto failed;

+     }

+ 

+ 

+     *ops = &simple_access_ops;

+     *pvt_data = ctx;

+ 

+     return EOK;

+ 

+ failed:

+     talloc_free(ctx);

+     return ret;

+ }

@@ -0,0 +1,36 @@

+ /*

+    SSSD

+ 

+    Simple access control

+ 

+    Copyright (C) Sumit Bose <sbose@redhat.com> 2010

+ 

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; either version 3 of the License, or

+    (at your option) any later version.

+ 

+    This program 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 General Public License for more details.

+ 

+    You should have received a copy of the GNU General Public License

+    along with this program.  If not, see <http://www.gnu.org/licenses/>.

+ */

+ 

+ #ifndef __SIMPLE_ACCESS_H__

+ #define __SIMPLE_ACCESS_H__

+ 

+ #include <stdlib.h>

+ 

+ #include "util/util.h"

+ 

+ struct simple_ctx {

+     char **allow_users;

+     char **deny_users;

+ };

+ 

+ errno_t simple_access_check(struct simple_ctx *ctx, const char *username,

+                             bool *access_granted);

+ #endif /* __SIMPLE_ACCESS_H__ */

@@ -61,7 +61,7 @@

      return 0;

  }

  

- static void client_send(struct tevent_context *ev, struct cli_ctx *cctx)

+ static void client_send(struct cli_ctx *cctx)

  {

      int ret;

  
@@ -71,7 +71,7 @@

          return;

      }

      if (ret != EOK) {

-         DEBUG(0, ("Failed to read request, aborting client!\n"));

+         DEBUG(0, ("Failed to send data, aborting client!\n"));

          talloc_free(cctx);

          return;

      }
@@ -84,7 +84,7 @@

      return;

  }

  

- static void client_recv(struct tevent_context *ev, struct cli_ctx *cctx)

+ static void client_recv(struct cli_ctx *cctx)

  {

      int ret;

  
@@ -151,11 +151,11 @@

      struct cli_ctx *cctx = talloc_get_type(ptr, struct cli_ctx);

  

      if (flags & TEVENT_FD_READ) {

-         client_recv(ev, cctx);

+         client_recv(cctx);

          return;

      }

      if (flags & TEVENT_FD_WRITE) {

-         client_send(ev, cctx);

+         client_send(cctx);

          return;

      }

  }

@@ -412,7 +412,6 @@

                                         void *callback_ctx,

                                         struct sss_dp_req **ndp)

  {

-     DBusConnection *dbus_conn;

      DBusMessage *msg;

      DBusPendingCall *pending_reply;

      dbus_bool_t dbret;
@@ -432,7 +431,6 @@

                    " This maybe a bug, it shouldn't happen!\n", domain));

          return EIO;

      }

-     dbus_conn = sbus_get_connection(be_conn->conn);

  

      /* create the message */

      msg = dbus_message_new_method_call(NULL,
@@ -457,31 +455,32 @@

          return EIO;

      }

  

-     dbret = dbus_connection_send_with_reply(dbus_conn, msg,

-                                             &pending_reply, timeout);

-     if (!dbret || pending_reply == NULL) {

+     sdp_req = talloc_zero(rctx, struct sss_dp_req);

+     if (!sdp_req) {

+         dbus_message_unref(msg);

+         return ENOMEM;

+     }

+ 

+     ret = sbus_conn_send(be_conn->conn, msg, timeout,

+                          sss_dp_send_acct_callback,

+                          sdp_req, &pending_reply);

+     dbus_message_unref(msg);

+     if (ret != EOK) {

          /*

           * Critical Failure

           * We can't communicate on this connection

           * We'll drop it using the default destructor.

           */

          DEBUG(0, ("D-BUS send failed.\n"));

-         dbus_message_unref(msg);

          return EIO;

      }

  

-     sdp_req = talloc_zero(rctx, struct sss_dp_req);

-     if (!sdp_req) {

-         dbus_message_unref(msg);

-         return ENOMEM;

-     }

      sdp_req->ev = rctx->ev;

      sdp_req->pending_reply = pending_reply;

  

      if (callback) {

          cb = talloc_zero(callback_memctx, struct sss_dp_callback);

          if (!cb) {

-             dbus_message_unref(msg);

              talloc_zfree(sdp_req);

              return ENOMEM;

          }
@@ -493,20 +492,6 @@

          talloc_set_destructor((TALLOC_CTX *)cb, sss_dp_callback_destructor);

      }

  

-     /* Set up the reply handler */

-     dbret = dbus_pending_call_set_notify(pending_reply,

-                                          sss_dp_send_acct_callback,

-                                          sdp_req, NULL);

-     if (!dbret) {

-         DEBUG(0, ("Could not queue up pending request!\n"));

-         talloc_zfree(sdp_req);

-         dbus_pending_call_cancel(pending_reply);

-         dbus_message_unref(msg);

-         return EIO;

-     }

- 

-     dbus_message_unref(msg);

- 

      *ndp = sdp_req;

  

      return EOK;

@@ -183,8 +183,12 @@

      errno = 0;

      rb = recv(fd, buf, len, 0);

  

-     if (rb == -1 && errno == EAGAIN) {

-         return EAGAIN;

+     if (rb == -1) {

+         if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) {

+             return EAGAIN;

+         } else {

+             return errno;

+         }

      }

  

      if (rb == 0) {
@@ -219,8 +223,12 @@

      errno = 0;

      rb = send(fd, buf, len, 0);

  

-     if (rb == -1 && errno == EAGAIN) {

-         return EAGAIN;

+     if (rb == -1) {

+         if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) {

+             return EAGAIN;

+         } else {

+             return errno;

+         }

      }

  

      if (rb == 0) {

file modified
+110 -13
@@ -50,6 +50,7 @@

  struct sbus_method monitor_nss_methods[] = {

      { MON_CLI_METHOD_PING, monitor_common_pong },

      { MON_CLI_METHOD_RES_INIT, monitor_common_res_init },

+     { MON_CLI_METHOD_ROTATE, monitor_common_rotate_logs },

      { NULL, NULL }

  };

  
@@ -67,9 +68,11 @@

  {

      TALLOC_CTX *tmpctx;

      struct sss_domain_info *dom;

+     const char *conf_path;

      char *domain, *name;

-     char **filter_list;

+     char **filter_list = NULL;

      int ret, i;

+     bool filter_set;

  

      tmpctx = talloc_new(nctx);

      if (!tmpctx) return ENOMEM;
@@ -101,15 +104,62 @@

          nctx->cache_refresh_percent = 0;

      }

  

+     filter_set = false;

+     for (dom = rctx->domains; dom; dom = dom->next) {

+         conf_path = talloc_asprintf(tmpctx, CONFDB_DOMAIN_PATH_TMPL, dom->name);

+         if (!conf_path) {

+             ret = ENOMEM;

+             goto done;

+         }

+ 

+         talloc_zfree(filter_list);

+         ret = confdb_get_string_as_list(cdb, tmpctx, conf_path,

+                                         CONFDB_NSS_FILTER_USERS, &filter_list);

+         if (ret == ENOENT) continue;

+         if (ret != EOK) goto done;

+         filter_set = true;

+ 

+         for (i = 0; (filter_list && filter_list[i]); i++) {

+             ret = sss_parse_name(tmpctx, nctx->rctx->names,

+                                  filter_list[i], &domain, &name);

+             if (ret != EOK) {

+                 DEBUG(1, ("Invalid name in filterUsers list: [%s] (%d)\n",

+                          filter_list[i], ret));

+                 continue;

+             }

+ 

+             if (domain && strcmp(domain, dom->name)) {

+                 DEBUG(1, ("Mismatch betwen domain name (%s) and name "

+                           "set in FQN  (%s), skipping user %s\n",

+                           dom->name, domain, name));

+                 continue;

+             }

+ 

+             ret = nss_ncache_set_user(nctx->ncache, true, dom->name, name);

+             if (ret != EOK) {

+                 DEBUG(1, ("Failed to store permanent user filter for [%s]"

+                           " (%d [%s])\n", filter_list[i],

+                           ret, strerror(ret)));

+                 continue;

+             }

+         }

+     }

+ 

      ret = confdb_get_string_as_list(cdb, tmpctx, CONFDB_NSS_CONF_ENTRY,

                                      CONFDB_NSS_FILTER_USERS, &filter_list);

      if (ret == ENOENT) {

-         filter_list = talloc_array(tmpctx, char *, 2);

-         filter_list[0] = talloc_strdup(tmpctx, "root");

-         filter_list[1] = NULL;

-         if (!filter_list || !filter_list[0]) {

-             ret = ENOMEM;

-             goto done;

+         if (!filter_set) {

+             filter_list = talloc_array(tmpctx, char *, 2);

+             if (!filter_list) {

+                 ret = ENOMEM;

+                 goto done;

+             }

+             filter_list[0] = talloc_strdup(tmpctx, "root");

+             if (!filter_list[0]) {

+                 ret = ENOMEM;

+                 goto done;

+             }

+             filter_list[1] = NULL;

          }

          ret = EOK;

      }
@@ -145,15 +195,62 @@

          }

      }

  

+     filter_set = false;

+     for (dom = rctx->domains; dom; dom = dom->next) {

+         conf_path = talloc_asprintf(tmpctx, CONFDB_DOMAIN_PATH_TMPL, dom->name);

+         if (!conf_path) {

+             ret = ENOMEM;

+             goto done;

+         }

+ 

+         talloc_zfree(filter_list);

+         ret = confdb_get_string_as_list(cdb, tmpctx, conf_path,

+                                         CONFDB_NSS_FILTER_GROUPS, &filter_list);

+         if (ret == ENOENT) continue;

+         if (ret != EOK) goto done;

+         filter_set = true;

+ 

+         for (i = 0; (filter_list && filter_list[i]); i++) {

+             ret = sss_parse_name(tmpctx, nctx->rctx->names,

+                                  filter_list[i], &domain, &name);

+             if (ret != EOK) {

+                 DEBUG(1, ("Invalid name in filterGroups list: [%s] (%d)\n",

+                          filter_list[i], ret));

+                 continue;

+             }

+ 

+             if (domain && strcmp(domain, dom->name)) {

+                 DEBUG(1, ("Mismatch betwen domain name (%s) and name "

+                           "set in FQN  (%s), skipping group %s\n",

+                           dom->name, domain, name));

+                 continue;

+             }

+ 

+             ret = nss_ncache_set_group(nctx->ncache, true, dom->name, name);

+             if (ret != EOK) {

+                 DEBUG(1, ("Failed to store permanent group filter for [%s]"

+                           " (%d [%s])\n", filter_list[i],

+                           ret, strerror(ret)));

+                 continue;

+             }

+         }

+     }

+ 

      ret = confdb_get_string_as_list(cdb, tmpctx, CONFDB_NSS_CONF_ENTRY,

                                      CONFDB_NSS_FILTER_GROUPS, &filter_list);

      if (ret == ENOENT) {

-         filter_list = talloc_array(tmpctx, char *, 2);

-         filter_list[0] = talloc_strdup(tmpctx, "root");

-         filter_list[1] = NULL;

-         if (!filter_list || !filter_list[0]) {

-             ret = ENOMEM;

-             goto done;

+         if (!filter_set) {

+             filter_list = talloc_array(tmpctx, char *, 2);

+             if (!filter_list) {

+                 ret = ENOMEM;

+                 goto done;

+             }

+             filter_list[0] = talloc_strdup(tmpctx, "root");

+             if (!filter_list[0]) {

+                 ret = ENOMEM;

+                 goto done;

+             }

+             filter_list[1] = NULL;

          }

          ret = EOK;

      }

@@ -205,9 +205,8 @@

          }

          sss_packet_get_body(packet, &body, &blen);

  

-         ((uint32_t *)(&body[rp]))[0] = uid;

-         ((uint32_t *)(&body[rp]))[1] = gid;

-         rp += 2*sizeof(uint32_t);

+         SAFEALIGN_SET_UINT32(&body[rp], uid, &rp);

+         SAFEALIGN_SET_UINT32(&body[rp], gid, &rp);

  

          if (add_domain) {

              ret = snprintf((char *)&body[rp], s1, namefmt, name, domain);
@@ -1566,10 +1565,10 @@

          sss_packet_get_body(packet, &body, &blen);

  

          /*  0-3: 32bit number gid */

-         ((uint32_t *)(&body[rzero+GID_ROFFSET]))[0] = gid;

+         SAFEALIGN_SET_UINT32(&body[rzero+GID_ROFFSET], gid, NULL);

  

          /*  4-7: 32bit unsigned number of members */

-         ((uint32_t *)(&body[rzero+MNUM_ROFFSET]))[0] = 0;

+         SAFEALIGN_SET_UINT32(&body[rzero+MNUM_ROFFSET], 0, NULL);

  

          /*  8-X: sequence of strings (name, passwd, mem..) */

          if (add_domain) {
@@ -1688,7 +1687,7 @@

  

              if (memnum) {

                  /* set num of members */

-                 ((uint32_t *)(&body[rzero+MNUM_ROFFSET]))[0] = memnum;

+                 SAFEALIGN_SET_UINT32(&body[rzero+MNUM_ROFFSET], memnum, NULL);

              }

          }

  

@@ -49,6 +49,7 @@

  struct sbus_method monitor_pam_methods[] = {

      { MON_CLI_METHOD_PING, monitor_common_pong },

      { MON_CLI_METHOD_RES_INIT, monitor_common_res_init },

+     { MON_CLI_METHOD_ROTATE, monitor_common_rotate_logs },

      { NULL, NULL }

  };

  

file modified
+6 -21
@@ -43,10 +43,10 @@

  

      dbus_error_init(&dbus_error);

  

-     dbus_pending_call_block(pending);

      msg = dbus_pending_call_steal_reply(pending);

      if (msg == NULL) {

-         DEBUG(0, ("Severe error. A reply callback was called but no reply was received and no timeout occurred\n"));

+         DEBUG(0, ("Severe error. A reply callback was called but no reply was"

+                   "received and no timeout occurred\n"));

          preq->pd->pam_status = PAM_SYSTEM_ERR;

          goto done;

      }
@@ -84,8 +84,6 @@

      struct pam_data *pd = preq->pd;

      struct be_conn *be_conn;

      DBusMessage *msg;

-     DBusPendingCall *pending_reply;

-     DBusConnection *dbus_conn;

      dbus_bool_t ret;

      int res;

  
@@ -100,7 +98,6 @@

                    " This maybe a bug, it shouldn't happen!\n", preq->domain));

          return EIO;

      }

-     dbus_conn = sbus_get_connection(be_conn->conn);

  

      msg = dbus_message_new_method_call(NULL,

                                         DP_PATH,
@@ -121,22 +118,10 @@

          return EIO;

      }

  

-     ret = dbus_connection_send_with_reply(dbus_conn, msg, &pending_reply, timeout);

-     if (!ret || pending_reply == NULL) {

-         /*

-          * Critical Failure

-          * We can't communicate on this connection

-          * We'll drop it using the default destructor.

-          */

-         DEBUG(0, ("D-BUS send failed.\n"));

-         dbus_message_unref(msg);

-         return EIO;

-     }

- 

-     dbus_pending_call_set_notify(pending_reply,

-                                  pam_dp_process_reply, preq, NULL);

+     res = sbus_conn_send(be_conn->conn, msg,

+                          timeout, pam_dp_process_reply,

+                          preq, NULL);

      dbus_message_unref(msg);

- 

-     return EOK;

+     return res;

  }

  

file modified
+16
@@ -144,6 +144,22 @@

                                    DBusMessage *message,

                                    void *user_data);

  

+ /*

+  * Send a message across the SBUS

+  * If requested, the DBusPendingCall object will

+  * be returned to the caller.

+  *

+  * This function will return EAGAIN in the event

+  * that the connection is not open for

+  * communication.

+  */

+ int sbus_conn_send(struct sbus_connection *conn,

+                    DBusMessage *msg,

+                    int timeout_ms,

+                    DBusPendingCallNotifyFunction reply_handler,

+                    void *pvt,

+                    DBusPendingCall **pending);

+ 

  void sbus_conn_send_reply(struct sbus_connection *conn,

                            DBusMessage *reply);

  

@@ -685,6 +685,71 @@

      return false;

  }

  

+ /*

+  * Send a message across the SBUS

+  * If requested, the DBusPendingCall object will

+  * be returned to the caller.

+  *

+  * This function will return EAGAIN in the event

+  * that the connection is not open for

+  * communication.

+  */

+ int sbus_conn_send(struct sbus_connection *conn,

+                    DBusMessage *msg,

+                    int timeout_ms,

+                    DBusPendingCallNotifyFunction reply_handler,

+                    void *pvt,

+                    DBusPendingCall **pending)

+ {

+     DBusPendingCall *pending_reply;

+     DBusConnection *dbus_conn;

+     dbus_bool_t dbret;

+ 

+     dbus_conn = sbus_get_connection(conn);

+ 

+     dbret = dbus_connection_send_with_reply(dbus_conn, msg,

+                                             &pending_reply,

+                                             timeout_ms);

+     if (!dbret) {

+         /*

+          * Critical Failure

+          * Insufficient memory to send message

+          */

+         DEBUG(0, ("D-BUS send failed.\n"));

+         return ENOMEM;

+     }

+ 

+     if (pending_reply) {

+         /* Set up the reply handler */

+         dbret = dbus_pending_call_set_notify(pending_reply, reply_handler,

+                                              pvt, NULL);

+         if (!dbret) {

+             /*

+              * Critical Failure

+              * Insufficient memory to create pending call notify

+              */

+             DEBUG(0, ("D-BUS send failed.\n"));

+             dbus_pending_call_cancel(pending_reply);

+             dbus_pending_call_unref(pending_reply);

+             return ENOMEM;

+         }

+ 

+         if(pending) {

+             *pending = pending_reply;

+         }

+         return EOK;

+     }

+ 

+     /* If pending_reply is NULL, the connection was not

+      * open for sending.

+      */

+ 

+     /* TODO: Create a callback into the reconnection logic so this

+      * request is invoked when the connection is re-established

+      */

+     return EAGAIN;

+ }

+ 

  void sbus_conn_send_reply(struct sbus_connection *conn, DBusMessage *reply)

  {

      dbus_connection_send(conn->dbus.conn, reply, NULL);

file modified
+13 -5
@@ -78,17 +78,19 @@

  static int sss_nss_getgr_readrep(struct sss_nss_gr_rep *pr,

                                   uint8_t *buf, size_t *len)

  {

-     size_t i, l, slen, ptmem;

+     size_t i, l, slen, ptmem, pad;

      ssize_t dlen;

      char *sbuf;

      uint32_t mem_num;

+     uint32_t c;

  

      if (*len < 11) { /* not enough space for data, bad packet */

          return EBADMSG;

      }

  

-     pr->result->gr_gid = ((uint32_t *)buf)[0];

-     mem_num = ((uint32_t *)buf)[1];

+     SAFEALIGN_COPY_UINT32(&c, buf, NULL);

+     pr->result->gr_gid = c;

+     SAFEALIGN_COPY_UINT32(&mem_num, buf+sizeof(uint32_t), NULL);

  

      sbuf = (char *)&buf[8];

      slen = *len - 8;
@@ -127,9 +129,15 @@

      i++;

      dlen--;

  

+     /* Make sure pr->buffer[i+pad] is 32 bit aligned */

+     pad = 0;

+     while((i + pad) % 4) {

+         pad++;

+     }

+ 

      /* now members */

-     pr->result->gr_mem = (char **)&(pr->buffer[i]);

-     ptmem = sizeof(char *) * (mem_num + 1);

+     pr->result->gr_mem = (char **)&(pr->buffer[i+pad]);

+     ptmem = (sizeof(char *) * (mem_num + 1)) + pad;

      if (ptmem > dlen) {

          return ERANGE; /* not ENOMEM, ERANGE is what glibc looks for */

      }

file modified
+30 -6
@@ -512,7 +512,8 @@

  {

      int ret;

      uint32_t msg_len;

-     char user_msg[256];

+     char *user_msg;

+     size_t bufsize = 0;

  

      if (buflen < 2* sizeof(uint32_t)) {

          D(("User info response data is too short"));
@@ -526,19 +527,35 @@

          return PAM_BUF_ERR;

      }

  

-     ret = snprintf(user_msg, sizeof(user_msg), "%s%s%.*s",

+     bufsize = strlen(_("Password change failed. ")) + 1;

+ 

+     if (msg_len > 0) {

+         bufsize += strlen(_("Server message: ")) + msg_len;

+     }

+ 

+     user_msg = (char *)malloc(sizeof(char) * bufsize);

+     if (!user_msg) {

+        D(("Out of memory."));

+        return PAM_SYSTEM_ERR;

+     }

+ 

+     ret = snprintf(user_msg, bufsize, "%s%s%.*s",

                     _("Password change failed. "),

                     msg_len > 0 ? _("Server message: ") : "",

                     msg_len,

                     msg_len > 0 ? (char *)(buf + 2 * sizeof(uint32_t)) : "" );

-     if (ret < 0 || ret >= sizeof(user_msg)) {

+     if (ret < 0 || ret > bufsize) {

          D(("snprintf failed."));

+ 

+         free(user_msg);

          return PAM_SYSTEM_ERR;

      }

  

      ret = do_pam_conversation(pamh, PAM_TEXT_INFO, user_msg, NULL, NULL);

+     free(user_msg);

      if (ret != PAM_SUCCESS) {

          D(("do_pam_conversation failed."));

+ 

          return PAM_SYSTEM_ERR;

      }

  
@@ -979,11 +996,13 @@

                                             int pam_flags)

  {

      int ret;

- 

+     int *exp_data = NULL;

+     pam_get_data(pamh, PWEXP_FLAG, (const void **) &exp_data);

+     

      /* we query for the old password during PAM_PRELIM_CHECK to make

       * pam_sss work e.g. with pam_cracklib */

      if (pam_flags & PAM_PRELIM_CHECK) {

-         if (getuid() != 0 && !(flags & FLAGS_USE_FIRST_PASS)) {

+         if ( (getuid() != 0 || exp_data ) && !(flags & FLAGS_USE_FIRST_PASS)) {

              ret = prompt_password(pamh, pi, _("Current Password: "));

              if (ret != PAM_SUCCESS) {

                  D(("failed to get password from user"));
@@ -1120,7 +1139,12 @@

      if (ret == PAM_SUCCESS && task == SSS_PAM_ACCT_MGMT &&

          pam_get_data(pamh, PWEXP_FLAG, (const void **) &exp_data) ==

                                                                    PAM_SUCCESS) {

-             return PAM_NEW_AUTHTOK_REQD;

+         ret = do_pam_conversation(pamh, PAM_TEXT_INFO,

+                 _("Password expired. Change your password now."), NULL, NULL);

+         if (ret != PAM_SUCCESS) {

+             D(("do_pam_conversation failed."));

+         }

+         return PAM_NEW_AUTHTOK_REQD;

      }

  

      overwrite_and_free_authtoks(&pi);

file modified
+5 -2
@@ -74,13 +74,16 @@

  {

      size_t i, slen, dlen;

      char *sbuf;

+     uint32_t c;

  

      if (*len < 13) { /* not enough space for data, bad packet */

          return EBADMSG;

      }

  

-     pr->result->pw_uid = ((uint32_t *)buf)[0];

-     pr->result->pw_gid = ((uint32_t *)buf)[1];

+     SAFEALIGN_COPY_UINT32(&c, buf, NULL);

+     pr->result->pw_uid = c;

+     SAFEALIGN_COPY_UINT32(&c, buf+sizeof(uint32_t), NULL);

+     pr->result->pw_gid = c;

  

      sbuf = (char *)&buf[8];

      slen = *len - 8;

file modified
+14
@@ -408,6 +408,20 @@

                                       uint8_t **repbuf, size_t *replen,

                                       int *errnop);

  

+ #ifndef SAFEALIGN_COPY_UINT32

+ static inline void

+ safealign_memcpy(void *dest, const void *src, size_t n, size_t *counter)

+ {

+     memcpy(dest, src, n);

+     if (counter) {

+         *counter += n;

+     }

+ }

+ 

+ #define SAFEALIGN_COPY_UINT32(dest, src, pctr) \

+     safealign_memcpy(dest, src, sizeof(uint32_t), pctr)

+ #endif

+ 

  #endif /* _SSSCLI_H */

  

  #if 0

file modified
+1 -1
@@ -29,7 +29,7 @@

  case "$1" in

      start)

          echo -n "Starting $prog "

-         /sbin/startproc $SSSD -D 2>/dev/null

+         /sbin/startproc $SSSD -f -D 2>/dev/null

          rc_status -v

          ;;

  

file modified
-82
@@ -22,92 +22,10 @@

     along with this program.  If not, see <http://www.gnu.org/licenses/>.

  */

  

- #include <check.h>

  #include <stdio.h>

- 

  #include "tests/common.h"

- #include "util/dlinklist.h"

- 

- TALLOC_CTX *global_talloc_context = NULL;

  #include "util/util.h"

  

- struct size_snapshot {

-     struct size_snapshot *prev;

-     struct size_snapshot *next;

- 

-     TALLOC_CTX *ctx;

-     size_t bytes_allocated;

- };

- 

- static struct size_snapshot *snapshot_stack;

- 

- void

- _check_leaks(TALLOC_CTX *ctx, size_t bytes, const char *location)

- {

-     size_t bytes_allocated;

- 

-     bytes_allocated = talloc_total_size(ctx);

-     if (bytes_allocated != bytes) {

-         fprintf(stderr, "Leak report for %s:\n", location);

-         talloc_report_full(ctx, stderr);

-         fail("%s: memory leaks detected, %d bytes still allocated",

-              location, bytes_allocated - bytes);

-     }

- }

- 

- void

- check_leaks_push(TALLOC_CTX *ctx)

- {

-     struct size_snapshot *snapshot;

- 

-     snapshot = talloc(NULL, struct size_snapshot);

-     snapshot->ctx = ctx;

-     snapshot->bytes_allocated = talloc_total_size(ctx);

-     DLIST_ADD(snapshot_stack, snapshot);

- }

- 

- void

- _check_leaks_pop(TALLOC_CTX *ctx, const char *location)

- {

-     struct size_snapshot *snapshot;

-     TALLOC_CTX *old_ctx;

-     size_t bytes_allocated;

- 

-     if (snapshot_stack == NULL) {

-         fail("%s: trying to pop an empty stack");

-     }

- 

-     snapshot = snapshot_stack;

-     DLIST_REMOVE(snapshot_stack, snapshot);

- 

-     old_ctx = snapshot->ctx;

-     bytes_allocated = snapshot->bytes_allocated;

- 

-     fail_if(old_ctx != ctx, "Bad push/pop order");

- 

-     talloc_zfree(snapshot);

-     _check_leaks(old_ctx, bytes_allocated, location);

- }

- 

- void

- leak_check_setup(void)

- {

-     talloc_enable_null_tracking();

-     global_talloc_context = talloc_new(NULL);

-     fail_unless(global_talloc_context != NULL, "talloc_new failed");

-     check_leaks_push(global_talloc_context);

- }

- 

- void

- leak_check_teardown(void)

- {

-     check_leaks_pop(global_talloc_context);

-     if (snapshot_stack != NULL) {

-         fail("Exiting with a non-empty stack");

-     }

-     check_leaks(global_talloc_context, 0);

- }

- 

  void

  tests_set_cwd(void)

  {

@@ -0,0 +1,109 @@

+ /*

+    SSSD

+ 

+    Common utilities for check-based tests using talloc.

+ 

+    Authors:

+         Martin Nagy <mnagy@redhat.com>

+ 

+    Copyright (C) Red Hat, Inc 2009

+ 

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; either version 3 of the License, or

+    (at your option) any later version.

+ 

+    This program 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 General Public License for more details.

+ 

+    You should have received a copy of the GNU General Public License

+    along with this program.  If not, see <http://www.gnu.org/licenses/>.

+ */

+ 

+ #include <stdio.h>

+ #include <check.h>

+ #include "tests/common.h"

+ #include "util/util.h"

+ #include "util/dlinklist.h"

+ 

+ TALLOC_CTX *global_talloc_context = NULL;

+ 

+ 

+ struct size_snapshot {

+     struct size_snapshot *prev;

+     struct size_snapshot *next;

+ 

+     TALLOC_CTX *ctx;

+     size_t bytes_allocated;

+ };

+ 

+ static struct size_snapshot *snapshot_stack;

+ 

+ void

+ _check_leaks(TALLOC_CTX *ctx, size_t bytes, const char *location)

+ {

+     size_t bytes_allocated;

+ 

+     bytes_allocated = talloc_total_size(ctx);

+     if (bytes_allocated != bytes) {

+         fprintf(stderr, "Leak report for %s:\n", location);

+         talloc_report_full(ctx, stderr);

+         fail("%s: memory leaks detected, %d bytes still allocated",

+              location, bytes_allocated - bytes);

+     }

+ }

+ 

+ void

+ check_leaks_push(TALLOC_CTX *ctx)

+ {

+     struct size_snapshot *snapshot;

+ 

+     snapshot = talloc(NULL, struct size_snapshot);

+     snapshot->ctx = ctx;

+     snapshot->bytes_allocated = talloc_total_size(ctx);

+     DLIST_ADD(snapshot_stack, snapshot);

+ }

+ 

+ void

+ _check_leaks_pop(TALLOC_CTX *ctx, const char *location)

+ {

+     struct size_snapshot *snapshot;

+     TALLOC_CTX *old_ctx;

+     size_t bytes_allocated;

+ 

+     if (snapshot_stack == NULL) {

+         fail("%s: trying to pop an empty stack");

+     }

+ 

+     snapshot = snapshot_stack;

+     DLIST_REMOVE(snapshot_stack, snapshot);

+ 

+     old_ctx = snapshot->ctx;

+     bytes_allocated = snapshot->bytes_allocated;

+ 

+     fail_if(old_ctx != ctx, "Bad push/pop order");

+ 

+     talloc_zfree(snapshot);

+     _check_leaks(old_ctx, bytes_allocated, location);

+ }

+ 

+ void

+ leak_check_setup(void)

+ {

+     talloc_enable_null_tracking();

+     global_talloc_context = talloc_new(NULL);

+     fail_unless(global_talloc_context != NULL, "talloc_new failed");

+     check_leaks_push(global_talloc_context);

+ }

+ 

+ void

+ leak_check_teardown(void)

+ {

+     check_leaks_pop(global_talloc_context);

+     if (snapshot_stack != NULL) {

+         fail("Exiting with a non-empty stack");

+     }

+     check_leaks(global_talloc_context, 0);

+ }

@@ -27,11 +27,13 @@

  

  #include "providers/ipa/ipa_common.h"

  #include "providers/ldap/sdap.h"

+ #include "providers/krb5/krb5_common.h"

  #include "tests/common.h"

  

  START_TEST(test_check_num_opts)

  {

      fail_if(IPA_OPTS_BASIC_TEST != SDAP_OPTS_BASIC);

+     fail_if(IPA_KRB5_OPTS_TEST != KRB5_OPTS);

  }

  END_TEST

  

file modified
+470 -92
@@ -23,13 +23,17 @@

  */

  

  #include <stdlib.h>

+ #include <popt.h>

  #include <check.h>

  

  #include "providers/krb5/krb5_utils.h"

  #include "providers/krb5/krb5_auth.h"

  #include "tests/common.h"

  

+ #define TESTS_PATH "tests_krb5_utils"

+ 

  #define BASE "/abc/def"

+ #define FILENAME "ghi"

  

  #define USERNAME "testuser"

  #define UID "12345"
@@ -44,6 +48,315 @@

  TALLOC_CTX *tmp_ctx = NULL;

  struct krb5child_req *kr;

  

+ #define RMDIR(__dir__) do { \

+     ret = rmdir(__dir__); \

+     fail_unless(ret == EOK, "rmdir [%s] failed, [%d][%s].", __dir__, \

+                 errno, strerror(errno)); \

+ } while(0);

+ 

+ void setup_create_dir(void)

+ {

+     fail_unless(tmp_ctx == NULL, "Talloc context already initialized.");

+     tmp_ctx = talloc_new(NULL);

+     fail_unless(tmp_ctx != NULL, "Cannot create talloc context.");

+ }

+ 

+ void teardown_create_dir(void)

+ {

+     int ret;

+     fail_unless(tmp_ctx != NULL, "Talloc context already freed.");

+     ret = talloc_free(tmp_ctx);

+     tmp_ctx = NULL;

+     fail_unless(ret == 0, "Connot free talloc context.");

+ }

+ 

+ static void check_dir(const char *dirname, uid_t uid, gid_t gid, mode_t mode)

+ {

+     struct stat stat_buf;

+     int ret;

+ 

+     ret = stat(dirname, &stat_buf);

+     fail_unless(ret == EOK, "stat failed [%d][%s].", errno, strerror(errno));

+ 

+     fail_unless(S_ISDIR(stat_buf.st_mode), "[%s] is not a directory.", dirname);

+     fail_unless(stat_buf.st_uid == uid, "uid does not match, "

+                                         "expected [%d], got [%d].",

+                                         uid, stat_buf.st_uid);

+     fail_unless(stat_buf.st_gid == gid, "gid does not match, "

+                                         "expected [%d], got [%d].",

+                                         gid, stat_buf.st_gid);

+     fail_unless((stat_buf.st_mode & ~S_IFMT) == mode,

+                                            "mode of [%s] does not match, "

+                                            "expected [%o], got [%o].", dirname,

+                                             mode, (stat_buf.st_mode & ~S_IFMT));

+ }

+ 

+ START_TEST(test_pub_ccache_dir)

+ {

+     int ret;

+     char *cwd;

+     char *testpath;

+     char *dirname;

+     char *subdirname;

+     char *filename;

+ 

+     fail_unless(getuid() == 0, "This test must be run as root.");

+ 

+     cwd = getcwd(NULL, 0);

+     fail_unless(cwd != NULL, "getcwd failed.");

+ 

+     testpath = talloc_asprintf(tmp_ctx, "%s/%s", cwd, TESTS_PATH);

+     free(cwd);

+     fail_unless(testpath != NULL, "talloc_asprintf failed.");

+     dirname = talloc_asprintf(tmp_ctx, "%s/pub_ccdir", testpath);

+     fail_unless(dirname != NULL, "talloc_asprintf failed.");

+     subdirname = talloc_asprintf(tmp_ctx, "%s/subdir", dirname);

+     fail_unless(subdirname != NULL, "talloc_asprintf failed.");

+     filename = talloc_asprintf(tmp_ctx, "%s/ccfile", subdirname);

+     fail_unless(filename != NULL, "talloc_asprintf failed.");

+ 

+     ret = chmod(testpath, 0754);

+     fail_unless(ret == EOK, "chmod failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, NULL, 12345, 12345, false);

+     fail_unless(ret == EINVAL, "create_ccache_dir does not return EINVAL "

+                                "while x-bit is missing.");

+ 

+     ret = chmod(testpath, 0755);

+     fail_unless(ret == EOK, "chmod failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, NULL, 12345, 12345, false);

+     fail_unless(ret == EOK, "create_ccache_dir failed.");

+ 

+     check_dir(subdirname, 0, 0, 01777);

+     RMDIR(subdirname);

+     check_dir(dirname, 0, 0, 0755);

+     RMDIR(dirname);

+ }

+ END_TEST

+ 

+ START_TEST(test_pub_ccache_dir_in_user_dir)

+ {

+     int ret;

+     char *cwd;

+     char *dirname;

+     char *subdirname;

+     char *filename;

+ 

+     fail_unless(getuid() == 0, "This test must be run as root.");

+ 

+     cwd = getcwd(NULL, 0);

+     fail_unless(cwd != NULL, "getcwd failed.");

+ 

+     dirname = talloc_asprintf(tmp_ctx, "%s/%s/pub_ccdir", cwd, TESTS_PATH);

+     free(cwd);

+     fail_unless(dirname != NULL, "talloc_asprintf failed.");

+     ret = mkdir(dirname, 0700);

+     fail_unless(ret == EOK, "mkdir failed.\n");

+     ret = chown(dirname, 12345, 12345);

+     fail_unless(ret == EOK, "chown failed.\n");

+     subdirname = talloc_asprintf(tmp_ctx, "%s/subdir", dirname);

+     fail_unless(subdirname != NULL, "talloc_asprintf failed.");

+     filename = talloc_asprintf(tmp_ctx, "%s/ccfile", subdirname);

+     fail_unless(filename != NULL, "talloc_asprintf failed.");

+ 

+     ret = create_ccache_dir(tmp_ctx, filename, NULL, 12345, 12345, false);

+     fail_unless(ret == EINVAL, "Creating public ccache dir in user dir "

+                                "does not failed with EINVAL.");

+ 

+     RMDIR(dirname);

+ }

+ END_TEST

+ 

+ START_TEST(test_priv_ccache_dir)

+ {

+     int ret;

+     char *cwd;

+     char *testpath;

+     char *dirname;

+     char *subdir;

+     char *filename;

+     uid_t uid = 12345;

+     gid_t gid = 12345;

+ 

+     fail_unless(getuid() == 0, "This test must be run as root.");

+ 

+     cwd = getcwd(NULL, 0);

+     fail_unless(cwd != NULL, "getcwd failed.");

+ 

+     testpath = talloc_asprintf(tmp_ctx, "%s/%s", cwd, TESTS_PATH);

+     free(cwd);

+     fail_unless(testpath != NULL, "talloc_asprintf failed.");

+     dirname = talloc_asprintf(tmp_ctx, "%s/base", testpath);

+     subdir = talloc_asprintf(tmp_ctx, "%s/priv_ccdir", dirname);

+     fail_unless(subdir != NULL, "talloc_asprintf failed.");

+     filename = talloc_asprintf(tmp_ctx, "%s/ccfile", subdir);

+     fail_unless(filename != NULL, "talloc_asprintf failed.");

+ 

+     ret = chmod(testpath, 0754);

+     fail_unless(ret == EOK, "chmod failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, NULL, uid, gid, true);

+     fail_unless(ret == EINVAL, "create_ccache_dir does not return EINVAL "

+                                "while x-bit is missing.");

+ 

+     ret = chmod(testpath, 0755);

+     fail_unless(ret == EOK, "chmod failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, NULL, uid, gid, true);

+     fail_unless(ret == EOK, "create_ccache_dir failed.");

+ 

+     check_dir(subdir, uid, gid, 0700);

+     RMDIR(subdir);

+     check_dir(dirname, 0, 0, 0755);

+     RMDIR(dirname);

+ }

+ END_TEST

+ 

+ START_TEST(test_private_ccache_dir_in_user_dir)

+ {

+     int ret;

+     char *cwd;

+     char *user_dir;

+     char *dn1;

+     char *dn2;

+     char *dn3;

+     char *filename;

+     uid_t uid = getuid();

+     gid_t gid = getgid();

+ 

+     if (uid == 0) {

+         uid = 12345;

+         gid = 12345;

+     }

+ 

+     cwd = getcwd(NULL, 0);

+     fail_unless(cwd != NULL, "getcwd failed.");

+ 

+     user_dir = talloc_asprintf(tmp_ctx, "%s/%s/user", cwd, TESTS_PATH);

+     free(cwd);

+     fail_unless(user_dir != NULL, "talloc_asprintf failed.");

+     ret = mkdir(user_dir, 0700);

+     fail_unless(ret == EOK, "mkdir failed.");

+     ret = chown(user_dir, uid, gid);

+     fail_unless(ret == EOK, "chown failed.");

+ 

+     dn1 = talloc_asprintf(tmp_ctx, "%s/a", user_dir);

+     fail_unless(dn1 != NULL, "talloc_asprintf failed.");

+     dn2 = talloc_asprintf(tmp_ctx, "%s/b", dn1);

+     fail_unless(dn2 != NULL, "talloc_asprintf failed.");

+     dn3 = talloc_asprintf(tmp_ctx, "%s/c", dn2);

+     fail_unless(dn3 != NULL, "talloc_asprintf failed.");

+     filename = talloc_asprintf(tmp_ctx, "%s/ccfile", dn3);

+     fail_unless(filename != NULL, "talloc_asprintf failed.");

+ 

+     ret = chmod(user_dir, 0600);

+     fail_unless(ret == EOK, "chmod failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, NULL, uid, gid, true);

+     fail_unless(ret == EINVAL, "create_ccache_dir does not return EINVAL "

+                                "while x-bit is missing.");

+ 

+     ret = chmod(user_dir, 0700);

+     fail_unless(ret == EOK, "chmod failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, NULL, uid, gid, true);

+     fail_unless(ret == EOK, "create_ccache_dir failed.");

+ 

+     check_dir(dn3, uid, gid, 0700);

+     RMDIR(dn3);

+     check_dir(dn2, uid, gid, 0700);

+     RMDIR(dn2);

+     check_dir(dn1, uid, gid, 0700);

+     RMDIR(dn1);

+     RMDIR(user_dir);

+ }

+ END_TEST

+ 

+ START_TEST(test_private_ccache_dir_in_wrong_user_dir)

+ {

+     int ret;

+     char *cwd;

+     char *dirname;

+     char *subdirname;

+     char *filename;

+ 

+     fail_unless(getuid() == 0, "This test must be run as root.");

+ 

+     cwd = getcwd(NULL, 0);

+     fail_unless(cwd != NULL, "getcwd failed.");

+ 

+     dirname = talloc_asprintf(tmp_ctx, "%s/%s/priv_ccdir", cwd, TESTS_PATH);

+     free(cwd);

+     fail_unless(dirname != NULL, "talloc_asprintf failed.");

+     ret = mkdir(dirname, 0700);

+     fail_unless(ret == EOK, "mkdir failed.\n");

+     ret = chown(dirname, 12346, 12346);

+     fail_unless(ret == EOK, "chown failed.\n");

+     subdirname = talloc_asprintf(tmp_ctx, "%s/subdir", dirname);

+     fail_unless(subdirname != NULL, "talloc_asprintf failed.");

+     filename = talloc_asprintf(tmp_ctx, "%s/ccfile", subdirname);

+     fail_unless(filename != NULL, "talloc_asprintf failed.");

+ 

+     ret = create_ccache_dir(tmp_ctx, filename, NULL, 12345, 12345, true);

+     fail_unless(ret == EINVAL, "Creating private ccache dir in wrong user "

+                                "dir does not failed with EINVAL.");

+ 

+     RMDIR(dirname);

+ }

+ END_TEST

+ 

+ START_TEST(test_illegal_patterns)

+ {

+     int ret;

+     char *cwd;

+     char *dirname;

+     char *filename;

+     uid_t uid = getuid();

+     gid_t gid = getgid();

+     pcre *illegal_re;

+     const char *errstr;

+     int errval;

+     int errpos;

+ 

+     illegal_re = pcre_compile2(ILLEGAL_PATH_PATTERN, 0,

+                                &errval, &errstr, &errpos, NULL);

+     fail_unless(illegal_re != NULL, "Invalid Regular Expression pattern at "

+                                     " position %d. (Error: %d [%s])\n",

+                                     errpos, errval, errstr);

+ 

+     cwd = getcwd(NULL, 0);

+     fail_unless(cwd != NULL, "getcwd failed.");

+ 

+     dirname = talloc_asprintf(tmp_ctx, "%s/%s/priv_ccdir", cwd, TESTS_PATH);

+     free(cwd);

+     fail_unless(dirname != NULL, "talloc_asprintf failed.");

+ 

+ 

+     filename = talloc_asprintf(tmp_ctx, "abc/./ccfile");

+     fail_unless(filename != NULL, "talloc_asprintf failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, illegal_re, uid, gid, true);

+     fail_unless(ret == EINVAL, "create_ccache_dir allowed relative path [%s].",

+                                filename);

+ 

+     filename = talloc_asprintf(tmp_ctx, "%s/abc/./ccfile", dirname);

+     fail_unless(filename != NULL, "talloc_asprintf failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, illegal_re, uid, gid, true);

+     fail_unless(ret == EINVAL, "create_ccache_dir allowed "

+                                "illegal pattern '/./' in filename [%s].",

+                                filename);

+ 

+     filename = talloc_asprintf(tmp_ctx, "%s/abc/../ccfile", dirname);

+     fail_unless(filename != NULL, "talloc_asprintf failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, illegal_re, uid, gid, true);

+     fail_unless(ret == EINVAL, "create_ccache_dir allowed "

+                                "illegal pattern '/../' in filename [%s].",

+                                filename);

+ 

+     filename = talloc_asprintf(tmp_ctx, "%s/abc//ccfile", dirname);

+     fail_unless(filename != NULL, "talloc_asprintf failed.");

+     ret = create_ccache_dir(tmp_ctx, filename, illegal_re, uid, gid, true);

+     fail_unless(ret == EINVAL, "create_ccache_dir allowed "

+                                "illegal pattern '//' in filename [%s].",

+                                filename);

+ 

+ }

+ END_TEST

+ 

  void setup_talloc_context(void)

  {

      int ret;
@@ -97,138 +410,118 @@

      fail_unless(ret == 0, "Connot free talloc context.");

  }

  

- START_TEST(test_multiple_substitutions)

+ static void do_test(const char *file_template, const char *dir_template,

+                     const char *expected, const bool expected_private_path)

  {

-     const char *test_template = BASE"_%u_%U_%u";

-     const char *expected = BASE"_"USERNAME"_"UID"_"USERNAME;

      char *result;

+     int ret;

+     bool private_path = false;

  

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

+     ret = dp_opt_set_string(kr->krb5_ctx->opts, KRB5_CCACHEDIR, dir_template);

+     fail_unless(ret == EOK, "Failed to set Ccache dir");

  

-     fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

+     result = expand_ccname_template(tmp_ctx, kr, file_template, true,

+                                     &private_path);

+ 

+     fail_unless(result != NULL, "Cannot expand template [%s].", file_template);

      fail_unless(strcmp(result, expected) == 0,

                  "Expansion failed, result [%s], expected [%s].",

                  result, expected);

+     fail_unless(private_path == expected_private_path,

+                 "Unexprected private path, get [%s], expected [%s].",

+                 private_path ? "true" : "false",

+                 expected_private_path ? "true" : "false");

+ }

+ 

+ START_TEST(test_multiple_substitutions)

+ {

+     do_test(BASE"_%u_%U_%u", CCACHE_DIR, BASE"_"USERNAME"_"UID"_"USERNAME, false);

+     do_test("%d/"FILENAME, BASE"_%u_%U_%u",

+             BASE"_"USERNAME"_"UID"_"USERNAME"/"FILENAME, true);

  }

  END_TEST

  

  START_TEST(test_username)

  {

-     const char *test_template = BASE"_%u";

-     const char *expected = BASE"_"USERNAME;

-     char *result;

- 

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

- 

-     fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

-     fail_unless(strcmp(result, expected) == 0,

-                 "Expansion failed, result [%s], expected [%s].",

-                 result, expected);

+     do_test(BASE"_%u", CCACHE_DIR, BASE"_"USERNAME, false);

+     do_test("%d/"FILENAME, BASE"_%u", BASE"_"USERNAME"/"FILENAME, true);

  }

  END_TEST

  

  START_TEST(test_uid)

  {

-     const char *test_template = BASE"_%U";

-     const char *expected = BASE"_"UID;

-     char *result;

- 

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

- 

-     fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

-     fail_unless(strcmp(result, expected) == 0,

-                 "Expansion failed, result [%s], expected [%s].",

-                 result, expected);

+     do_test(BASE"_%U", CCACHE_DIR, BASE"_"UID, false);

+     do_test("%d/"FILENAME, BASE"_%U", BASE"_"UID"/"FILENAME, true);

  }

  END_TEST

  

  START_TEST(test_upn)

  {

-     const char *test_template = BASE"_%p";

-     const char *expected = BASE"_"PRINCIPLE_NAME;

-     char *result;

- 

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

- 

-     fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

-     fail_unless(strcmp(result, expected) == 0,

-                 "Expansion failed, result [%s], expected [%s].",

-                 result, expected);

+     do_test(BASE"_%p", CCACHE_DIR, BASE"_"PRINCIPLE_NAME, false);

+     do_test("%d/"FILENAME, BASE"_%p", BASE"_"PRINCIPLE_NAME"/"FILENAME, true);

  }

  END_TEST

  

  START_TEST(test_realm)

  {

-     const char *test_template = BASE"_%r";

-     const char *expected = BASE"_"REALM;

-     char *result;

- 

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

- 

-     fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

-     fail_unless(strcmp(result, expected) == 0,

-                 "Expansion failed, result [%s], expected [%s].",

-                 result, expected);

+     do_test(BASE"_%r", CCACHE_DIR, BASE"_"REALM, false);

+     do_test("%d/"FILENAME, BASE"_%r", BASE"_"REALM"/"FILENAME, false);

  }

  END_TEST

  

  START_TEST(test_home)

  {

-     const char *test_template = BASE"_%h";

-     const char *expected = BASE"_"HOME_DIRECTORY;

-     char *result;

- 

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

- 

-     fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

-     fail_unless(strcmp(result, expected) == 0,

-                 "Expansion failed, result [%s], expected [%s].",

-                 result, expected);

+     do_test(BASE"_%h", CCACHE_DIR, BASE"_"HOME_DIRECTORY, false);

+     do_test("%d/"FILENAME, BASE"_%h", BASE"_"HOME_DIRECTORY"/"FILENAME, true);

  }

  END_TEST

  

  START_TEST(test_ccache_dir)

  {

-     const char *test_template = BASE"_%d";

-     const char *expected = BASE"_"CCACHE_DIR;

      char *result;

+     int ret;

+     bool private_path = false;

  

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

+     do_test(BASE"_%d", CCACHE_DIR, BASE"_"CCACHE_DIR, false);

  

-     fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

-     fail_unless(strcmp(result, expected) == 0,

-                 "Expansion failed, result [%s], expected [%s].",

-                 result, expected);

+     ret = dp_opt_set_string(kr->krb5_ctx->opts, KRB5_CCACHEDIR, BASE"_%d");

+     fail_unless(ret == EOK, "Failed to set Ccache dir");

+ 

+     result = expand_ccname_template(tmp_ctx, kr, "%d/"FILENAME, true,

+                                     &private_path);

+ 

+     fail_unless(result == NULL, "Using %%d in ccache dir should fail.");

+     fail_unless(private_path == false,

+                 "Unexprected private path, get [%s], expected [%s].",

+                 private_path ? "true" : "false", "false");

  }

  END_TEST

  

  START_TEST(test_pid)

  {

-     const char *test_template = BASE"_%P";

-     const char *expected = BASE"_"PID;

      char *result;

+     int ret;

+     bool private_path = false;

  

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

+     do_test(BASE"_%P", CCACHE_DIR, BASE"_"PID, false);

  

-     fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

-     fail_unless(strcmp(result, expected) == 0,

-                 "Expansion failed, result [%s], expected [%s].",

-                 result, expected);

+     ret = dp_opt_set_string(kr->krb5_ctx->opts, KRB5_CCACHEDIR, BASE"_%P");

+     fail_unless(ret == EOK, "Failed to set Ccache dir");

+ 

+     result = expand_ccname_template(tmp_ctx, kr, "%d/"FILENAME, true,

+                                     &private_path);

+ 

+     fail_unless(result == NULL, "Using %%P in ccache dir should fail.");

+     fail_unless(private_path == false,

+                 "Unexprected private path, get [%s], expected [%s].",

+                 private_path ? "true" : "false", "false");

  }

  END_TEST

  

  START_TEST(test_percent)

  {

-     const char *test_template = BASE"_%%";

-     const char *expected = BASE"_%";

-     char *result;

- 

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

- 

-     fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

-     fail_unless(strcmp(result, expected) == 0,

-                 "Expansion failed, result [%s], expected [%s].",

-                 result, expected);

+     do_test(BASE"_%%", CCACHE_DIR, BASE"_%", false);

+     do_test("%d/"FILENAME, BASE"_%%", BASE"_%/"FILENAME, false);

  }

  END_TEST

  
@@ -236,11 +529,26 @@

  {

      const char *test_template = BASE"_%X";

      char *result;

+     int ret;

+     bool private_path = false;

  

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

+     result = expand_ccname_template(tmp_ctx, kr, test_template, true,

+                                     &private_path);

  

      fail_unless(result == NULL, "Unknown template [%s] should fail.",

                  test_template);

+ 

+     ret = dp_opt_set_string(kr->krb5_ctx->opts, KRB5_CCACHEDIR, BASE"_%X");

+     fail_unless(ret == EOK, "Failed to set Ccache dir");

+     test_template = "%d/"FILENAME;

+     result = expand_ccname_template(tmp_ctx, kr, test_template, true,

+                                     &private_path);

+ 

+     fail_unless(result == NULL, "Unknown template [%s] should fail.",

+                 test_template);

+     fail_unless(private_path == false,

+                 "Unexprected private path, get [%s], expected [%s].",

+                 private_path ? "true" : "false", "false");

  }

  END_TEST

  
@@ -248,11 +556,16 @@

  {

      char *test_template = NULL;

      char *result;

+     bool private_path = false;

  

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

+     result = expand_ccname_template(tmp_ctx, kr, test_template, true,

+                                     &private_path);

  

      fail_unless(result == NULL, "Expected NULL as a result for an empty input.",

                  test_template);

+     fail_unless(private_path == false,

+                 "Unexprected private path, get [%s], expected [%s].",

+                 private_path ? "true" : "false", "false");

  }

  END_TEST

  
@@ -260,13 +573,18 @@

  {

      const char *test_template = BASE;

      char *result;

+     bool private_path = false;

  

-     result = expand_ccname_template(tmp_ctx, kr, test_template);

+     result = expand_ccname_template(tmp_ctx, kr, test_template, true,

+                                     &private_path);

  

      fail_unless(result != NULL, "Cannot expand template [%s].", test_template);

      fail_unless(strcmp(result, test_template) == 0,

                  "Expansion failed, result [%s], expected [%s].",

                  result, test_template);

+     fail_unless(private_path == false,

+                 "Unexprected private path, get [%s], expected [%s].",

+                 private_path ? "true" : "false", "false");

  }

  END_TEST

  
@@ -291,21 +609,81 @@

      tcase_add_test (tc_ccname_template, test_multiple_substitutions);

      suite_add_tcase (s, tc_ccname_template);

  

+     TCase *tc_create_dir = tcase_create("create_dir");

+     tcase_add_checked_fixture (tc_create_dir, setup_create_dir,

+                                teardown_create_dir);

+     tcase_add_test (tc_create_dir, test_illegal_patterns);

+     if (getuid() == 0) {

+         tcase_add_test (tc_create_dir, test_priv_ccache_dir);

+         tcase_add_test (tc_create_dir, test_private_ccache_dir_in_user_dir);

+         tcase_add_test (tc_create_dir, test_pub_ccache_dir);

+         tcase_add_test (tc_create_dir, test_pub_ccache_dir_in_user_dir);

+         tcase_add_test (tc_create_dir, test_private_ccache_dir_in_wrong_user_dir);

+     } else {

+         printf("Run as root to enable more tests.\n");

+     }

+     suite_add_tcase (s, tc_create_dir);

+ 

      return s;

  }

  

- int main(void)

+ int main(int argc, const char *argv[])

  {

-   int number_failed;

+     int ret;

+     int opt;

+     poptContext pc;

+     int number_failed;

+ 

+     tests_set_cwd();

+ 

+     struct poptOption long_options[] = {

+         POPT_AUTOHELP

+         SSSD_MAIN_OPTS

+         { NULL }

+     };

+ 

+     pc = poptGetContext(argv[0], argc, argv, long_options, 0);

+     while((opt = poptGetNextOpt(pc)) != -1) {

+         switch(opt) {

+         default:

+             fprintf(stderr, "\nInvalid option %s: %s\n\n",

+                     poptBadOption(pc, 0), poptStrerror(opt));

+             poptPrintUsage(pc, stderr, 0);

+             return 1;

+         }

+     }

+     poptFreeContext(pc);

+ 

  

-   tests_set_cwd();

+     ret = mkdir(TESTS_PATH, 0775);

+     if (ret != EOK) {

+         fprintf(stderr, "Could not create empty directory [%s]. ", TESTS_PATH);

+         if (errno == EEXIST) {

+             fprintf(stderr, "Please remove [%s].\n", TESTS_PATH);

+         } else {

+             fprintf(stderr, "[%d][%s].\n", errno, strerror(errno));

+         }

+ 

+         return 1;

+     }

+ 

+     Suite *s = krb5_utils_suite ();

+     SRunner *sr = srunner_create (s);

+     /* If CK_VERBOSITY is set, use that, otherwise it defaults to CK_NORMAL */

+     srunner_run_all(sr, CK_ENV);

+     number_failed = srunner_ntests_failed (sr);

+     srunner_free (sr);

+     if (number_failed == 0) {

+         ret = rmdir(TESTS_PATH);

+         if (ret != EOK) {

+             fprintf(stderr, "Cannot remove [%s]: [%d][%s].\n", TESTS_PATH,

+                             errno, strerror(errno));

+             return EXIT_FAILURE;

+         }

+ 

+         return EXIT_SUCCESS;

+     }

  

-   Suite *s = krb5_utils_suite ();

-   SRunner *sr = srunner_create (s);

-   /* If CK_VERBOSITY is set, use that, otherwise it defaults to CK_NORMAL */

-   srunner_run_all(sr, CK_ENV);

-   number_failed = srunner_ntests_failed (sr);

-   srunner_free (sr);

-   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;

+     return EXIT_FAILURE;

  }

  

file modified
+73 -3
@@ -130,6 +130,72 @@

  }

  END_TEST

  

+ static void test_ip_addr(struct tevent_req *req)

+ {

+     int recv_status;

+     int status;

+     struct hostent *hostent;

+     int i;

+     struct resolv_test_ctx *test_ctx = tevent_req_callback_data(req,

+                                                                 struct resolv_test_ctx);

+ 

+     test_ctx->done = true;

+ 

+     recv_status = resolv_gethostbyname_recv(req, test_ctx,

+                                             &status, NULL, &hostent);

+     talloc_zfree(req);

+     if (recv_status != EOK) {

+         DEBUG(2, ("resolv_gethostbyname_recv failed: %d\n", recv_status));

+         test_ctx->error = recv_status;

+         return;

+     }

+     DEBUG(7, ("resolv_gethostbyname_recv status: %d\n", status));

+ 

+     test_ctx->error = ENOENT;

+     for (i = 0; hostent->h_addr_list[i]; i++) {

+         char addr_buf[256];

+         inet_ntop(hostent->h_addrtype, hostent->h_addr_list[i], addr_buf, sizeof(addr_buf));

+ 

+         if (strcmp(addr_buf, "127.0.0.1") == 0) {

+             test_ctx->error = EOK;

+         }

+     }

+     talloc_free(hostent);

+ }

+ 

+ START_TEST(test_resolv_ip_addr)

+ {

+     struct resolv_test_ctx *test_ctx;

+     int ret = EOK;

+     struct tevent_req *req;

+     const char *hostname = "127.0.0.1";

+ 

+     ret = setup_resolv_test(&test_ctx);

+     if (ret != EOK) {

+         fail("Could not set up test");

+         return;

+     }

+ 

+     check_leaks_push(test_ctx);

+     req = resolv_gethostbyname_send(test_ctx, test_ctx->ev,

+                                     test_ctx->resolv, hostname, IPV4_ONLY);

+     DEBUG(7, ("Sent resolv_gethostbyname\n"));

+     if (req == NULL) {

+         ret = ENOMEM;

+     }

+ 

+     if (ret == EOK) {

+         tevent_req_set_callback(req, test_ip_addr, test_ctx);

+         ret = test_loop(test_ctx);

+     }

+ 

+     check_leaks_pop(test_ctx);

+     fail_unless(ret == EOK);

+ 

+     talloc_zfree(test_ctx);

+ }

+ END_TEST

+ 

  static void test_localhost(struct tevent_req *req)

  {

      int recv_status;
@@ -535,10 +601,11 @@

      tcase_add_checked_fixture(tc_resolv, leak_check_setup, leak_check_teardown);

      /* Do some testing */

      tcase_add_test(tc_resolv, test_copy_hostent);

-     tcase_add_test(tc_resolv, test_resolv_localhost);

-     tcase_add_test(tc_resolv, test_resolv_negative);

+     tcase_add_test(tc_resolv, test_resolv_ip_addr);

      if (use_net_test) {

          tcase_add_test(tc_resolv, test_resolv_internet);

+         tcase_add_test(tc_resolv, test_resolv_negative);

+         tcase_add_test(tc_resolv, test_resolv_localhost);

          if (txt_host != NULL) {

              tcase_add_test(tc_resolv, test_resolv_internet_txt);

          }
@@ -595,7 +662,10 @@

      poptFreeContext(pc);

      debug_level = debug;

  

-     tests_set_cwd();

+     if (!use_net_test) {

+         printf("Network tests disabled. Rerun with the \"-n\" "

+                "option to run the full suite of tests\n");

+     }

  

      resolv_suite = create_resolv_suite();

      sr = srunner_create(resolv_suite);

@@ -0,0 +1,173 @@

+ /*

+     SSSD

+ 

+     Simple access module -- Tests

+ 

+     Authors:

+         Sumit Bose <sbose@redhat.com>

+ 

+     Copyright (C) 2010 Red Hat

+ 

+     This program is free software; you can redistribute it and/or modify

+     it under the terms of the GNU General Public License as published by

+     the Free Software Foundation; either version 3 of the License, or

+     (at your option) any later version.

+ 

+     This program 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 General Public License for more details.

+ 

+     You should have received a copy of the GNU General Public License

+     along with this program.  If not, see <http://www.gnu.org/licenses/>.

+ */

+ 

+ #include <stdlib.h>

+ #include <popt.h>

+ #include <check.h>

+ 

+ #include "providers/simple/simple_access.h"

+ 

+ const char *ulist_1[] = {"u1", "u2", NULL};

+ 

+ struct simple_ctx *ctx = NULL;

+ 

+ void setup_simple(void)

+ {

+     fail_unless(ctx == NULL, "Simple context already initialized.");

+     ctx = talloc_zero(NULL, struct simple_ctx);

+     fail_unless(ctx != NULL, "Cannot create simple context.");

+ }

+ 

+ void teardown_simple(void)

+ {

+     int ret;

+     fail_unless(ctx != NULL, "Simple context already freed.");

+     ret = talloc_free(ctx);

+     ctx = NULL;

+     fail_unless(ret == 0, "Connot free simple context.");

+ }

+ 

+ START_TEST(test_both_empty)

+ {

+     int ret;

+     bool access_granted = false;

+ 

+     ctx->allow_users = NULL;

+     ctx->deny_users = NULL;

+ 

+     ret = simple_access_check(ctx, "u1", &access_granted);

+     fail_unless(ret == EOK, "access_simple_check failed.");

+     fail_unless(access_granted == true, "Access denied "

+                                         "while both lists are empty.");

+ }

+ END_TEST

+ 

+ START_TEST(test_allow_empty)

+ {

+     int ret;

+     bool access_granted = true;

+ 

+     ctx->allow_users = NULL;

+     ctx->deny_users = discard_const(ulist_1);

+ 

+     ret = simple_access_check(ctx, "u1", &access_granted);

+     fail_unless(ret == EOK, "access_simple_check failed.");

+     fail_unless(access_granted == false, "Access granted "

+                                          "while user is in deny list.");

+ 

+     ret = simple_access_check(ctx, "u3", &access_granted);

+     fail_unless(ret == EOK, "access_simple_check failed.");

+     fail_unless(access_granted == true, "Access denied "

+                                          "while user is not in deny list.");

+ }

+ END_TEST

+ 

+ START_TEST(test_deny_empty)

+ {

+     int ret;

+     bool access_granted = false;

+ 

+     ctx->allow_users = discard_const(ulist_1);

+     ctx->deny_users = NULL;

+ 

+     ret = simple_access_check(ctx, "u1", &access_granted);

+     fail_unless(ret == EOK, "access_simple_check failed.");

+     fail_unless(access_granted == true, "Access denied "

+                                         "while user is in allow list.");

+ 

+     ret = simple_access_check(ctx, "u3", &access_granted);

+     fail_unless(ret == EOK, "access_simple_check failed.");

+     fail_unless(access_granted == false, "Access granted "

+                                         "while user is not in allow list.");

+ }

+ END_TEST

+ 

+ START_TEST(test_both_set)

+ {

+     int ret;

+     bool access_granted = false;

+ 

+     ctx->allow_users = discard_const(ulist_1);

+     ctx->deny_users = discard_const(ulist_1);

+ 

+     ret = simple_access_check(ctx, "u1", &access_granted);

+     fail_unless(ret == EOK, "access_simple_check failed.");

+     fail_unless(access_granted == true, "Access denied "

+                                         "while user is in allow list.");

+ 

+     ret = simple_access_check(ctx, "u3", &access_granted);

+     fail_unless(ret == EOK, "access_simple_check failed.");

+     fail_unless(access_granted == false, "Access granted "

+                                         "while user is not in allow list.");

+ }

+ END_TEST

+ 

+ Suite *access_simple_suite (void)

+ {

+     Suite *s = suite_create("access_simple");

+ 

+     TCase *tc_allow_deny = tcase_create("allow/deny");

+     tcase_add_checked_fixture(tc_allow_deny, setup_simple, teardown_simple);

+     tcase_add_test(tc_allow_deny, test_both_empty);

+     tcase_add_test(tc_allow_deny, test_allow_empty);

+     tcase_add_test(tc_allow_deny, test_deny_empty);

+     tcase_add_test(tc_allow_deny, test_both_set);

+     suite_add_tcase(s, tc_allow_deny);

+ 

+     return s;

+ }

+ 

+ int main(int argc, const char *argv[])

+ {

+     int opt;

+     poptContext pc;

+     int number_failed;

+ 

+     struct poptOption long_options[] = {

+         POPT_AUTOHELP

+         SSSD_MAIN_OPTS

+         { NULL }

+     };

+ 

+     pc = poptGetContext(argv[0], argc, argv, long_options, 0);

+     while((opt = poptGetNextOpt(pc)) != -1) {

+         switch(opt) {

+         default:

+             fprintf(stderr, "\nInvalid option %s: %s\n\n",

+                     poptBadOption(pc, 0), poptStrerror(opt));

+             poptPrintUsage(pc, stderr, 0);

+             return 1;

+         }

+     }

+     poptFreeContext(pc);

+ 

+ 

+     Suite *s = access_simple_suite();

+     SRunner *sr = srunner_create(s);

+     srunner_run_all(sr, CK_ENV);

+     number_failed = srunner_ntests_failed(sr);

+     srunner_free(sr);

+     return (number_failed==0 ? EXIT_SUCCESS : EXIT_FAILURE);

+ }

+ 

file added
+89
@@ -0,0 +1,89 @@

+ /*

+    SSSD

+ 

+    nscd.c

+ 

+    Copyright (C) Jakub Hrozek <jhrozek@redhat.com>        2010

+ 

+    This program is free software; you can redistribute it and/or modify

+    it under the terms of the GNU General Public License as published by

+    the Free Software Foundation; either version 3 of the License, or

+    (at your option) any later version.

+ 

+    This program 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 General Public License for more details.

+ 

+    You should have received a copy of the GNU General Public License

+    along with this program.  If not, see <http://www.gnu.org/licenses/>.

+ */

+ 

+ #include <talloc.h>

+ #include <stdlib.h>

+ #include <sys/types.h>

+ #include <sys/wait.h>

+ 

+ #include "config.h"

+ #include "util/util.h"

+ #include "tools/tools_util.h"

+ 

+ #ifndef NSCD_RELOAD_ARG

+ #define NSCD_RELOAD_ARG "-i"

+ #endif

+ 

+ #if defined(NSCD_PATH) && defined(HAVE_NSCD)

+ int flush_nscd_cache(TALLOC_CTX *mem_ctx, enum nscd_db flush_db)

+ {

+     char *cmd = NULL;

+     const char *service;

+     int ret;

+ 

+     switch(flush_db) {

+         case NSCD_DB_PASSWD:

+             service = "passwd";

+             break;

+ 

+         case NSCD_DB_GROUP:

+             service = "group";

+             break;

+ 

+         default:

+             DEBUG(1, ("Unknown nscd database\n"));

+             ret = EINVAL;

+             goto done;

+     }

+ 

+     cmd = talloc_asprintf(mem_ctx, "%s %s %s", NSCD_PATH,

+                                                NSCD_RELOAD_ARG,

+                                                service);

+     if (!cmd) {

+         ret = ENOMEM;

+         goto done;

+     }

+ 

+     ret = system(cmd);

+     if (ret) {

+         if (ret == -1) {

+             DEBUG(1, ("system(3) failed\n"));

+             ret = EFAULT;

+             goto done;

+         }

+         /* The flush fails if nscd is not running, so do not care

+          * about the return code */

+         DEBUG(8, ("Error flushing cache, perhaps nscd is not running\n"));

+     }

+ 

+ 

+     ret = EOK;

+ done:

+     talloc_free(cmd);

+     return ret;

+ }

+ 

+ #else   /* defined(NSCD_PATH) && defined(HAVE_NSCD) */

+ int flush_nscd_cache(TALLOC_CTX *mem_ctx, enum nscd_db flush_db)

+ {

+     return EOK;

+ }

+ #endif

file modified
+223 -21
@@ -276,6 +276,7 @@

  

  static void group_show_root_done(struct tevent_req *subreq);

  static void group_show_recurse_done(struct tevent_req *subreq);

+ static void group_show_trim_done(struct tevent_req *subreq);

  

  struct tevent_req *group_show_recurse_send(TALLOC_CTX *,

                                             struct group_show_state *,
@@ -285,6 +286,17 @@

  static int group_show_recurse_recv(TALLOC_CTX *, struct tevent_req *,

                                     struct group_info ***);

  

+ static struct tevent_req *group_show_trim_memberof_send(TALLOC_CTX *mem_ctx,

+                                                 struct tevent_context *ev,

+                                                 struct sysdb_ctx *sysdb,

+                                                 struct sysdb_handle *handle,

+                                                 struct sss_domain_info *domain,

+                                                 const char *name,

+                                                 const char **memberofs);

+ static int group_show_trim_memberof_recv(TALLOC_CTX *mem_ctx,

+                                          struct tevent_req *req,

+                                          const char ***direct);

+ 

  struct tevent_req *group_show_send(TALLOC_CTX *mem_ctx,

                                     struct tevent_context *ev,

                                     struct sysdb_ctx *sysdb,
@@ -355,30 +367,47 @@

          return;

      }

  

-     if (group_members == NULL) {

-         tevent_req_done(req);

-         return;

-     }

- 

      if (state->recursive == false) {

-         /* if not recursive, just fill in names */

-         state->root->group_members = talloc_array(state->root,

-                                                   struct group_info *,

-                                                   nmembers+1);

-         for (i=0; group_members[i]; i++) {

-             state->root->group_members[i] = talloc_zero(state->root,

-                                                         struct group_info);

-             if (!state->root->group_members) {

-                 tevent_req_error(req, ENOMEM);

-             }

-             state->root->group_members[i]->name = talloc_strdup(state->root,

-                                                              group_members[i]);

-             if (!state->root->group_members[i]->name) {

-                 tevent_req_error(req, ENOMEM);

+         if (group_members) {

+             state->root->group_members = talloc_array(state->root,

+                                                     struct group_info *,

+                                                     nmembers+1);

+             for (i=0; group_members[i]; i++) {

+                 state->root->group_members[i] = talloc_zero(state->root,

+                                                             struct group_info);

+                 if (!state->root->group_members) {

+                     tevent_req_error(req, ENOMEM);

+                     return;

+                 }

+                 state->root->group_members[i]->name = talloc_strdup(state->root,

+                                                                 group_members[i]);

+                 if (!state->root->group_members[i]->name) {

+                     tevent_req_error(req, ENOMEM);

+                     return;

+                 }

              }

+             state->root->group_members[nmembers] = NULL;

          }

-         state->root->group_members[nmembers] = NULL;

  

+         if (state->root->memberofs == NULL) {

+             tevent_req_done(req);

+             return;

+         }

+ 

+         /* if not recursive, only show the direct parent */

+         subreq = group_show_trim_memberof_send(state, state->ev,

+                                                state->sysdb, state->handle,

+                                                state->domain, state->root->name,

+                                                state->root->memberofs);

+         if (!subreq) {

+             tevent_req_error(req, ENOMEM);

+             return;

+         }

+         tevent_req_set_callback(subreq, group_show_trim_done, req);

+         return;

+     }

+ 

+     if (group_members == NULL) {

          tevent_req_done(req);

          return;

      }
@@ -394,6 +423,26 @@

      tevent_req_set_callback(subreq, group_show_recurse_done, req);

  }

  

+ static void group_show_trim_done(struct tevent_req *subreq)

+ {

+     struct tevent_req *req = tevent_req_callback_data(subreq,

+                                                       struct tevent_req);

+     struct group_show_state *state = tevent_req_data(req,

+                                                      struct group_show_state);

+     int ret;

+ 

+     ret = group_show_trim_memberof_recv(state->root, subreq,

+                                         &state->root->memberofs);

+     talloc_zfree(subreq);

+     if (ret) {

+         tevent_req_error(req, ret);

+         return;

+     }

+ 

+     tevent_req_done(req);

+     return;

+ }

+ 

  static void group_show_recurse_done(struct tevent_req *subreq)

  {

      struct tevent_req *req = tevent_req_callback_data(subreq,
@@ -428,6 +477,160 @@

      return EOK;

  }

  

+ /*=========Nonrecursive search should only show direct parent========== */

+ struct group_show_trim_state {

+     const char *name;

+     struct ldb_dn *dn;

+ 

+     const char **all;

+     int  current;

+ 

+     const char **direct;

+     int ndirect;

+ 

+     struct tevent_context *ev;

+     struct sysdb_ctx *sysdb;

+     struct sysdb_handle *handle;

+     struct sss_domain_info *domain;

+ };

+ 

+ static int group_show_trim_memberof_next(struct tevent_req *req);

+ static void group_show_trim_memberof_done(struct tevent_req *subreq);

+ 

+ static struct tevent_req *group_show_trim_memberof_send(TALLOC_CTX *mem_ctx,

+                                                 struct tevent_context *ev,

+                                                 struct sysdb_ctx *sysdb,

+                                                 struct sysdb_handle *handle,

+                                                 struct sss_domain_info *domain,

+                                                 const char *name,

+                                                 const char **memberofs)

+ {

+     struct tevent_req *req = NULL;

+     struct group_show_trim_state *state;

+     int ret;

+ 

+     req = tevent_req_create(mem_ctx, &state, struct group_show_trim_state);

+     if (req == NULL) {

+         return NULL;

+     }

+     state->ev = ev;

+     state->sysdb = sysdb;

+     state->handle = handle;

+     state->domain = domain;

+     state->name = name;

+     state->all = memberofs;

+ 

+     state->dn = sysdb_group_dn(state->sysdb, state,

+                                state->domain->name,

+                                state->name);

+     if (!state->dn) {

+         talloc_zfree(req);

+         return NULL;

+     }

+ 

+     ret = group_show_trim_memberof_next(req);

+     if (ret) {

+         talloc_zfree(req);

+         return NULL;

+     }

+ 

+     return req;

+ }

+ 

+ static int group_show_trim_memberof_next(struct tevent_req *req)

+ {

+     const char *filter;

+     struct tevent_req *subreq = NULL;

+     struct group_show_trim_state *state = tevent_req_data(req,

+                                                  struct group_show_trim_state);

+ 

+     filter = talloc_asprintf(req, "(&(%s=%s)(%s=%s))",

+                              SYSDB_NAME, state->all[state->current],

+                              SYSDB_MEMBER, ldb_dn_get_linearized(state->dn));

+     if (!filter) {

+         return ENOMEM;

+     }

+ 

+     subreq = sysdb_search_groups_send(state, state->ev, state->sysdb,

+                                       state->handle, state->domain,

+                                       filter, NULL);

+     if (!subreq) {

+         return ENOMEM;

+     }

+     tevent_req_set_callback(subreq, group_show_trim_memberof_done, req);

+ 

+     return EOK;

+ }

+ 

+ static void group_show_trim_memberof_done(struct tevent_req *subreq)

+ {

+     struct tevent_req *req = tevent_req_callback_data(subreq,

+                                                  struct tevent_req);

+     struct group_show_trim_state *state = tevent_req_data(req,

+                                                  struct group_show_trim_state);

+     int ret;

+     struct ldb_message **msgs;

+     size_t count = 0;

+     const char *name;

+ 

+     ret = sysdb_search_groups_recv(subreq, state, &count, &msgs);

+     talloc_zfree(subreq);

+     /* ENOENT is OK, the group is just not a direct parent */

+     if (ret != EOK && ret != ENOENT) {

+         tevent_req_error(req, ret);

+         return;

+     }

+ 

+     if (count > 0) {

+         name = ldb_msg_find_attr_as_string(msgs[0],

+                                            SYSDB_NAME, NULL);

+         if (!name) {

+             DEBUG(2, ("Entry %s has no Name Attribute ?!?\n",

+                   ldb_dn_get_linearized(msgs[0]->dn)));

+             tevent_req_error(req, EFAULT);

+             return;

+         }

+ 

+         state->direct = talloc_realloc(state, state->direct,

+                                        const char *, state->ndirect+2);

+         if (!state->direct) {

+             tevent_req_error(req, ENOMEM);

+         }

+ 

+         state->direct[state->ndirect] = talloc_strdup(state->direct, name);

+         if (!state->direct[state->ndirect]) {

+             tevent_req_error(req, ENOMEM);

+         }

+ 

+         state->direct[state->ndirect+1] = NULL;

+         state->ndirect++;

+     }

+ 

+     state->current++;

+     if (state->all[state->current] != NULL) {

+         ret = group_show_trim_memberof_next(req);

+         if (ret != EOK) {

+             tevent_req_error(req, ret);

+         }

+         return;

+     }

+ 

+     tevent_req_done(req);

+ }

+ 

+ static int group_show_trim_memberof_recv(TALLOC_CTX *mem_ctx,

+                                          struct tevent_req *req,

+                                          const char ***direct)

+ {

+     struct group_show_trim_state *state = tevent_req_data(req,

+                                                  struct group_show_trim_state);

+ 

+     TEVENT_REQ_RETURN_ON_ERROR(req);

+     *direct = talloc_move(mem_ctx, &state->direct);

+ 

+     return EOK;

+ }

+ 

  /*==================Recursive search for nested groups================= */

  struct group_show_recurse {

      const char **names;
@@ -489,7 +692,6 @@

      /* Skip circular groups */

      if (strcmp(recurse_state->names[recurse_state->current],

                 recurse_state->parent->name) == 0) {

-         DEBUG(0, ("CIRCULAR DEP DETECTED\n"));

          group_show_recurse_cont(req);

          return EOK;

      }

file modified
+15
@@ -1301,6 +1301,9 @@

  

      SYNC_LOOP(res, ret);

  

+     flush_nscd_cache(mem_ctx, NSCD_DB_PASSWD);

+     flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);

+ 

      talloc_free(res);

      return ret;

  }
@@ -1349,6 +1352,9 @@

  

      SYNC_LOOP(res, ret);

  

+     flush_nscd_cache(mem_ctx, NSCD_DB_PASSWD);

+     flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);

+ 

      talloc_free(res);

      return ret;

  }
@@ -1397,6 +1403,9 @@

  

      SYNC_LOOP(res, ret);

  

+     flush_nscd_cache(mem_ctx, NSCD_DB_PASSWD);

+     flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);

+ 

      talloc_free(res);

      return ret;

  }
@@ -1445,6 +1454,8 @@

  

      SYNC_LOOP(res, ret);

  

+     flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);

+ 

      talloc_free(res);

      return ret;

  }
@@ -1493,6 +1504,8 @@

  

      SYNC_LOOP(res, ret);

  

+     flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);

+ 

      talloc_free(res);

      return ret;

  }
@@ -1541,6 +1554,8 @@

  

      SYNC_LOOP(res, ret);

  

+     flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);

+ 

      talloc_free(res);

      return ret;

  }

file modified
+8
@@ -105,4 +105,12 @@

  int selinux_file_context(const char *dst_name);

  int reset_selinux_file_context(void);

  

+ /* from nscd.c */

+ enum nscd_db {

+     NSCD_DB_PASSWD,

+     NSCD_DB_GROUP

+ };

+ 

+ int flush_nscd_cache(TALLOC_CTX *mem_ctx, enum nscd_db flush_db);

+ 

  #endif  /* __TOOLS_UTIL_H__ */

file modified
+13
@@ -152,3 +152,16 @@

  {

      return open_debug_file_ex(NULL, NULL);

  }

+ 

+ int rotate_debug_files(void)

+ {

+     int ret;

+ 

+     if (!debug_to_file) return EOK;

+ 

+     ret = fclose(debug_file);

+     if (ret) return ret;

+     debug_file = NULL;

+ 

+     return open_debug_file();

+ }

file modified
+19
@@ -284,6 +284,17 @@

      return EOK;

  }

  

+ static void te_server_hup(struct tevent_context *ev,

+                           struct tevent_signal *se,

+                           int signum,

+                           int count,

+                           void *siginfo,

+                           void *private_data)

+ {

+     DEBUG(1, ("Received SIGHUP. Rotating logfiles.\n"));

+     rotate_debug_files();

+ }

+ 

  int server_setup(const char *name, int flags,

                   const char *conf_entry,

                   struct main_context **main_ctx)
@@ -295,6 +306,7 @@

      int ret = EOK;

      bool dt;

      bool dl;

+     struct tevent_signal *tes;

  

      debug_prg_name = strdup(name);

      if (!debug_prg_name) {
@@ -391,6 +403,13 @@

      }

      if (dl) debug_to_file = 1;

  

+     /* before opening the log file set up log rotation */

+     tes = tevent_add_signal(ctx->event_ctx, ctx, SIGHUP, 0,

+                             te_server_hup, NULL);

+     if (tes == NULL) {

+         return EIO;

+     }

+ 

      /* open log file if told so */

      if (debug_to_file) {

          ret = open_debug_file();

file modified
+8 -3
@@ -33,6 +33,7 @@

      uint32_t resp_type = SSS_PAM_USER_INFO_CHPASS_ERROR;

      size_t err_len;

      uint8_t *resp;

+     size_t p;

  

      err_len = strlen(user_error_message);

      *resp_len = 2 * sizeof(uint32_t) + err_len;
@@ -42,9 +43,13 @@

          return ENOMEM;

      }

  

-     memcpy(resp, &resp_type, sizeof(uint32_t));

-     memcpy(resp + sizeof(uint32_t), &err_len, sizeof(uint32_t));

-     memcpy(resp + 2 * sizeof(uint32_t), user_error_message, err_len);

+     p = 0;

+     SAFEALIGN_SET_UINT32(&resp[p], resp_type, &p);

+     SAFEALIGN_SET_UINT32(&resp[p], err_len, &p);

+     safealign_memcpy(&resp[p], user_error_message, err_len, &p);

+     if (p != *resp_len) {

+         DEBUG(0, ("Size mismatch\n"));

+     }

  

      *_resp = resp;

      return EOK;

file modified
+1
@@ -201,6 +201,7 @@

                          const char *fmt, va_list ap);

  int open_debug_file_ex(const char *filename, FILE **filep);

  int open_debug_file(void);

+ int rotate_debug_files(void);

  

  /* from server.c */

  struct main_context {

file modified
+1 -1
@@ -1,5 +1,5 @@

  # Primary version number

- m4_define([VERSION_NUMBER], [1.1.0])

+ m4_define([VERSION_NUMBER], [1.1.2])

  

  # If the PRERELEASE_VERSION_NUMBER is set, we'll append

  # it to the release tag when creating an RPM or SRPM