2004-03-01 14:38:03 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright 2003 Braden MacDonald <bradenm_k@shaw.ca> *
|
|
|
|
* Copyright 2003 Ravikiran Rajagopal <ravi@ee.eng.ohio-state.edu> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License (version 2) as *
|
|
|
|
* published by the Free Software Foundation. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef CHFNPROC_H
|
|
|
|
#define CHFNPROC_H
|
|
|
|
|
2007-05-09 22:23:52 +00:00
|
|
|
#include <QtCore/QByteRef>
|
2004-03-01 14:38:03 +00:00
|
|
|
#include <kdesu/process.h>
|
|
|
|
|
2007-10-02 12:12:47 +00:00
|
|
|
class ChfnProcess : public KDESu::PtyProcess
|
2004-03-01 14:38:03 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum Errors { ChfnNotFound=1, PasswordError=2, MiscError=3 };
|
|
|
|
|
|
|
|
int exec(const char *pass, const char *name);
|
|
|
|
|
2005-07-28 14:59:42 +00:00
|
|
|
QByteArray error() { return m_Error; }
|
2004-03-01 14:38:03 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
int ConverseChfn(const char *pass);
|
|
|
|
|
2005-07-28 14:59:42 +00:00
|
|
|
QByteArray m_Error;
|
2004-03-01 14:38:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|