/*
- * "$Id: quotas.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: quotas.c 6949 2007-09-12 21:33:23Z mike $"
*
* Quota routines for the Common UNIX Printing System (CUPS).
*
{
cupsd_quota_t *q, /* Quota data pointer */
match; /* Search data */
+ char *ptr; /* Pointer into username */
if (!p || !username)
return (NULL);
strlcpy(match.username, username, sizeof(match.username));
+ if ((ptr = strchr(match.username, '@')) != NULL)
+ *ptr = '\0'; /* Strip @domain/@KDC */
if ((q = (cupsd_quota_t *)cupsArrayFind(p->quotas, &match)) != NULL)
return (q);
const char *username) /* I - User */
{
cupsd_quota_t *q; /* New quota data */
+ char *ptr; /* Pointer into username */
if (!p || !username)
return (NULL);
strlcpy(q->username, username, sizeof(q->username));
+ if ((ptr = strchr(q->username, '@')) != NULL)
+ *ptr = '\0'; /* Strip @domain/@KDC */
cupsArrayAdd(p->quotas, q);
/*
- * End of "$Id: quotas.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: quotas.c 6949 2007-09-12 21:33:23Z mike $".
*/