From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,7cf8507c402829e9,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-02-04 12:50:26 PST Path: nntp.gmd.de!dearn! esoc!linuxed1!peernews.demon.co.uk!pipex!pipex!howland.reston.ans.net!news.sprintlink.net!hookup!hookup!not-for-mail From: mskucher@vertex.tor.hookup.net (Murray S. Kucherawy) Newsgroups: comp.unix.osf.osf1 Subject: quotactl() oddity Date: 4 Feb 1995 15:50:26 -0500 Organization: HookUp Communication Corporation, Oakville, Ontario, CANADA Message-ID: <3h0pai$c1a@vertex.tor.hookup.net> I'm trying to set disk quotas for my users using quotactl(), but I'm finding that if I do: ... struct passwd *pw; struct group *gr; struct dqblk q; gr = getgrnam("customer"); if (gr == (struct group *)NULL) { fprintf(stderr,"Group \"customer\" not defined.\n"); return(1); } setpwent(); while ( (pw = getpwent()) != (struct passwd *)NULL ) { if (pw->pw_gid == gr->gr_gid) { /* if it's the right group */ (void) memset ((char *)&q,'\0',sizeof(q)); q.dqb_bsoftlimit = 2000; q.dqb_bhardlimit = 10000; q.dqb_btime = 3*86400; /* 3 days */ fprintf(stdout,"Setting quota for %s\n",pw->pw_name); if (quotactl(pw->pw_dir,QCMD(Q_SETQUOTA,USRQUOTA), pw->pw_uid,&q) < 0) fprintf(stdout,"quotactl(Q_SETQUOTA): %s\n", strerror(errno)); } } ... It's setting the two quotas correctly, but the grace period that shows up as output on "quota -v" for someone over quota, either their soft limit or their hard limit, says "none". Am I doing something wrong? -- Murray S. Kucherawy ========================================================== Software Manager HookUp Communication Corporation - Ontario, CANADA E-mail: mskucher@hookup.net NIC Handle "MSK" (905) 847-8000 --- "Intel, where quality is job 0.9999992342" ---