Lines Matching defs:db
27 #define IS_STD_FILE(db) ((db)->file == stdin || (db)->file == stdout)
106 struct sss_colondb *db,
117 if (db->mode != SSS_COLONDB_READ) {
121 readchars = getline(&line, &linelen, db->file);
187 errno_t sss_colondb_writeline(struct sss_colondb *db,
195 if (db->mode != SSS_COLONDB_WRITE) {
243 fprintf(db->file, "%s\n", line);
244 fflush(db->file);
256 struct sss_colondb *db = talloc_get_type(pvt, struct sss_colondb);
258 if (db->file == NULL || IS_STD_FILE(db)) {
262 fclose(db->file);
263 db->file = NULL;
297 struct sss_colondb *db;
299 db = talloc_zero(mem_ctx, struct sss_colondb);
300 if (db == NULL) {
305 db->file = open_db(filename, mode);
306 db->mode = mode;
308 if (db->file == NULL) {
309 talloc_free(db);
313 talloc_set_destructor((TALLOC_CTX *)db, sss_colondb_close);
315 return db;