samba hacks
This page contains links to some of my samba hacks. It is autogenerated from the comments (if any) at the head of each file.
- smb-addprinter.c(updated Mon Sep 15 11:03:12 2003)
- /*
* Add Printer helper for Samba and CUPS
*
* Compile with gcc -Wall addprinter.c -o addprinter and set as your
* addprinter command in smb.conf. It expects to find a file mapping
* Samba-friendly port names to CUPS-friendly port names in the location
* marked by PORTSFILE, below. The map file is just
* PORTNAME[whitespace]CUPSNAME, one port per line.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <syslog.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#define PORTSFILE "/etc/samba/ports-map"
#define CONFFILE "/etc/samba/smb.conf"
#define SPOOL_PATH "/var/spool/samba"
- smb-deleteprinter.c(updated Mon Sep 15 11:03:12 2003)
- /*
* Delete Printer helper for Samba and CUPS
*
* Compile with gcc -Wall deleteprinter.c -o deleteprinter and set as your
* deleteprinter command in smb.conf.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <syslog.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#define CONFFILE "/etc/samba/smb.conf"
Waider |
Ugh. Did I write that? |